2002-10-28 22:36:20 +00:00
|
|
|
<project basedir="." default="nbm" name="PMD netbeans module">
|
2003-04-18 01:16:05 +00:00
|
|
|
|
2004-05-26 10:04:37 +00:00
|
|
|
<property name="pmd.jar" value="pmd-1.8.jar"/>
|
|
|
|
|
|
|
|
<property file="build.ant.properties"/>
|
2003-08-12 23:23:42 +00:00
|
|
|
<property name="keystore" value="${user.home}/.pmdkeystore"/>
|
2003-06-15 11:39:36 +00:00
|
|
|
<property name="storepass" value="?"/>
|
2003-04-18 01:16:05 +00:00
|
|
|
|
2002-11-03 14:22:41 +00:00
|
|
|
<target description="Compiles all java files and copies property files to the classes dir" name="compile">
|
|
|
|
<mkdir dir="build/classes"/>
|
2004-05-26 10:04:37 +00:00
|
|
|
<javac debug="on" debuglevel="source,lines,vars" deprecation="on" destdir="build/classes" srcdir="src">
|
2002-11-03 14:22:41 +00:00
|
|
|
<include name="**/*.java"/>
|
|
|
|
<classpath>
|
2004-05-26 10:04:37 +00:00
|
|
|
<!-- Copy this one from the openide/netbeans/lib directory -->
|
2002-11-03 14:22:41 +00:00
|
|
|
<pathelement path="lib/openide.jar"/>
|
2004-05-26 10:04:37 +00:00
|
|
|
<!-- Copy this one from the openide/loaders/netbeans/lib directory -->
|
|
|
|
<pathelement path="lib/openide-loaders.jar"/>
|
|
|
|
<!-- Copy these three from the openide/io/netbeans/modules/autoload directory -->
|
2003-04-11 01:16:12 +00:00
|
|
|
<pathelement path="lib/openide-io.jar"/>
|
2004-05-26 10:04:37 +00:00
|
|
|
<!-- .. from java/api -->
|
2003-04-11 01:16:12 +00:00
|
|
|
<pathelement path="lib/java-api.jar"/>
|
|
|
|
<pathelement path="lib/java-src-model.jar"/>
|
2003-04-18 01:16:05 +00:00
|
|
|
<pathelement path="lib/${pmd.jar}"/>
|
2003-03-31 21:57:17 +00:00
|
|
|
<pathelement path="lib/jakarta-oro-2.0.jar"/>
|
2002-11-03 14:22:41 +00:00
|
|
|
</classpath>
|
|
|
|
</javac>
|
|
|
|
<copy todir="build/classes">
|
|
|
|
<fileset dir="src">
|
|
|
|
<include name="**/*"/>
|
|
|
|
<exclude name="**/*.java"/>
|
|
|
|
<exclude name="**/.nbattrs"/>
|
|
|
|
<exclude name="manifest.mf"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
</target>
|
2003-04-18 01:16:05 +00:00
|
|
|
|
2002-11-03 14:22:41 +00:00
|
|
|
<target depends="compile" description="Creates the jar" name="jars">
|
2003-04-18 01:16:05 +00:00
|
|
|
<mkdir dir="work"/>
|
|
|
|
<copy file="src/manifest.mf" tofile="work/manifest-filtered.mf">
|
|
|
|
<filterset>
|
|
|
|
<filter token="pmd.jar" value="${pmd.jar}"/>
|
|
|
|
</filterset>
|
|
|
|
</copy>
|
|
|
|
<jar compress="false" jarfile="build/pmd.jar" manifest="work/manifest-filtered.mf">
|
2002-11-03 14:22:41 +00:00
|
|
|
<fileset dir="build/classes">
|
|
|
|
<include name="**/*"/>
|
|
|
|
</fileset>
|
2003-02-15 19:06:50 +00:00
|
|
|
</jar>
|
2003-04-18 01:16:05 +00:00
|
|
|
<delete dir="work"/>
|
2003-02-15 19:06:50 +00:00
|
|
|
</target>
|
|
|
|
<target depends="jars" description="Prepare the module for distribution via Auto Update." name="nbm">
|
2004-05-26 10:04:37 +00:00
|
|
|
<taskdef classname="org.netbeans.nbbuild.MakeNBM" classpath="lib/nbantext-3.6.jar" name="makenbm"/>
|
2003-02-15 19:06:50 +00:00
|
|
|
<mkdir dir="build/temp_distribution/netbeans/modules/ext"/>
|
|
|
|
<copy file="build/pmd.jar" tofile="build/temp_distribution/netbeans/modules/pmd.jar"/>
|
2003-04-18 01:16:05 +00:00
|
|
|
<copy file="lib/${pmd.jar}" tofile="build/temp_distribution/netbeans/modules/ext/${pmd.jar}"/>
|
2003-03-24 22:28:38 +00:00
|
|
|
<copy file="lib/saxpath-1.0-fcs.jar" tofile="build/temp_distribution/netbeans/modules/ext/saxpath-1.0-fcs.jar"/>
|
2003-03-31 21:57:17 +00:00
|
|
|
<copy file="lib/jakarta-oro-2.0.jar" tofile="build/temp_distribution/netbeans/modules/ext/jakarta-oro-2.0.jar"/>
|
2003-03-24 22:28:38 +00:00
|
|
|
<copy file="lib/jaxen-core-1.0-fcs.jar" tofile="build/temp_distribution/netbeans/modules/ext/jaxen-core-1.0-fcs.jar"/>
|
2004-05-26 10:04:37 +00:00
|
|
|
<makenbm file="build/pmd.nbm" homepage="http://pmd.sourceforge.net/"
|
|
|
|
module="build/pmd.jar" topdir="build/temp_distribution"
|
|
|
|
needsrestart="false" distribution="http://www.netbeans.org/example/pmd.nbm">
|
2003-02-15 19:06:50 +00:00
|
|
|
<license file="LICENSE.txt"/>
|
2003-06-15 11:39:36 +00:00
|
|
|
<signature keystore="${keystore}" storepass="${storepass}" alias="pmdkey"/>
|
2003-02-15 19:06:50 +00:00
|
|
|
</makenbm>
|
|
|
|
</target>
|
|
|
|
<target depends="clean, nbm" description="Builds the distribution" name="distribution">
|
2003-04-24 11:05:56 +00:00
|
|
|
<zip compress="true" destfile="build/pmd-netbeans35-src-${VERSION}.zip">
|
2003-02-15 19:06:50 +00:00
|
|
|
<zipfileset dir=".">
|
|
|
|
<include name="*.txt"/>
|
|
|
|
<include name="build.xml"/>
|
|
|
|
<include name="src/**/*"/>
|
2003-08-12 23:23:42 +00:00
|
|
|
<include name="lib/${pmd.jar}"/>
|
2003-02-15 19:06:50 +00:00
|
|
|
<include name="lib/nbantext.jar"/>
|
2003-03-24 22:28:38 +00:00
|
|
|
<include name="lib/saxpath-1.0-fcs.jar"/>
|
|
|
|
<include name="lib/jaxen-core-1.0-fcs.jar"/>
|
2003-03-31 21:57:17 +00:00
|
|
|
<include name="lib/jakarta-oro-2.0.jar"/>
|
2003-02-15 19:06:50 +00:00
|
|
|
<exclude name="**/.nbattrs"/>
|
|
|
|
</zipfileset>
|
2003-04-11 01:16:12 +00:00
|
|
|
<zipfileset dir="." fullpath="pmd.nbm" includes="build/pmd.nbm"/>
|
2003-02-15 19:06:50 +00:00
|
|
|
</zip>
|
2003-04-24 11:05:56 +00:00
|
|
|
<zip compress="true" destfile="build/pmd-netbeans35-bin-${VERSION}.zip">
|
2003-02-15 19:06:50 +00:00
|
|
|
<zipfileset dir=".">
|
|
|
|
<include name="*.txt"/>
|
|
|
|
</zipfileset>
|
2003-04-11 01:16:12 +00:00
|
|
|
<zipfileset dir="." fullpath="pmd.nbm" includes="build/pmd.nbm"/>
|
2003-02-15 19:06:50 +00:00
|
|
|
</zip>
|
2002-11-03 14:22:41 +00:00
|
|
|
</target>
|
|
|
|
<target description="Clean all build products." name="clean">
|
|
|
|
<delete dir="build"/>
|
|
|
|
</target>
|
2002-10-28 22:36:20 +00:00
|
|
|
</project>
|