Reputation: 3252
I added the following to my build.xml file in a netbeans project to have all the files in the resources directory be added to the JAR file generated.
<target name="-post-jar">
<echo>Adding files to jar...</echo>
<jar destfile="${dist.jar}" update="true">
<fileset dir="${basedir}/resources" />
</jar>
</target>
However after I perform a clean, and then do a build. I see the output of the echo command, but the generated jar file lacks all the files in the resources directory. On performing another build however, these files are included. How can I rectify this?
Upvotes: 2
Views: 90
Reputation: 3252
Paulo Ebermann was correct. The JNLP target was recreating my jar file, which was what was causing the error.
Upvotes: 1