Issue #797 - deploy-install improvements; removed references to non-existent files from build.properties.
Change-Id: I5e00c2fd9156c1e8d8a23a3abbefb688f5342a36 Former-commit-id:642d57b71d
[formerlydd1acbe70a
] [formerlyc6b2d65308
] [formerly5ca4a66fdc
[formerlyc6b2d65308
[formerly d64577e7804cc8a235efebff53722bac3cde9cc7]]] Former-commit-id:5ca4a66fdc
Former-commit-id: f0e488e17505a4686cc6a6a7196566ed2a0f1fee [formerlyf295ee11ea
] Former-commit-id:14c20083b0
This commit is contained in:
parent
4f225f7cd5
commit
8359361a2f
3 changed files with 82 additions and 32 deletions
|
@ -113,33 +113,9 @@
|
|||
<var name="plugin.utility"
|
||||
value="${plugin.base}/utility" />
|
||||
|
||||
<if>
|
||||
<available file="${plugin.bin}" type="dir" />
|
||||
<then>
|
||||
<jar destfile="${jar.destfile}"
|
||||
manifest="${plugin.base}/META-INF/MANIFEST.MF">
|
||||
<fileset dir="${plugin.bin}"
|
||||
includes="**/*.class" />
|
||||
<fileset dir="${plugin.base}"
|
||||
includes="res/**/*" />
|
||||
<fileset dir="${plugin.base}"
|
||||
includes="META-INF/**/*" />
|
||||
<fileset dir="${plugin.base}"
|
||||
includes="*.py" />
|
||||
</jar>
|
||||
</then>
|
||||
<else>
|
||||
<jar destfile="${jar.destfile}"
|
||||
manifest="${plugin.base}/META-INF/MANIFEST.MF">
|
||||
<fileset dir="${plugin.base}"
|
||||
includes="res/**/*" />
|
||||
<fileset dir="${plugin.base}"
|
||||
includes="META-INF/**/*" />
|
||||
<fileset dir="${plugin.base}"
|
||||
includes="*.py" />
|
||||
</jar>
|
||||
</else>
|
||||
</if>
|
||||
<jarPlugin
|
||||
plugin.directory323="${plugin.base}"
|
||||
jar.file323="${jar.destfile}" />
|
||||
|
||||
<!-- copy the utility (localization) files. -->
|
||||
<if>
|
||||
|
@ -157,4 +133,80 @@
|
|||
</if>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<macrodef name="jarPlugin">
|
||||
<!--
|
||||
random character suffixes added to
|
||||
maintain uniqueness of variable names
|
||||
-->
|
||||
<attribute name="plugin.directory323" />
|
||||
<attribute name="jar.file323" />
|
||||
|
||||
<sequential>
|
||||
<!--
|
||||
initial jar file: currently we make the assumption
|
||||
every plugin has a manifest file.
|
||||
-->
|
||||
<jar destfile="@{jar.file323}"
|
||||
manifest="@{plugin.directory323}/META-INF/MANIFEST.MF" />
|
||||
|
||||
<!-- scan build.properties -->
|
||||
<var file="@{plugin.directory323}/build.properties" />
|
||||
|
||||
<!--
|
||||
* iterate through bin.includes
|
||||
* '.' is seen as the ${output..} directory, itself
|
||||
* artifacts are only deployed if they are present
|
||||
-->
|
||||
<for list="${bin.includes}" param="include"
|
||||
delimiter="," trim="true">
|
||||
<sequential>
|
||||
<if>
|
||||
<available file="@{plugin.directory323}/@{include}"
|
||||
type="dir" />
|
||||
<then>
|
||||
<!-- deploy a directory -->
|
||||
|
||||
<!-- is this the output directory? -->
|
||||
<if>
|
||||
<equals arg1="@{include}" arg2="." />
|
||||
<then>
|
||||
<jar destfile="@{jar.file323}" update="true">
|
||||
<fileset
|
||||
dir="@{plugin.directory323}/${output..}"
|
||||
includes="**" />
|
||||
</jar>
|
||||
</then>
|
||||
<else>
|
||||
<jar destfile="@{jar.file323}" update="true">
|
||||
<fileset
|
||||
dir="@{plugin.directory323}"
|
||||
includes="@{include}/**" />
|
||||
</jar>
|
||||
</else>
|
||||
</if>
|
||||
</then>
|
||||
<else>
|
||||
<!-- are we deploying a file? -->
|
||||
<if>
|
||||
<available file="@{plugin.directory323}/@{include}"
|
||||
type="file" />
|
||||
<then>
|
||||
<jar destfile="@{jar.file323}" update="true">
|
||||
<fileset
|
||||
file="@{plugin.directory323}/@{include}" />
|
||||
</jar>
|
||||
</then>
|
||||
<else>
|
||||
<!-- fail: unknown deployment artifact -->
|
||||
<fail
|
||||
message="Unable to deploy '@{include}' specified in @{plugin.directory323}/build.properties; unable to find the file / directory." />
|
||||
</else>
|
||||
</if>
|
||||
</else>
|
||||
</if>
|
||||
</sequential>
|
||||
</for>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</project>
|
|
@ -1,5 +1,4 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
plugin.xml
|
||||
.
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
res
|
||||
.
|
||||
|
|
Loading…
Add table
Reference in a new issue