|
|
27a9c07 |
<project name="plexus-compiler-eclipse" default="jar" basedir=".">
|
|
|
27a9c07 |
<property file="${user.home}/.m2/maven.properties"/>
|
|
|
27a9c07 |
<property name="maven.build.output" value="target/classes"/>
|
|
|
27a9c07 |
<property name="maven.build.directory" value="target"/>
|
|
|
27a9c07 |
<property name="maven.build.final.name" value="plexus-compiler-eclipse-1.5.2"/>
|
|
|
27a9c07 |
<property name="maven.test.reports" value="${maven.build.directory}/test-reports"/>
|
|
|
27a9c07 |
<property name="maven.test.output" value="target/test-classes"/>
|
|
|
27a9c07 |
<property name="maven.repo.local" value="${user.home}/.m2/repository"/>
|
|
|
27a9c07 |
<property name="javadocdir" value="target/docs/apidocs"></property>
|
|
|
27a9c07 |
<path id="build.classpath">
|
|
|
27a9c07 |
<fileset dir="target/lib">
|
|
|
27a9c07 |
<include name="plexus-compiler-api-1.5.2.jar"/>
|
|
|
27a9c07 |
<include name="plexus_utils.jar"/>
|
|
|
27a9c07 |
<include name="plexus_container-default.jar"/>
|
|
|
27a9c07 |
<include name="jdtcore.jar"/>
|
|
|
27a9c07 |
<include name="classworlds.jar"/>
|
|
|
27a9c07 |
</fileset>
|
|
|
27a9c07 |
</path>
|
|
|
27a9c07 |
<target name="clean" description="Clean the output directory">
|
|
|
27a9c07 |
<delete dir="${maven.build.directory}"/>
|
|
|
27a9c07 |
</target>
|
|
|
27a9c07 |
<target name="compile" description="Compile the code">
|
|
|
27a9c07 |
<mkdir dir="${maven.build.output}"/>
|
|
|
27a9c07 |
<javac destdir="${maven.build.output}" excludes="**/package.html" debug="true" deprecation="true" optimize="false">
|
|
|
27a9c07 |
<src>
|
|
|
27a9c07 |
<pathelement location="src/main/java"/>
|
|
|
27a9c07 |
</src>
|
|
|
27a9c07 |
<classpath refid="build.classpath"/>
|
|
|
27a9c07 |
</javac>
|
|
|
27a9c07 |
<copy todir="${maven.build.output}">
|
|
|
27a9c07 |
<fileset dir="src/main/resources"/>
|
|
|
27a9c07 |
</copy>
|
|
|
27a9c07 |
</target>
|
|
|
27a9c07 |
<target name="jar" depends="compile,test" description="Clean the JAR">
|
|
|
27a9c07 |
<jar jarfile="${maven.build.directory}/${maven.build.final.name}.jar" basedir="${maven.build.output}" excludes="**/package.html"/>
|
|
|
27a9c07 |
</target>
|
|
|
27a9c07 |
<target name="compile-tests" depends="junit-present, compile" description="Compile the test code" if="junit.present">
|
|
|
27a9c07 |
<mkdir dir="${maven.test.output}"/>
|
|
|
27a9c07 |
<javac destdir="${maven.test.output}" excludes="**/package.html" debug="true" deprecation="true" optimize="false">
|
|
|
27a9c07 |
<src>
|
|
|
27a9c07 |
<pathelement location="src/test/java"/>
|
|
|
27a9c07 |
</src>
|
|
|
27a9c07 |
<classpath>
|
|
|
27a9c07 |
<path refid="build.classpath"/>
|
|
|
27a9c07 |
<pathelement location="${maven.build.output}"/>
|
|
|
27a9c07 |
</classpath>
|
|
|
27a9c07 |
</javac>
|
|
|
27a9c07 |
</target>
|
|
|
27a9c07 |
<target name="test" depends="junit-present, compile-tests" if="junit.present" description="Run the test cases">
|
|
|
27a9c07 |
<mkdir dir="${maven.test.reports}"/>
|
|
|
27a9c07 |
<junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
|
|
|
27a9c07 |
<sysproperty key="basedir" value="."/>
|
|
|
27a9c07 |
<formatter type="xml"/>
|
|
|
27a9c07 |
<formatter type="plain" usefile="false"/>
|
|
|
27a9c07 |
<classpath>
|
|
|
27a9c07 |
<path refid="build.classpath"/>
|
|
|
27a9c07 |
<pathelement location="${maven.build.output}"/>
|
|
|
27a9c07 |
<pathelement location="${maven.test.output}"/>
|
|
|
27a9c07 |
</classpath>
|
|
|
27a9c07 |
<batchtest todir="${maven.test.reports}">
|
|
|
27a9c07 |
<fileset dir="src/test/java">
|
|
|
27a9c07 |
<include name="**/*Test.java"/>
|
|
|
27a9c07 |
<exclude name="**/*Abstract*Test.java"/>
|
|
|
27a9c07 |
</fileset>
|
|
|
27a9c07 |
</batchtest>
|
|
|
27a9c07 |
</junit>
|
|
|
27a9c07 |
</target>
|
|
|
27a9c07 |
<target name="test-junit-present">
|
|
|
27a9c07 |
<available classname="junit.framework.Test" property="junit.present"/>
|
|
|
27a9c07 |
</target>
|
|
|
27a9c07 |
<target name="junit-present" depends="test-junit-present" unless="junit.present">
|
|
|
27a9c07 |
<echo>================================= WARNING ================================</echo>
|
|
|
27a9c07 |
<echo> Junit isn't present in your $ANT_HOME/lib directory. Tests not executed. </echo>
|
|
|
27a9c07 |
<echo>==========================================================================</echo>
|
|
|
27a9c07 |
</target>
|
|
|
27a9c07 |
<target name="test-offline">
|
|
|
27a9c07 |
<condition property="maven.mode.offline">
|
|
|
27a9c07 |
<equals arg1="${build.sysclasspath}" arg2="only"/>
|
|
|
27a9c07 |
</condition>
|
|
|
27a9c07 |
</target>
|
|
|
27a9c07 |
<target name="get-deps" depends="test-offline" description="Download all dependencies" unless="maven.mode.offline">
|
|
|
27a9c07 |
<mkdir dir="${maven.repo.local}"/>
|
|
|
27a9c07 |
<get src="http://snapshots.maven.codehaus.org/maven2/org/codehaus/plexus/plexus-compiler-api/1.5.2/plexus-compiler-api-1.5.2.jar" dest="${maven.repo.local}/org/codehaus/plexus/plexus-compiler-api/1.5.2/plexus-compiler-api-1.5.2.jar" usetimestamp="true" ignoreerrors="true"/>
|
|
|
27a9c07 |
<get src="http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-compiler-api/1.5.2/plexus-compiler-api-1.5.2.jar" dest="${maven.repo.local}/org/codehaus/plexus/plexus-compiler-api/1.5.2/plexus-compiler-api-1.5.2.jar" usetimestamp="true" ignoreerrors="true"/>
|
|
|
27a9c07 |
<get src="http://snapshots.maven.codehaus.org/maven2/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar" dest="${maven.repo.local}/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar" usetimestamp="true" ignoreerrors="true"/>
|
|
|
27a9c07 |
<get src="http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar" dest="${maven.repo.local}/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar" usetimestamp="true" ignoreerrors="true"/>
|
|
|
27a9c07 |
<get src="http://snapshots.maven.codehaus.org/maven2/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.jar" dest="${maven.repo.local}/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.jar" usetimestamp="true" ignoreerrors="true"/>
|
|
|
27a9c07 |
<get src="http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.jar" dest="${maven.repo.local}/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.jar" usetimestamp="true" ignoreerrors="true"/>
|
|
|
27a9c07 |
<get src="http://snapshots.maven.codehaus.org/maven2/org/eclipse/jdt/core/3.1.0/core-3.1.0.jar" dest="${maven.repo.local}/org/eclipse/jdt/core/3.1.0/core-3.1.0.jar" usetimestamp="true" ignoreerrors="true"/>
|
|
|
27a9c07 |
<get src="http://repo1.maven.org/maven2/org/eclipse/jdt/core/3.1.0/core-3.1.0.jar" dest="${maven.repo.local}/org/eclipse/jdt/core/3.1.0/core-3.1.0.jar" usetimestamp="true" ignoreerrors="true"/>
|
|
|
27a9c07 |
<get src="http://snapshots.maven.codehaus.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar" dest="${maven.repo.local}/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar" usetimestamp="true" ignoreerrors="true"/>
|
|
|
27a9c07 |
<get src="http://repo1.maven.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar" dest="${maven.repo.local}/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar" usetimestamp="true" ignoreerrors="true"/>
|
|
|
27a9c07 |
</target>
|
|
|
27a9c07 |
<target name="javadoc" description="o Generate javadoc" >
|
|
|
27a9c07 |
<mkdir dir="${javadocdir}"></mkdir>
|
|
|
27a9c07 |
<tstamp>
|
|
|
27a9c07 |
<format pattern="-yyyy" property="year"></format>
|
|
|
27a9c07 |
</tstamp>
|
|
|
27a9c07 |
<property name="copyright" value="Copyright © . All Rights Reserved."></property>
|
|
|
27a9c07 |
<property name="title" value="Plexus Compiler 1.5.2 Eclipse API"></property>
|
|
|
27a9c07 |
<javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/main/java" packagenames="org.codehaus.plexus.*">
|
|
|
27a9c07 |
<classpath>
|
|
|
27a9c07 |
<path refid="build.classpath"></path>
|
|
|
27a9c07 |
</classpath>
|
|
|
27a9c07 |
</javadoc>
|
|
|
27a9c07 |
</target>
|
|
|
27a9c07 |
</project>
|