Suppose you have a directory in your sandbox you would like to add to the distro. This could be source code from an OpenSource project you have edited and hence have to make public, or some other directories. You may already have choosen to add the target build-launchers to copy those to the build directory like:
<target name="build-launchers" depends="suite.build-launchers">
<copy todir="${build.launcher.dir}">
<fileset dir="MyExtraDirectory"/>
</copy>
</target>
<copy todir="${build.launcher.dir}">
<fileset dir="MyExtraDirectory"/>
</copy>
</target>
You can hereafter add the target which will add this directory to the zip file build simply by leveraging ant commands
<!-- Customized build-zip target to copy reports to the distribution -->
<target name="build-zip" depends=quot;suite.build-zip">
<!-- Update the just created ZIP with additional directories/data -->
<echo message="Adding MyExtraDirectory ..."/>
<zip destfile="${dist.dir}/${app.
<zipfileset dir="${build.launcher.dir}/MyExtraDirectory/" prefix="${app.name}/MyExtraDirectory"/>
</zip>
</target>
</target>
No comments:
Post a Comment