pmd/pmd-netbeans/build.xml
Ole-Martin Mork e93c90fec3 Fixes for the 0.4 version
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1205 51baf565-9d33-0410-a72c-fc3788e3496d
2002-11-05 22:04:57 +00:00

70 lines
3.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="nbm" name="PMD netbeans module">
<target description="Compiles all java files and copies property files to the classes dir" name="compile">
<mkdir dir="build/classes"/>
<javac debug="on" debuglevel="source,lines" deprecation="on" destdir="build/classes" srcdir="src">
<include name="**/*.java"/>
<classpath>
<!-- Download from www.netbeans.org or if you have netbeans installed, run the autoupdate -->
<!-- of openide module. The jar will be at <netbeans_home/lib/openide.jar -->
<!-- todo: Check out the license file, if the jar can be distributed with this module -->
<pathelement path="lib/openide.jar"/>
<pathelement path="lib/pmd-1.0.jar"/>
</classpath>
</javac>
<copy todir="build/classes">
<fileset dir="src">
<include name="**/*"/>
<exclude name="**/*.java"/>
<exclude name="**/.nbattrs"/>
<exclude name="manifest.mf"/>
</fileset>
</copy>
</target>
<target depends="compile" description="Creates the jar" name="jars">
<jar compress="false" jarfile="build/pmd.jar" manifest="src/manifest.mf">
<fileset dir="build/classes">
<include name="**/*"/>
</fileset>
</jar>
</target>
<target depends="jars" description="Prepare the module for distribution via Auto Update." name="nbm">
<!-- Download the source distribution from http://www.netbeans.org/devhome/download.html -->
<!-- And run nbbuild/ ant bootstrap to generate this file. You may need some extra libraries to do -->
<!-- so. Check out http://www.netbeans.org/devhome/sources/index.html#extbins to find out what you need -->
<!-- todo: Check out the license for this file, the building of this jar is rather complicated -->
<taskdef classname="org.netbeans.nbbuild.MakeNBM" classpath="lib\nbantext.jar" name="makenbm"/>
<mkdir dir="build/temp_distribution/netbeans/modules/ext"/>
<copy file="build/pmd.jar" tofile="build/temp_distribution/netbeans/modules/pmd.jar"/>
<copy file="lib/pmd-1.0.jar" tofile="build/temp_distribution/netbeans/modules/ext/pmd-1.0.jar"/>
<makenbm file="build/pmd.nbm" homepage="http://pmd.sourceforge.net" module="build/pmd.jar" topdir="build/temp_distribution">
<license file="LICENSE.txt"/>
</makenbm>
<delete dir="build/temp_distribution"/>
</target>
<target depends="clean, nbm" description="Builds the distribution" name="distribution">
<zip compress="true" destfile="build\pmd-netbeans-bin-${VERSION}.zip">
<zipfileset dir=".">
<include name="*.txt"/>
</zipfileset>
<zipfileset dir="." fullpath="pmd.nbm" includes="build\pmd.nbm"/>
</zip>
<zip compress="true" destfile="build\pmd-netbeans-src-${VERSION}.zip">
<zipfileset dir=".">
<include name="*.txt"/>
<include name="build.xml"/>
<include name="src/**/*"/>
<exclude name="**/.nbattrs"/>
</zipfileset>
<zipfileset dir="lib" prefix="lib">
<exclude name="openide.jar"/>
<exclude name="nbantext.jar"/>
</zipfileset>
<zipfileset dir="." fullpath="pmd.nbm" includes="build\pmd.nbm"/>
</zip>
</target>
<target description="Clean all build products." name="clean">
<delete dir="build"/>
</target>
</project>