Below is a couple of additions I've made in the past to the build.xml files:
1). The below is one example of some file operations after deployment:
<target name="-post-deploy" depends="-post-jar">
<!-- Add your post JAR operations here -->
<echo message="Moving Autoexec.jar from lib to dist"/>
<!-- Example: Copy the JAR file to a different directory -->
<move file="dist/lib/Autoexec.jar" todir="dist/"/>
</target>
2). The below builds the javadoc into a jar file and also combines the Utilities-javadoc.jar and Utilities.jar files into a zip file Utilities-and-javadoc.jar.
<target name="-post-jar" description="bundle sources and javadoc in a jar" depends="javadoc">
<jar compress="${jar.compress}" basedir="${dist.javadoc.dir}" jarfile="${dist.dir}/${application.title}-javadoc.jar"/>
<!-- Combine the javadoc JAR and Utilities JAR -->
<zip destfile="${dist.dir}/${application.title}-and-javadoc.zip">
<fileset dir="${dist.dir}" includes="${application.title}-javadoc.jar" />
<fileset dir="${dist.dir}" includes="${application.title}.jar" />
</zip>
</target>
In both cases above, the -post-deploy and -post-jar refers to the placeholder sections in the nbproject/build-impl.xml file.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.