If the build.xml file does not yet have a target that creates the jar file, you can read the ant jar command here:
However, there is probably a good chance the build file is already doing this for you.
You can start the build script by typing ant when you are in the directory that contains the build.xml file (after unpacking the banner).
Just for fun, here is an example of a simple ant target that compiles some code and creates a jar.
This goal will compile every .java file in any folder with report names.
As you can see, most values use variables defined elsewhere in the script, but hopefully you get this idea ...
<target name="create-funky-jar" depends="some-other-funky-targets"> <javac srcdir="${src.dir}" includes="**/reports/*.java" destdir="${build.classes.dir}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false"> <classpath> <path path="${javac.classpath}:${j2ee.platform.classpath}"/> </classpath> </javac> <jar destfile="${dist.dir}/SomeFunkyJar.jar" basedir="${build.classes.dir}" includes="**/reports/*.class"/> </target>
The above was created only by modifying the assembly of the script generated by NetBeans.
You can run the above object by adding it to the build.xml file and entering the following at the command line:
ant create-funky-jar
Note. You will need to define all the variables in order for it to actually work.
source share