Skip to content

Commit 0880ba5

Browse files
committed
rename macro attribute to reflect new meaning
1 parent c32167c commit 0880ba5

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

build.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<target name="generator" description="Build code generator tool">
1414
<java-to-jar srcdir="hamcrest-generator/src/main/java"
15-
destjar="hamcrest-generator-${version}-nodeps"
15+
modulename="hamcrest-generator-${version}-nodeps"
1616
classpath="lib/generator/qdox-1.12.jar"/>
1717

1818
<!-- Bundle QDox classes in hamcrest-generator.jar using JarJar to place classes under a different package -->
@@ -25,7 +25,7 @@
2525
</target>
2626

2727
<target name="core" depends="generator" description="Build core Hamcrest library">
28-
<java-to-jar srcdir="hamcrest-core/src/main/java" destjar="hamcrest-core-${version}"/>
28+
<java-to-jar srcdir="hamcrest-core/src/main/java" modulename="hamcrest-core-${version}"/>
2929

3030
<!-- Generate one class with all static imports -->
3131
<mkdir dir="build/temp/hamcrest-core/generated-code"/>
@@ -44,7 +44,7 @@
4444
</java>
4545
<!-- Append to core jar -->
4646
<java-to-jar srcdir="build/temp/hamcrest-core/generated-code"
47-
destjar="hamcrest-core-${version}"
47+
modulename="hamcrest-core-${version}"
4848
classpath="build/hamcrest-core-${version}.jar"/>
4949
</target>
5050

@@ -53,7 +53,7 @@
5353
description="Build library of matchers">
5454
<mkdir dir="build/temp/hamcrest-library/generated-code"/>
5555
<java-to-jar srcdir="hamcrest-library/src/main/java"
56-
destjar="hamcrest-library-${version}"
56+
modulename="hamcrest-library-${version}"
5757
classpath="build/hamcrest-core-${version}.jar"/>
5858
<!-- Generate one class with all static imports -->
5959
<java classname="org.hamcrest.generator.config.XmlConfigurator"
@@ -71,19 +71,19 @@
7171
</java>
7272
<!-- Append to library jar -->
7373
<java-to-jar srcdir="build/temp/hamcrest-library/generated-code"
74-
destjar="hamcrest-library-${version}"
74+
modulename="hamcrest-library-${version}"
7575
classpath="build/hamcrest-core-${version}.jar"/>
7676
</target>
7777

7878
<target name="integration" depends="core, library" description="Build integration with external tools">
79-
<java-to-jar srcdir="hamcrest-integration/src/main/java" destjar="hamcrest-integration-${version}"
79+
<java-to-jar srcdir="hamcrest-integration/src/main/java" modulename="hamcrest-integration-${version}"
8080
classpath="
8181
build/hamcrest-core-${version}.jar;
8282
build/hamcrest-library-${version}.jar"/>
8383
</target>
8484

8585
<target name="unit-test" depends="core, library, integration, generator" description="Build and run unit tests.">
86-
<java-to-jar srcdir="hamcrest-unit-test/src/main/java" destjar="hamcrest-unit-test-${version}"
86+
<java-to-jar srcdir="hamcrest-unit-test/src/main/java" modulename="hamcrest-unit-test-${version}"
8787
classpath="
8888
build/hamcrest-core-${version}.jar;
8989
build/hamcrest-library-${version}.jar;
@@ -112,7 +112,7 @@
112112

113113
<target name="examples" depends="core, library, integration" description="Build and run unit tests.">
114114
<java-to-jar srcdir="hamcrest-examples/src/main/java"
115-
destjar="hamcrest-examples-${version}"
115+
modulename="hamcrest-examples-${version}"
116116
classpath="
117117
build/hamcrest-core-${version}.jar;
118118
build/hamcrest-library-${version}.jar;
@@ -188,27 +188,27 @@
188188
</javadoc>
189189
</target>
190190

191-
<macrodef name="java-to-jar" description="Compile Java source and build a Jar">
191+
<macrodef name="java-to-jar" description="Compile Java source for a module and build a Jar">
192192
<attribute name="srcdir" description="Directory containg Java source"/>
193-
<attribute name="destjar" description="Path to Jar"/>
193+
<attribute name="modulename" description="Name of the module to jar"/>
194194
<attribute name="classpath" description="Anything additional to add on the classpath" default=""/>
195195
<sequential>
196-
<mkdir dir="build/temp/@{destjar}.jar.contents"/>
197-
<javac srcdir="@{srcdir}" destdir="build/temp/@{destjar}.jar.contents" debug="${debug}" target="1.5">
196+
<mkdir dir="build/temp/@{modulename}.jar.contents"/>
197+
<javac srcdir="@{srcdir}" destdir="build/temp/@{modulename}.jar.contents" debug="${debug}" target="1.5">
198198
<classpath>
199199
<fileset dir="lib/integration">
200200
<include name="*.jar"/>
201201
</fileset>
202202
<pathelement path="@{classpath}"/>
203203
</classpath>
204204
</javac>
205-
<copy file="LICENSE.txt" todir="build/temp/@{destjar}.jar.contents"/>
205+
<copy file="LICENSE.txt" todir="build/temp/@{modulename}.jar.contents"/>
206206
<!-- Put Java source in Jars for user's convenience. -->
207-
<copy todir="build/temp/@{destjar}.jar.contents">
207+
<copy todir="build/temp/@{modulename}.jar.contents">
208208
<fileset dir="@{srcdir}"/>
209209
</copy>
210-
<jar jarfile="build/@{destjar}.jar">
211-
<fileset dir="build/temp/@{destjar}.jar.contents"/>
210+
<jar jarfile="build/@{modulename}.jar">
211+
<fileset dir="build/temp/@{modulename}.jar.contents"/>
212212
</jar>
213213
</sequential>
214214
</macrodef>

0 commit comments

Comments
 (0)