0330b1a3d2
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2431 51baf565-9d33-0410-a72c-fc3788e3496d
126 lines
8.8 KiB
XML
126 lines
8.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project name="net.sourceforge.pmd.core" default="build.jars" basedir=".">
|
|
|
|
<property name="bootclasspath" value=""/>
|
|
<property name="ws" value="win32"/>
|
|
<property name="os" value="win32"/>
|
|
<property name="arch" value="x86"/>
|
|
<property name="javacFailOnError" value="false"/>
|
|
<property name="javacDebugInfo" value="on"/>
|
|
<property name="javacVerbose" value="true"/>
|
|
|
|
<target name="init" depends="properties">
|
|
<property name="plugin" value="net.sourceforge.pmd.core"/>
|
|
<property name="version.suffix" value="_1.3.2"/>
|
|
<property name="full.name" value="${plugin}${version.suffix}"/>
|
|
<property name="temp.folder" value="${basedir}/temp.folder"/>
|
|
<property name="plugin.destination" value="${basedir}"/>
|
|
<property name="build.result.folder" value="${basedir}"/>
|
|
</target>
|
|
|
|
<target name="properties" if="eclipse.running">
|
|
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
|
|
</target>
|
|
|
|
<target name="build.update.jar" depends="init" description="Build the plug-in: net.sourceforge.pmd.core for an update site.">
|
|
<delete dir="${temp.folder}"/>
|
|
<mkdir dir="${temp.folder}"/>
|
|
<antcall target="build.jars"/>
|
|
<antcall target="gather.bin.parts">
|
|
<param name="destination.temp.folder" value="${temp.folder}/"/>
|
|
</antcall>
|
|
<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" update="no"/>
|
|
<delete dir="${temp.folder}"/>
|
|
</target>
|
|
|
|
<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
|
|
<mkdir dir="${destination.temp.folder}/${full.name}"/>
|
|
<copy file="${build.result.folder}/core.jar" todir="${destination.temp.folder}/${full.name}"/>
|
|
<copy todir="${destination.temp.folder}/${full.name}">
|
|
<fileset dir="${basedir}" includes="plugin.xml,plugin.properties,plugin_fr.properties,lib/*.jar,toc.xml,doc.zip" excludes="core.jar"/>
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="core.jar" depends="init" unless="core.jar" description="Create jar: core.jar.">
|
|
<property name="destdir" value="${temp.folder}/core.jar.bin"/>
|
|
<delete dir="${temp.folder}/core.jar.bin"/>
|
|
<mkdir dir="${temp.folder}/core.jar.bin"/>
|
|
<!-- compile the source code -->
|
|
<javac destdir="${temp.folder}/core.jar.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bootclasspath}" classpath="../../../../../Program Files/eclipse/plugins/org.eclipse.core.boot_2.1.0/bin;../../../../../Program Files/eclipse/plugins/org.eclipse.core.boot_2.1.0/boot.jar;lib/pmd-1.3.jar;lib/jaxen-core-1.0-fcs.jar;lib/saxpath-1.0-fcs.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.core.runtime_2.1.0/bin;../../../../../Program Files/eclipse/plugins/org.eclipse.core.runtime_2.1.0/runtime.jar;../../../../../Program Files/eclipse/plugins/org.apache.xerces_4.0.7/bin;../../../../../Program Files/eclipse/plugins/org.apache.xerces_4.0.7/xmlParserAPIs.jar;../../../../../Program Files/eclipse/plugins/org.apache.xerces_4.0.7/xercesImpl.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.core.resources_2.1.0/bin;../../../../../Program Files/eclipse/plugins/org.eclipse.core.resources_2.1.0/resources.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.core.resources.win32_2.1.0/resources.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.ui_2.1.0/bin;../../../../../Program Files/eclipse/plugins/org.eclipse.ui_2.1.0/ui.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.update.core_2.1.0/bin;../../../../../Program Files/eclipse/plugins/org.eclipse.update.core_2.1.0/updatecore.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.update.core.win32_2.1.0/updatecore.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.help_2.1.0/bin;../../../../../Program Files/eclipse/plugins/org.eclipse.help_2.1.0/help.jar;../../../../../Program Files/eclipse/plugins/org.apache.lucene_1.2.1/bin;../../../../../Program Files/eclipse/plugins/org.apache.lucene_1.2.1/parser.jar;../../../../../Program Files/eclipse/plugins/org.apache.lucene_1.2.1/lucene-1.2.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.help.appserver_2.1.0/bin;../../../../../Program Files/eclipse/plugins/org.eclipse.help.appserver_2.1.0/appserver.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.swt_2.1.0/bin;../../../../../Program Files/eclipse/plugins/org.eclipse.swt_2.1.0/ws/${ws}/swt.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.swt.win32_2.1.0/ws/${ws}/swt.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.text_2.1.0/bin;../../../../../Program Files/eclipse/plugins/org.eclipse.text_2.1.0/text.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.jface_2.1.0/bin;../../../../../Program Files/eclipse/plugins/org.eclipse.jface_2.1.0/jface.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.jface.text_2.1.0/bin;../../../../../Program Files/eclipse/plugins/org.eclipse.jface.text_2.1.0/jfacetext.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.ui.views_2.1.0/bin;../../../../../Program Files/eclipse/plugins/org.eclipse.ui.views_2.1.0/views.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.ui.workbench_2.1.0/bin;../../../../../Program Files/eclipse/plugins/org.eclipse.ui.workbench_2.1.0/workbench.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.ui.win32_2.1.0/workbench.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.ui.win32_2.1.0/bin;../../../../../Program Files/eclipse/plugins/org.eclipse.ui.win32_2.1.0/workbenchwin32.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.ui.workbench.texteditor_2.1.0/bin;../../../../../Program Files/eclipse/plugins/org.eclipse.ui.workbench.texteditor_2.1.0/texteditor.jar;../../../../../Program Files/eclipse/plugins/org.eclipse.ui.editors_2.1.0/bin;../../../../../Program Files/eclipse/plugins/org.eclipse.ui.editors_2.1.0/editors.jar">
|
|
<src path="src/"/>
|
|
</javac>
|
|
<!-- copy necessary resources -->
|
|
<copy todir="${temp.folder}/core.jar.bin">
|
|
<fileset dir="src/" excludes="**/*.java"/>
|
|
</copy>
|
|
<mkdir dir="${build.result.folder}"/>
|
|
<jar jarfile="${build.result.folder}/core.jar" basedir="${temp.folder}/core.jar.bin"/>
|
|
<delete dir="${temp.folder}/core.jar.bin"/>
|
|
</target>
|
|
|
|
<target name="coresrc.zip" depends="init" unless="core.jar">
|
|
<mkdir dir="${build.result.folder}"/>
|
|
<zip zipfile="${build.result.folder}/coresrc.zip" filesonly="false" update="no">
|
|
<fileset dir="src/" includes="**/*.java"/>
|
|
</zip>
|
|
</target>
|
|
|
|
<target name="build.jars" depends="init" description="Build all the jars for the plug-in: net.sourceforge.pmd.core.">
|
|
<available property="core.jar" file="${build.result.folder}/core.jar"/>
|
|
<antcall target="core.jar"/>
|
|
</target>
|
|
|
|
<target name="build.sources" depends="init">
|
|
<available property="coresrc.zip" file="${build.result.folder}/coresrc.zip"/>
|
|
<antcall target="coresrc.zip"/>
|
|
</target>
|
|
|
|
<target name="build.zips" depends="init">
|
|
</target>
|
|
|
|
<target name="gather.sources" depends="init" if="destination.temp.folder">
|
|
<mkdir dir="${destination.temp.folder}/${full.name}"/>
|
|
<copy file="${build.result.folder}/coresrc.zip" todir="${destination.temp.folder}/${full.name}"/>
|
|
</target>
|
|
|
|
<target name="gather.logs" depends="init" if="destination.temp.folder">
|
|
<mkdir dir="${destination.temp.folder}/${full.name}"/>
|
|
<copy file="${temp.folder}/core.jar.bin.log" todir="${destination.temp.folder}/${full.name}"/>
|
|
</target>
|
|
|
|
<target name="clean" depends="init" description="Clean the plug-in: net.sourceforge.pmd.core of all the zips, jars and logs created.">
|
|
<delete file="${build.result.folder}/core.jar"/>
|
|
<delete file="${build.result.folder}/coresrc.zip"/>
|
|
<delete file="${plugin.destination}/${full.name}.jar"/>
|
|
<delete file="${plugin.destination}/${full.name}.zip"/>
|
|
<delete dir="${temp.folder}"/>
|
|
</target>
|
|
|
|
<target name="refresh" depends="init" if="eclipse.running">
|
|
<eclipse.convertPath fileSystemPath="c:\home\phherlin\javadev\PMD\pmd-eclipse-pmd\" property="resourcePath"/>
|
|
<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
|
|
</target>
|
|
|
|
<target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: net.sourceforge.pmd.core.">
|
|
<delete dir="${temp.folder}"/>
|
|
<mkdir dir="${temp.folder}"/>
|
|
<antcall target="build.jars"/>
|
|
<antcall target="build.sources"/>
|
|
<antcall target="gather.bin.parts">
|
|
<param name="destination.temp.folder" value="${temp.folder}/"/>
|
|
</antcall>
|
|
<antcall target="gather.sources">
|
|
<param name="destination.temp.folder" value="${temp.folder}/"/>
|
|
</antcall>
|
|
<delete>
|
|
<fileset dir="${temp.folder}" includes="**/*.bin.log"/>
|
|
</delete>
|
|
<antcall target="zip.folder"/>
|
|
<delete dir="${temp.folder}"/>
|
|
</target>
|
|
<target name="zip.folder" depends="init">
|
|
<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" update="no" excludes="**/*.bin.log"/>
|
|
</target>
|
|
|
|
</project>
|