forked from phoedos/pmd
09e5bb4957
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@3980 51baf565-9d33-0410-a72c-fc3788e3496d
90 lines
3.2 KiB
XML
90 lines
3.2 KiB
XML
<project name="pmd-jbuilder" default="compile" basedir="../">
|
|
|
|
<property name="dir.lib" value="lib\"/>
|
|
<property name="dir.src" value="src\"/>
|
|
<property name="dir.build" value="build\"/>
|
|
<property name="version" value="1.0"/>
|
|
<property name="pmd.version" value="3.3"/>
|
|
|
|
<path id="dependencies.path">
|
|
<pathelement location="${dir.build}"/>
|
|
<fileset dir="${dir.lib}">
|
|
<include name="*.jar"/>
|
|
</fileset>
|
|
</path>
|
|
|
|
<target name="delete">
|
|
<delete dir="${dir.build}"/>
|
|
<delete file="${dir.lib}\PMDExtension.jar"/>
|
|
<mkdir dir="${dir.build}"/>
|
|
</target>
|
|
|
|
<target name="compile" description="Compiles the code">
|
|
<mkdir dir="${dir.build}"/>
|
|
<javac deprecation="false"
|
|
debug="true"
|
|
optimize="false"
|
|
srcdir="${dir.src}"
|
|
destdir="${dir.build}">
|
|
<classpath>
|
|
|
|
<path refid="dependencies.path"/>
|
|
</classpath>
|
|
</javac>
|
|
</target>
|
|
|
|
<target name="clean" depends="delete,compile" description="Does a complete recompile"/>
|
|
|
|
<target name="jar" depends="clean" description="Jars up the classes and rulesets">
|
|
<jar
|
|
jarfile="${dir.lib}\PMDExtension.jar"
|
|
includes="net/sourceforge/pmd/bluej/*.class"
|
|
basedir="${dir.build}">
|
|
<manifest>
|
|
<attribute name="Main-Class" value="net.sourceforge.pmd.bluej.PMDExtension"/>
|
|
<attribute name="Class-Path" value="pmd/pmd-${pmd.version}.jar pmd/jaxen-1.1-beta-7.jar"/>
|
|
</manifest>
|
|
</jar>
|
|
</target>
|
|
|
|
<target name="mergejars" depends="jar" description="Creates one uber-jar for easier deployment">
|
|
<unjar src="${dir.lib}/jaxen-1.1-beta-7.jar" dest="lib" overwrite="true"/>
|
|
<unjar src="${dir.lib}/pmd-${pmd.version}.jar" dest="lib" overwrite="true"/>
|
|
<unjar src="${dir.lib}/PMDExtension.jar" dest="lib" overwrite="true"/>
|
|
<delete file="${dir.lib}\PMDExtension.jar"/>
|
|
<jar
|
|
jarfile="${dir.lib}\PMDExtension.jar"
|
|
includes="net/**/*.*,org/**/*.*,META-INF/**/*.*,rulesets/**/*.*,"
|
|
basedir="${dir.lib}">
|
|
<manifest>
|
|
<attribute name="Main-Class" value="net.sourceforge.pmd.bluej.PMDExtension"/>
|
|
</manifest>
|
|
</jar>
|
|
<delete dir="${dir.lib}/net"/>
|
|
<delete dir="${dir.lib}/rulesets"/>
|
|
<delete dir="${dir.lib}/org"/>
|
|
<delete dir="${dir.lib}/test"/>
|
|
<delete dir="${dir.lib}/META-INF"/>
|
|
</target>
|
|
|
|
<target name="deploy" depends="mergejars" description="Deploys new jar file to my BlueJ install">
|
|
<copy todir="/home/tom/pmd/ides/bluej/lib/extensions">
|
|
<fileset dir="${dir.lib}">
|
|
<include name="PMDExtension.jar"/>
|
|
</fileset>
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="deploysfserver" depends="mergejars" description="Deploys new jar file to my BlueJ install">
|
|
<echo message="Uploading jar file to SourceForge"/>
|
|
<exec executable="scp" os="Linux">
|
|
<arg line=" /home/tom/pmd/pmd-bluej/lib/PMDExtension.jar tomcopeland@pmd.sf.net:/home/groups/p/pm/pmd/htdocs/"/>
|
|
</exec>
|
|
<echo message="Uploading extensions.xml to SourceForge"/>
|
|
<exec executable="scp" os="Linux">
|
|
<arg line=" /home/tom/pmd/pmd-bluej/bin/extensions.xml tomcopeland@pmd.sf.net:/home/groups/p/pm/pmd/htdocs/"/>
|
|
</exec>
|
|
</target>
|
|
|
|
</project>
|