Building Netbeans 5.0 NBMs for an entire suite
Creating NBMs (or Netbeans 5.0 Pluggins) for a large number of modules can be quite annoying. I decided to write my own ant task so that it will build all the modules in a suite and put the subsequent nbms into a local nbm directory. I figured others might be interested in these codes lines that can be added to your build.xml in your suite.
Make sure to add the following taskdef. You can get the foreach task as defined in nbbuild of the netbeans src. The following clip was taken from nbbuild/build.xml
<taskdef name="for-each" classname="org.netbeans.nbbuild.ForEach" classpath="nbantext.jar"/>
Here is the build-nbm-pack:
<target name="build-nbm-pack" depends="init" description="Builds all modules into nbms">
<delete dir="nbms"/>
<mkdir dir="nbms" />
<loadproperties srcFile="../mysuite/nbproject/project.properties">
<filterchain>
<tokenfilter>
<deletecharacters chars=".."/>
</tokenfilter>
</filterchain>
</loadproperties>
<for-each startdir=".." target="nbm" locations="${modules}" propertyna
me="nbm.target.dir" propertyvalue="${basedir}/nbms"/>
</target>
Posted at
10:24AM Feb 08, 2006
by joellelam in Sun |