120 lines
5.5 KiB
XML
Raw Normal View History

<project name="pmd-jdeveloper1013" default="compile" basedir="../">
<property name="config" value="config/"/>
<property name="src" value="src/"/>
<property name="etc" value="etc/"/>
<property name="pmdjar" value="pmd-3.5.jar"/>
<property name="pluginversion" value="1.8"/>
<property name="bundle.dirname" value="net.sourceforge.pmd.jdeveloper.${pluginversion}"/>
<property name="bundle.jarname" value="${bundle.dirname}.jar"/>
<property name="jdeveloper.install.dir" value="c:/data/jdev1013/jdev/lib/ext/${ant.project.name}-${pluginversion}"/>
<property name="linux.jdeveloper.install.dir" value="/home/tom/pmd/ides/jdev1013/jdev/extensions/"/>
<path id="project.class.path">
<pathelement location="lib/${pmdjar}"/>
<pathelement location="lib/javax-ide.jar"/>
<pathelement location="lib/javatools.jar"/>
<pathelement location="lib/ide.jar"/>
<pathelement location="lib/ojc.jar"/>
<pathelement location="lib/jdev.jar"/>
<pathelement location="build"/>
</path>
<target name="delete">
<delete file="lib/${ant.project.name}.jar"/>
<delete dir="build"/>
<mkdir dir="build"/>
</target>
<target name="deletedeployed">
<delete dir="${linux.jdeveloper.install.dir}/${bundle.dirname}"/>
<delete file="${linux.jdeveloper.install.dir}/${bundle.jarname}"/>
</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">
<delete dir="build/META-INF/"/>
<mkdir dir="build/META-INF"/>
<copy file="etc/extension.xml" todir="build/META-INF/"/>
<jar jarfile="lib/${bundle.jarname}">
<fileset dir="build" excludes="**/*.di,**/*.i"/>
</jar>
</target>
<target name="deploy" 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/jaxen-1.1-beta-7.jar" todir="${jdeveloper.install.dir}/lib"/>
<copy file="lib/jakarta-oro-2.0.8.jar" todir="${jdeveloper.install.dir}/lib"/>
</target>
<target name="deploylinux" depends="delete,jar">
<mkdir dir="${linux.jdeveloper.install.dir}"/>
<copy file="lib/${bundle.jarname}" todir="${linux.jdeveloper.install.dir}"/>
<copy file="lib/${pmdjar}" todir="${linux.jdeveloper.install.dir}/net.sourceforge.pmd.jdeveloper.${pluginversion}/lib"/>
<copy file="lib/jaxen-1.1-beta-7.jar" todir="${linux.jdeveloper.install.dir}/net.sourceforge.pmd.jdeveloper.${pluginversion}/lib"/>
<copy file="lib/jakarta-oro-2.0.8.jar" todir="${linux.jdeveloper.install.dir}/net.sourceforge.pmd.jdeveloper.${pluginversion}/lib"/>
</target>
<target name="release" depends="clean,jar">
<mkdir dir="tmp/${bundle.dirname}/lib"/>
<copy file="lib/${bundle.jarname}" todir="tmp/"/>
<copy file="lib/${pmdjar}" todir="tmp/${bundle.dirname}/lib"/>
<copy file="lib/jaxen-1.1-beta-7.jar" todir="tmp/${bundle.dirname}/lib"/>
<copy file="lib/jakarta-oro-2.0.8.jar" todir="tmp/${bundle.dirname}/lib"/>
<zip zipfile="${ant.project.name}-bin-${pluginversion}.zip" basedir="tmp/"/>
<move file="${ant.project.name}-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/${ant.project.name}-bin-${pluginversion}.zip tom@infoether.com:public_html/"/>
</exec>
</target>
<target name="bundle" depends="clean,jar,deletedeployed">
<delete dir="update-center-bundle/"/>
<mkdir dir="update-center-bundle/META-INF"/>
<copy file="etc/bundle.xml" todir="update-center-bundle/META-INF/"/>
<copy file="etc/center.xml" todir="update-center-bundle/"/>
<copy file="lib/${bundle.jarname}" todir="update-center-bundle/"/>
<copy file="lib/${pmdjar}" todir="update-center-bundle/net.sourceforge.pmd.jdeveloper.${pluginversion}/lib/"/>
<copy file="lib/jaxen-1.1-beta-7.jar" todir="update-center-bundle/net.sourceforge.pmd.jdeveloper.${pluginversion}/lib/"/>
<copy file="lib/jakarta-oro-2.0.8.jar" todir="update-center-bundle/net.sourceforge.pmd.jdeveloper.${pluginversion}/lib/"/>
<zip destfile="update-center-bundle/pmd-jdeveloper1013-${pluginversion}.zip" basedir="update-center-bundle">
<exclude name="center.xml"/>
</zip>
<copy file="update-center-bundle/pmd-jdeveloper1013-${pluginversion}.zip" todir="/home/tom/jdevhome/"/>
<delete>
<fileset dir="update-center-bundle" includes="*.jar"/>
</delete>
<delete dir="update-center-bundle/net.sourceforge.pmd.jdeveloper.${pluginversion}"/>
<delete dir="update-center-bundle/lib"/>
<delete dir="update-center-bundle/META-INF"/>
</target>
<target name="uploadbundle" depends="bundle">
<echo message="Uploading center.xml file"/>
<exec executable="scp" os="Linux">
<arg line=" update-center-bundle/center.xml tomcopeland@pmd.sf.net:/home/groups/p/pm/pmd/htdocs/"/>
</exec>
<exec executable="scp" os="Linux">
<arg line=" update-center-bundle/pmd-jdeveloper1013-${pluginversion}.zip tomcopeland@pmd.sf.net:/home/groups/p/pm/pmd/htdocs/"/>
</exec>
</target>
</project>