pmd/pmd-netbeans/build.xml

65 lines
2.6 KiB
XML

<project basedir="." default="nbm" name="PMD netbeans module">
<property name="pmd.jar" value="pmd-2.1.jar"/>
<property name="VERSION" value="1.0"/>
<property file="build.ant.properties"/>
<property name="nbm.homepage" value="http://pmd.sourceforge.net/"/>
<property name="dist.base" value="www.netbeans.org/example"/> <!-- XXX what should be here? -->
<property name="nbm.module.author" value="Ole-Martin Mørk and Gunnlaugur Þór Briem"/>
<property name="license.file" value="LICENSE.txt"/>
<property name="keystore" value="${user.home}/.pmdkeystore"/>
<import file="../nbbuild/module-scripts/projectized.xml"/>
<target name="files-init" depends="basic-init">
<patternset id="module.files">
<include name="${module.jar}"/>
<include name="${javahelp.jar}" if="has.javahelp"/>
<include name="${nb.system.dir}/Modules/${code.name.base.dashes}.xml"/>
<include name="${nb.modules.dir}/ext/${pmd.jar}"/>
<include name="${nb.modules.dir}/ext/saxpath-1.0-fcs.jar"/>
<include name="${nb.modules.dir}/ext/jakarta-oro-2.0.jar"/>
<include name="${nb.modules.dir}/ext/jaxen-core-1.0-fcs.jar"/>
</patternset>
</target>
<target name="netbeans-extra" depends="init">
<mkdir dir="${netbeans.dest.dir}/${cluster.dir}/${nb.modules.dir}/ext"/>
<copy todir="${netbeans.dest.dir}/${cluster.dir}/${nb.modules.dir}/ext">
<fileset dir="lib">
<include name="${pmd.jar}"/>
<include name="saxpath-1.0-fcs.jar"/>
<include name="jakarta-oro-2.0.jar"/>
<include name="jaxen-core-1.0-fcs.jar"/>
</fileset>
</copy>
</target>
<target depends="clean, nbm" description="Builds the distribution" name="distribution">
<fail unless="VERSION" message="Must define VERSION property with the version number for this distribution!"/>
<zip compress="true" destfile="build/pmd-netbeans40-${VERSION}-src.zip">
<zipfileset dir=".">
<include name="*.txt"/>
<include name="build.xml"/>
<include name="src/**/*"/>
<include name="lib/${pmd.jar}"/>
<include name="lib/saxpath-1.0-fcs.jar"/>
<include name="lib/jaxen-core-1.0-fcs.jar"/>
<include name="lib/jakarta-oro-2.0.jar"/>
<exclude name="**/.nbattrs"/>
</zipfileset>
<zipfileset dir="." fullpath="pmd.nbm" includes="build/pmd.nbm"/>
</zip>
<zip compress="true" destfile="build/pmd-netbeans40-${VERSION}-bin.zip">
<zipfileset dir=".">
<include name="*.txt"/>
</zipfileset>
<zipfileset dir="." fullpath="pmd.nbm" includes="build/pmd.nbm"/>
</zip>
</target>
</project>