Create a new Netbeans wrapper module for JavaProject that rebuilds itself when it should. Using this increases change-build-run developement cycle.

What is wrong with normal Netbeans wizzard?

Nothing, unless you change the project that created the encapsulated jar in the first place, which we do a lot. Example: SposhCore JavaProject is encapsulated in PogamutNbUTSposhCore. When you change something in SposhCore and compile it, you have to replace the jar that is stored in PogamutNbUTSposhCore.


We'll call java project JP and wrapper module WM.

Create a WP from JP using NB wizzard.

Alter WM build.xml

Add following build.xml after <import file=“nbproject/build-impl.xml”/> and stuff

  <target name="release">
      <echo message="Building ${pogamutUT2004.dir}"/>
      <ant dir="${pogamutUT2004.dir}"
       target="jar" inheritall="false" inheritrefs="false"/>
      <echo message="Done building ${pogamutUT2004.dir}"/>
      <copy todir="${cluster}/modules/ext"
  <target name="clean" depends="projectized-common.clean">
      <echo message="Cleaning ${pogamutUT2004.dir}"/>
      <ant dir="${pogamutUT2004.dir}"
       target="clean" inheritall="false" inheritrefs="false"/>
      <echo message="Done cleaning ${pogamutUT2004.dir}"/>

Remember to change the paths and variables to suit your project. *

Alter WM Project.xml

* To WP Project.xml add


to /project/configuration/data

LDAP: couldn't connect to LDAP server
guidelines/adding_netbeans_wrapper_module_for_javaproject.txt · Last modified: 2011/12/22 14:58 by michal.bida