6

I'm working on a multiproject solution for a client and we're trying to have all our builds automatically go into a predetermined BIN folder. All the C++ projects were easily enough moved over but the Java side has proven not so easily configured. When I go to the project's properties and go to Build->Packaging the "JAR File:" text box shows a read-only text-box pointing to "dist/App.jar" (which I would like to change to "../../../bin/App.jar". Any thoughts on how to do this?

3 Answers 3

16

You can change the dist-folder by editing the dist.dir key in the project.propertiesfile which is located in the nbproject directory from

dist.dir=dist

to

dist.dir=../../../bin

In my case the key is in line 24. The name of the jar-file itself is determined by the dist.jar key, if you would need to rename the file aswell.

3
  • Like a charm! Thanks Pit! Strange how they don't let you do it through the "properties" dialog... Jun 22, 2011 at 15:10
  • You can view it in the properties-dialog, but not change it. Definitely something they have to change in future versions! I'm glad I could help ;)
    – Pit
    Jun 22, 2011 at 15:26
  • It's important to mantion that the directory at this path will be totally cleaned(all files removed).
    – SkySurfer
    Mar 12, 2015 at 9:01
2

add into build.xml

<target name="-post-jar">
    <copy file="${dist.jar}" todir="drive\path\"/>
</target>
1

Did you check under the menu

[Run] --> [Set project configuration] --> [Customize]
You have plenty of options to change there, it is easy than that.

Good luck

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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