pmd/pmd-jdeveloper/etc/build.xml
Tom Copeland 9d6205a9d8 Release preps
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2388 51baf565-9d33-0410-a72c-fc3788e3496d
2003-11-17 22:20:47 +00:00

75 lines
2.9 KiB
XML

<project name="pmd-jdeveloper" default="compile" basedir="../">
<property name="config" value="config/"/>
<property name="src" value="src/"/>
<property name="lib" value="lib/"/>
<property name="etc" value="etc/"/>
<property name="build" value="build/"/>
<property name="pmdjar" value="pmd-1.3.jar"/>
<property name="pluginversion" value="0.7"/>
<property name="jdeveloper.install.dir" value="/home/tom/jdev/jdev/lib/ext/${ant.project.name}-${pluginversion}"/>
<path id="project.class.path">
<pathelement location="${lib}/${pmdjar}"/>
<pathelement location="${lib}/jdeveloper.jar"/>
<pathelement location="${build}"/>
</path>
<target name="delete">
<delete file="${lib}/${ant.project.name}.jar"/>
<delete file="${jdeveloper.install.dir}/${ant.project.name}.jar"/>
<delete dir="${build}"/>
<mkdir dir="${build}"/>
</target>
<target name="compile">
<javac
srcdir="${src}"
destdir="${build}"
debug="on"
deprecation="on">
<classpath refid="project.class.path"/>
</javac>
</target>
<target name="jar" depends="compile">
<replace file="${etc}/Manifest.mf" token="#pluginversion#" value="${pluginversion}"/>
<jar jarfile="${lib}/${ant.project.name}-${pluginversion}.jar" manifest="${etc}\Manifest.mf">
<fileset dir="${build}" excludes="**/*.di,**/*.i"/>
</jar>
</target>
<target name="dist" depends="delete,jar">
<mkdir dir="${jdeveloper.install.dir}/lib"/>
<copy file="${lib}/${ant.project.name}-${pluginversion}.jar" todir="${jdeveloper.install.dir}/lib"/>
<copy file="${lib}/${pmdjar}" todir="${jdeveloper.install.dir}/lib"/>
<copy file="${lib}/saxpath-1.0-fcs.jar" todir="${jdeveloper.install.dir}/lib"/>
<copy file="${lib}/jaxen-core-1.0-fcs.jar" todir="${jdeveloper.install.dir}/lib"/>
</target>
<target name="release" depends="clean,jar">
<mkdir dir="tmp/${ant.project.name}-${pluginversion}/lib"/>
<copy file="${lib}/${ant.project.name}-${pluginversion}.jar" todir="tmp/${ant.project.name}-${pluginversion}/lib/"/>
<copy file="${lib}/${pmdjar}" todir="tmp/${ant.project.name}-${pluginversion}/lib/"/>
<copy file="${lib}/saxpath-1.0-fcs.jar" todir="tmp/${ant.project.name}-${pluginversion}/lib"/>
<copy file="${lib}/jaxen-core-1.0-fcs.jar" todir="tmp/${ant.project.name}-${pluginversion}/lib"/>
<zip zipfile="pmd-jdeveloper-bin-${pluginversion}.zip" basedir="tmp/"/>
<move file="pmd-jdeveloper-bin-${pluginversion}.zip" todir="/home/tom/tmp"/>
<delete dir="tmp"/>
</target>
<target name="clean" depends="delete,compile">
</target>
<target name="tomserver" depends="release">
<echo message="Uploading zip file"/>
<exec executable="scp" os="Linux">
<arg line=" /home/tom/tmp/pmd-jdeveloper-bin-${pluginversion}.zip tom@infoether.com:public_html/"/>
</exec>
</target>
</project>