|
49 | 49 | </jar> |
50 | 50 | </target> |
51 | 51 |
|
| 52 | + <target name="library" depends="core" description="Build library of matchers"> |
| 53 | + <path id="cp-hamcrest-library-main" path="build/hamcrest-core-${version}.jar"/> |
| 54 | + <path id="cp-hamcrest-library-test" path="lib/integration/junit-dep-4.10.jar;build/hamcrest-core-${version}-test.jar"/> |
| 55 | + <compile-module modulename="hamcrest-library"/> |
| 56 | + <test-module modulename="hamcrest-library"/> |
| 57 | + <generate-module-factory modulename="hamcrest-library" configurationfile="matchers.xml" targetclass="org.hamcrest.Matchers"/> |
| 58 | + </target> |
| 59 | + |
52 | 60 | <macrodef name="compile-module"> |
53 | 61 | <attribute name="modulename" description="Name of the module to jar"/> |
54 | 62 |
|
|
107 | 115 | </sequential> |
108 | 116 | </macrodef> |
109 | 117 |
|
110 | | - <target name="library" |
111 | | - depends="core,generator" |
112 | | - description="Build library of matchers"> |
113 | | - <mkdir dir="build/temp/hamcrest-library/generated-code"/> |
114 | | - <java-to-jar srcdir="hamcrest-library/src/main/java" |
115 | | - modulename="hamcrest-library" |
116 | | - classpath="build/hamcrest-core-${version}.jar"/> |
117 | | - <!-- Generate one class with all static imports --> |
118 | | - <java classname="org.hamcrest.generator.config.XmlConfigurator" |
119 | | - fork="yes" |
120 | | - failonerror="yes" |
121 | | - classpath=" |
122 | | - build/hamcrest-core-${version}.jar; |
123 | | - build/hamcrest-generator-${version}.jar; |
124 | | - build/hamcrest-library-${version}.jar; |
125 | | - "> |
126 | | - <arg value="matchers.xml"/> |
127 | | - <arg value="hamcrest-core/src/main/java,hamcrest-library/src/main/java"/> |
128 | | - <arg value="org.hamcrest.Matchers"/> |
129 | | - <arg value="build/temp/hamcrest-library/generated-code"/> |
130 | | - </java> |
131 | | - <!-- Append to library jar --> |
132 | | - <java-to-jar srcdir="build/temp/hamcrest-library/generated-code" |
133 | | - modulename="hamcrest-library" |
134 | | - classpath="build/hamcrest-core-${version}.jar"/> |
135 | | - </target> |
136 | 118 |
|
137 | 119 | <target name="integration" depends="core, library" description="Build integration with external tools"> |
138 | 120 | <java-to-jar srcdir="hamcrest-integration/src/main/java" |
|
396 | 378 | <macrodef name="test-module" description="run unit tests."> |
397 | 379 | <attribute name="modulename" description="Name of the module to jar"/> |
398 | 380 | <sequential> |
399 | | - <junit printsummary="no" fork="no" haltonfailure="${haltonfailure}"> |
| 381 | + <mkdir dir="build/temp/@{modulename}/test-wrk"/> |
| 382 | + <junit printsummary="no" forkmode="once" tempdir="build/temp/@{modulename}/test-wrk" haltonfailure="${haltonfailure}"> |
400 | 383 | <formatter type="brief" usefile="no"/> |
401 | 384 | <classpath refid="cp-@{modulename}-main"/> |
402 | 385 | <classpath refid="cp-@{modulename}-test"/> |
|
0 commit comments