I have an ant build.xml script. In order to run my application, it requires external libraries.
I am able to successfully run ant clean jar in the command prompt, and in the -do-jar-copylibs function the libraries are copied, the jar is built, and the jar can be ran by java -jar jarfile.jar This is ran on code that I have extracted manually from svn.
The issue comes when I use a script to svn export the code and build file from svn to the C:/temp directory and then run ant clean jar the build of the application happens in -do-jar-jar instead of the -do-jar-copylibs . It doesn't copy all the libraries into the dist folder, it just builds the jar and tells me that the jar can be ran using java -jar "lots/of/libraries.jar" jarfile.jar mainclass
Does this have to do with permissions? I cannot find any answers to how to fix this. Maybe there is a way to set permissions of svn export
Any help is appreciated
Thanks.
Figured it out.
The
-do-jar-copylibsfunction relies on thelibs.CopyLibs.classpathproperty being set, if it is set correctly, thecondition property="do.mkdist"will result in true, which triggers the-do-jar-copylibsfunciton. If thecondition property="do.mkdist"is false, then the-do-jar-jarwill run instead.This classpath being set has to do with the
nbproject/private.propertiesfile. If I added the private directory to my svn export, the build packaged correctly. Another workaround is to define the classpath in your project.properties file.