Skip to content

Commit 119fcf2

Browse files
author
joeretro
committed
Build file improvements. Allow debug to be specified as property. Avoid deprecated copydir task. (Patch by Magne Rasmussen)
1 parent 7e15ad4 commit 119fcf2

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

build.xml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
value="true"
99
description="Whether to halt the build if the tests fail"/>
1010

11+
<property name="debug"
12+
value="true"
13+
description="Whether to build with debug information"/>
14+
1115
<target name="all"
1216
depends="clean, package"
1317
description="Performs clean build, runs tests and packages for distribution"/>
@@ -54,7 +58,7 @@
5458
<java-to-jar srcdir="build/generated-code"
5559
destjar="build/hamcrest-library-${version}.jar"
5660
classpath="build/hamcrest-api-${version}.jar"/>
57-
</target>
61+
</target>
5862

5963
<target name="integration"
6064
depends="api, library"
@@ -146,7 +150,7 @@
146150
<attribute name="classpath" description="Anything additional to add on the classpath" default=""/>
147151
<sequential>
148152
<mkdir dir="build/temp/@{destjar}.contents"/>
149-
<javac srcdir="@{srcdir}" destdir="build/temp/@{destjar}.contents">
153+
<javac srcdir="@{srcdir}" destdir="build/temp/@{destjar}.contents" debug="${debug}">
150154
<classpath>
151155
<fileset dir="lib/integration">
152156
<include name="*.jar"/>
@@ -156,7 +160,9 @@
156160
</javac>
157161
<copy file="LICENSE.txt" todir="build/temp/@{destjar}.contents"/>
158162
<!-- Put Java source in Jars for user's convenience. -->
159-
<copydir src="@{srcdir}" dest="build/temp/@{destjar}.contents"/>
163+
<copy todir="build/temp/@{destjar}.contents">
164+
<fileset dir="@{srcdir}"/>
165+
</copy>
160166
<jar jarfile="@{destjar}">
161167
<fileset dir="build/temp/@{destjar}.contents"/>
162168
</jar>

0 commit comments

Comments
 (0)