Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>What you'll probably want is to modify the build.xml file which is present in your project directories. Netbeans uses Apache Ant as the tool which executes the build process. Ant is an XML based script. It's split into multiple files in Netbeans but the only one you should modify is build.xml. </p> <p>Read the comments in this file. They suggest that you should override certain targets to adjust the build process to suit your needs. For example we use the “-post-jar” target to create the entire install directory of our products inside the “dist” directory. As for non-absolute paths, I don't think you'll be able to achieve that but you can copy stuff to locations relative to your project directories. I would be entirely possible to have a common dist directory for multiple Netbeans projects.</p> <p>The following would probably (haven't tested it) copy your project's JAR to "commonBuildDir" directory which should be located at the same level as your project directories.</p> <pre class="lang-xml prettyprint-override"><code>&lt;target name="-post-jar"&gt; &lt;property name="common.build.dir" location="${build.dir}/../../commonBuildDir"/&gt; &lt;copy todir="${common.build.dir}" preservelastmodified="true"&gt; &lt;fileset file="${dist.jar}"/&gt; &lt;/copy&gt; &lt;/target&gt; </code></pre> <p><code>${build.dir}</code> references an Ant property, in this case a predefined one which points to the build directory of the project. Same goes for <code>${dist.jar}</code> which references the location of your project's JAR file. Behind the sceenes these are all absolute paths if I remember correctly.</p> <p><a href="http://netbeans.org/kb/docs/java/project-setup.html#build-script" rel="nofollow">Customizing Netbeans Build Script</a></p> <p><a href="http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html" rel="nofollow">Ant Tutorial</a></p> <p>I think this should get you started to customize your build process the way you wish.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload