You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2007/05/25 18:31:56 UTC

svn commit: r541717 - /james/jspf/trunk/build.xml

Author: norman
Date: Fri May 25 09:31:55 2007
New Revision: 541717

URL: http://svn.apache.org/viewvc?view=rev&rev=541717
Log:
Add workin build.xml

Added:
    james/jspf/trunk/build.xml   (with props)

Added: james/jspf/trunk/build.xml
URL: http://svn.apache.org/viewvc/james/jspf/trunk/build.xml?view=auto&rev=541717
==============================================================================
--- james/jspf/trunk/build.xml (added)
+++ james/jspf/trunk/build.xml Fri May 25 09:31:55 2007
@@ -0,0 +1,78 @@
+<project name="jspf" default="jar" basedir=".">
+  <property file="${user.home}/.m2/maven.properties"/>
+  <property name="maven.build.output" value="target/classes"/>
+  <property name="maven.build.directory" value="target"/>
+  <property name="maven.build.final.name" value="jspf-0.9.5-SNAPSHOT"/>
+  <property name="maven.test.reports" value="${maven.build.directory}/test-reports"/>
+  <property name="maven.test.output" value="target/test-classes"/>
+  <property name="stage.dir" value="stage/"/>
+  <path id="build.classpath">
+    <fileset dir="${stage.dir}">
+      <include name="dnsjava/jars/dnsjava-2.0.4-SNAPSHOT.jar"/>
+      <include name="uk.nominet/jars/dnsjnio-0.9.7-SNAPSHOT.jar"/>
+      <include name="commons-cli/jars/commons-cli-1.0.jar"/>
+      <include name="log4j/jars/log4j-1.2.14.jar"/>
+      <include name="org.jvyaml/jars/jvyaml-0.2.1.jar"/>
+    </fileset>
+  </path>
+  <target name="clean" description="Clean the output directory">
+    <delete dir="${maven.build.directory}"/>
+  </target>
+  <target name="compile" description="Compile the code">
+    <mkdir dir="${maven.build.output}"/>
+    <javac destdir="${maven.build.output}" excludes="**/package.html" debug="true" deprecation="true" optimize="false">
+      <src>
+        <pathelement location="src/main/java"/>
+      </src>
+      <classpath refid="build.classpath"/>
+    </javac>
+    <copy todir="${maven.build.output}">
+      <fileset dir="src/main/resources"/>
+    </copy>
+  </target>
+  <target name="jar" depends="compile,test" description="Clean the JAR">
+    <jar jarfile="${maven.build.directory}/${maven.build.final.name}.jar" basedir="${maven.build.output}" excludes="**/package.html"/>
+  </target>
+  <target name="compile-tests" depends="junit-present, compile" description="Compile the test code" if="junit.present">
+    <mkdir dir="${maven.test.output}"/>
+    <javac destdir="${maven.test.output}" excludes="**/package.html" debug="true" deprecation="true" optimize="false">
+      <src>
+        <pathelement location="src/test/java"/>
+      </src>
+      <classpath>
+        <path refid="build.classpath"/>
+        <pathelement location="${maven.build.output}"/>
+      </classpath>
+    </javac>
+    <copy todir="${maven.test.output}">
+      <fileset dir="src/test/resources"/>
+    </copy>
+  </target>
+  <target name="test" depends="junit-present, compile-tests" if="junit.present" description="Run the test cases">
+    <mkdir dir="${maven.test.reports}"/>
+    <junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
+      <sysproperty key="basedir" value="."/>
+      <formatter type="xml"/>
+      <formatter type="plain" usefile="false"/>
+      <classpath>
+        <path refid="build.classpath"/>
+        <pathelement location="${maven.build.output}"/>
+        <pathelement location="${maven.test.output}"/>
+      </classpath>
+      <batchtest todir="${maven.test.reports}">
+        <fileset dir="src/test/java">
+          <include name="**/*Test.java"/>
+          <exclude name="**/*Abstract*Test.java"/>
+        </fileset>
+      </batchtest>
+    </junit>
+  </target>
+  <target name="test-junit-present">
+    <available classname="junit.framework.Test" property="junit.present"/>
+  </target>
+  <target name="junit-present" depends="test-junit-present" unless="junit.present">
+    <echo>================================= WARNING ================================</echo>
+    <echo> Junit isn't present in your $ANT_HOME/lib directory. Tests not executed. </echo>
+    <echo>==========================================================================</echo>
+  </target>
+</project>
\ No newline at end of file

Propchange: james/jspf/trunk/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org