pmd/pmd-jdeveloper/etc/build.xml
2005-10-27 01:21:52 +00:00

96 lines
3.9 KiB
XML

<project name="pmd-jdeveloper" default="compile" basedir="../">
<property name="config" value="config/"/>
<property name="src" value="src/"/>
<property name="etc" value="etc/"/>
<property name="pmdjar" value="pmd-3.3.jar"/>
<property name="pluginversion" value="1.7"/>
<property name="jdeveloper9052.install.dir" value="/home/tom/jdev9052/jdev/lib/ext/${ant.project.name}-${pluginversion}"/>
<property name="jdeveloper1012.install.dir" value="c:/data/jdev1012/jdev/lib/ext/${ant.project.name}-${pluginversion}"/>
<path id="project.class.path">
<pathelement location="lib/${pmdjar}"/>
<pathelement location="lib/jdeveloper.jar"/>
<pathelement location="lib/javatools.jar"/>
<pathelement location="lib/ide.jar"/>
<pathelement location="build"/>
</path>
<target name="delete">
<delete file="lib/${ant.project.name}.jar"/>
<delete file="${jdeveloper9052.install.dir}/${ant.project.name}.jar"/>
<delete file="${jdeveloper1012.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="jarall" depends="compile">
<jar jarfile="lib/${ant.project.name}-${pluginversion}.jar">
<fileset dir="build" excludes="**/*.di,**/*.i"/>
</jar>
</target>
<target name="jar1012" depends="compile">
<copy file="etc/jdev1012-ext.xml" tofile="build/meta-inf/jdev-ext.xml"/>
<antcall target="jarall"/>
</target>
<target name="jar9052" depends="compile">
<copy file="etc/jdev9052-ext.xml" tofile="build/meta-inf/jdev-ext.xml"/>
<antcall target="jarall"/>
</target>
<target name="deploy1012" depends="delete,jar1012">
<mkdir dir="${jdeveloper1012.install.dir}/lib"/>
<copy file="lib/${ant.project.name}-${pluginversion}.jar" todir="${jdeveloper1012.install.dir}/lib"/>
<copy file="lib/${pmdjar}" todir="${jdeveloper1012.install.dir}/lib"/>
<copy file="lib/jaxen-1.1-beta-7.jar" todir="${jdeveloper1012.install.dir}/lib"/>
</target>
<target name="deploy9052" depends="delete,jar9052">
<mkdir dir="${jdeveloper9052.install.dir}/lib"/>
<copy file="lib/${ant.project.name}-${pluginversion}.jar" todir="${jdeveloper9052.install.dir}/lib"/>
<copy file="lib/${pmdjar}" todir="${jdeveloper9052.install.dir}/lib"/>
<copy file="lib/jaxen-1.1-beta-7.jar" todir="${jdeveloper9052.install.dir}/lib"/>
</target>
<target name="releaseall">
<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/jaxen-1.1-beta-7.jar" todir="tmp/${ant.project.name}-${pluginversion}/lib"/>
</target>
<target name="release1012" depends="clean,jar1012,releaseall">
<zip zipfile="pmd-jdeveloper1012-bin-${pluginversion}.zip" basedir="tmp/"/>
<move file="pmd-jdeveloper1012-bin-${pluginversion}.zip" todir="/home/tom/tmp"/>
<delete dir="tmp"/>
</target>
<target name="release9052" depends="clean,jar9052,releaseall">
<zip zipfile="pmd-jdeveloper9052-bin-${pluginversion}.zip" basedir="tmp/"/>
<move file="pmd-jdeveloper9052-bin-${pluginversion}.zip" todir="/home/tom/tmp"/>
<delete dir="tmp"/>
</target>
<target name="clean" depends="delete,compile">
</target>
<target name="tomserver1012" depends="release1012">
<echo message="Uploading zip file"/>
<exec executable="scp" os="Linux">
<arg line=" /home/tom/tmp/pmd-jdeveloper1012-bin-${pluginversion}.zip tom@infoether.com:public_html/"/>
</exec>
</target>
</project>