2

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?

1
  • It looks like you are recreating the jar in another target after adding your files in this one. Check this. Feb 21, 2011 at 13:52

1 Answer 1

1

Paulo Ebermann was correct. The JNLP target was recreating my jar file, which was what was causing the error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.