Just noticed that this breaks all the run-xxx test targets so I am
adding the new test dir to the run classpath.
···
On Tue, Feb 11, 2014 at 11:38 AM, <ice4j@googlecode.com> wrote:
Revision: 379
Author: paweldomas@gmail.com
Date: Tue Feb 11 10:38:23 2014 UTC
Log: Removes test classes from output jar file.
http://code.google.com/p/ice4j/source/detail?r=379Modified:
/trunk/build.xml=======================================
--- /trunk/build.xml Thu Nov 21 18:55:20 2013 UTC
+++ /trunk/build.xml Tue Feb 11 10:38:23 2014 UTC
@@ -2,6 +2,7 @@<project name="ice4j" basedir="." default="rebuild">
<property name="dest" value="classes"/>
+ <property name="dest-test" value="classes-test"/>
<property name="lib" value="lib"/>
<property name="JUnit.home" value="${lib}"/>
<property name="src" value="src"/>
@@ -14,10 +15,14 @@<path id="project.class.path">
<pathelement location="\{dest\}"/> \- <pathelement location="{JUnit.home}/junit.jar"/>
<pathelement location="\{lib\}/jain\-sdp\.jar"/> <pathelement location="{lib}/weupnp-0.1.2-SNAPSHOT.jar"/>
</path>
+ <path id="test.class.path">
+ <path refid="project.class.path" />
+ <pathelement location="\{dest\-test\}"/> \+ <pathelement location="{JUnit.home}/junit.jar"/>
+ </path><!--Patternset to exclude files from the output directory:-->
<patternset id="dest.exclude">
@@ -38,6 +43,18 @@
target="1.5"
source="1.5">
<src path="\{src\}"/> \+ <compilerarg value="\-Xlint"/> \+ </javac> \+ </target> \+ <target name="compile\-test" depends="init"> \+ <javac classpathref="test\.class\.path" \+ debug="true" \+ deprecation="true" \+ destdir="{dest-test}"
+ nowarn="false"
+ optimize="true"
+ target="1.5"
+ source="1.5">
<src path="\{src2\}"/> <compilerarg value="\-Xlint"/> </javac> @@ \-88,6 \+105,7 @@ <target name="clean"> <delete failonerror="false" includeemptydirs="true"> <fileset dir="{dest}"/>
+ <fileset dir="\{dest\-test\}"/> <fileset dir="{junit.reports}"/>
<fileset dir="doc" />
</delete>
@@ -106,6 +124,7 @@
<!-- create needed subdirs-->
<target name="init">
<mkdir dir="\{dest\}"/> \+ <mkdir dir="{dest-test}"/>
<mkdir dir="\{junit\.reports\}"/> <mkdir dir="{junit.html.reports}"/>
</target>
@@ -134,13 +153,13 @@
</target><!-- Run the tests-->
- <target name="test">
+ <target name="test" depends="compile-test">
<junit haltonfailure="true" fork="true" forkmode="once">
<formatter type="xml"/>
<formatter type="brief" usefile="false"/>
<test name="org.ice4j.StunTestSuite" todir="\{junit\.reports\}"/> <test name="org\.ice4j\.PseudoTcpTestSuite" todir="{junit.reports}"/>
- <classpath refid="project.class.path"/>
+ <classpath refid="test.class.path"/>
</junit><!-- Generate the html report.
--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
Jitsi
emcho@jitsi.org PHONE: +33.1.77.62.43.30
https://jitsi.org FAX: +33.1.77.62.47.31