awips2/javaUtilities/build.openfire.plugin/ant/abstract/abstract_setup.xml
Steve Harris c9b563338a 12.11.1-4 baseline
Former-commit-id: 6e44abdba1 [formerly 98171b5de9] [formerly d3497e47eb] [formerly 6958b861f0 [formerly d3497e47eb [formerly dddf20c9518c578d1bebd0b5e01b10c5080fd24e]]]
Former-commit-id: 6958b861f0
Former-commit-id: d50a176f97de36460cafeb5bb47f7dc824e33ce1 [formerly cbbdb231ce]
Former-commit-id: 2c82d9cb07
2012-10-16 13:27:07 -05:00

90 lines
No EOL
2.6 KiB
XML

<!--
Setup will copy the plugin to the openfire source plugins directory.
Setup will also rearrange the source directories to match the openfire
plugin source directory layout. And, setup will copy dependent libraries
to the lib directory of the plugin.
-->
<project>
<!-- The following properties are provided externally as arguments. -->
<property name="baseline.dir"
value="" />
<property name="openfire.src.dir"
value="" />
<property name="plugin.name"
value="" />
<!-- END OF PROPERTIES -->
<target name="init">
<!-- copy the plugin to the openfire source plugins directory. -->
<mkdir dir="${openfire.src.dir}/src/plugins/${plugin.name}" />
<copy todir="${openfire.src.dir}/src/plugins/${plugin.name}">
<fileset dir="${baseline.dir}/${plugin.name}" />
</copy>
</target>
<target name="setup" depends="init">
<!-- re-arrange the source directories -->
<!--
pluginDir/
|- src/
|- database
|- java
|- web
-->
<mkdir dir="${openfire.src.dir}/src/plugins/${plugin.name}/src" />
<if>
<available
file="${openfire.src.dir}/src/plugins/${plugin.name}/java"
type="dir" />
<then>
<move todir="${openfire.src.dir}/src/plugins/${plugin.name}/src/java">
<fileset dir="${openfire.src.dir}/src/plugins/${plugin.name}/java" />
</move>
</then>
</if>
<if>
<available
file="${openfire.src.dir}/src/plugins/${plugin.name}/database"
type="dir" />
<then>
<move todir="${openfire.src.dir}/src/plugins/${plugin.name}/src/database">
<fileset dir="${openfire.src.dir}/src/plugins/${plugin.name}/database" />
</move>
</then>
</if>
<if>
<available
file="${openfire.src.dir}/src/plugins/${plugin.name}/web"
type="dir" />
<then>
<move todir="${openfire.src.dir}/src/plugins/${plugin.name}/src/web">
<fileset dir="${openfire.src.dir}/src/plugins/${plugin.name}/web" />
</move>
</then>
</if>
<!-- create the lib directory -->
<mkdir dir="${openfire.src.dir}/src/plugins/${plugin.name}/lib" />
<!-- copy the dependencies -->
<!--
TODO: will need to adjust this logic if we ever have a
dependency that is not a FOSS project.
-->
<for list="${plugin.dependent.libs}" param="plugin">
<sequential>
<copy todir="${openfire.src.dir}/src/plugins/${plugin.name}/lib">
<fileset dir="${baseline.dir}/@{plugin}">
<include name="**/*.jar" />
</fileset>
</copy>
</sequential>
</for>
</target>
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${build.dir.location}/ant/lib/ant-contrib-1.0b3.jar" />
</project>