Skip to content

Commit d6af09c

Browse files
committed
when generating Matchers factory, include sources for hamcrest-core too
1 parent 66e43aa commit d6af09c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎build.xml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<path id="cp-hamcrest-core-main" path="build/hamcrest-api-${version}.jar"/>
4242
<path id="cp-hamcrest-core-test" path=""/>
4343
<compile-module modulename="hamcrest-core"/>
44-
<generate-module-factory modulename="hamcrest-core" configurationfile="core-matchers.xml" targetclass="org.hamcrest.CoreMatchers"/>
44+
<generate-module-factory modulename="hamcrest-core" configurationfile="core-matchers.xml" targetclass="org.hamcrest.CoreMatchers" sources="hamcrest-core/src/main/java"/>
4545
<jar-module modulename="hamcrest-core"/>
4646
<test-module modulename="hamcrest-core"/>
4747
</target>
@@ -50,7 +50,7 @@
5050
<path id="cp-hamcrest-library-main" path="build/hamcrest-api-${version}.jar;build/hamcrest-core-${version}.jar"/>
5151
<path id="cp-hamcrest-library-test" path="build/hamcrest-core-${version}-tests.jar"/>
5252
<compile-module modulename="hamcrest-library"/>
53-
<generate-module-factory modulename="hamcrest-library" configurationfile="matchers.xml" targetclass="org.hamcrest.Matchers"/>
53+
<generate-module-factory modulename="hamcrest-library" configurationfile="matchers.xml" targetclass="org.hamcrest.Matchers" sources="hamcrest-core/src/main/java,hamcrest-library/src/main/java"/>
5454
<jar-module modulename="hamcrest-library"/>
5555
<test-module modulename="hamcrest-library"/>
5656
</target>
@@ -208,14 +208,15 @@
208208
<attribute name="modulename" description="Name of the module to jar"/>
209209
<attribute name="configurationfile" description="xml configuration file"/>
210210
<attribute name="targetclass" description="factory class to generate"/>
211+
<attribute name="sources" description="comma-separated source directories"/>
211212
<sequential>
212213
<mkdir dir="build/temp/@{modulename}/generated-code"/>
213214
<java classname="org.hamcrest.generator.config.XmlConfigurator" fork="yes" failonerror="yes">
214215
<classpath path="build/hamcrest-generator-${version}.jar"/>
215216
<classpath refid="cp-@{modulename}-main"/>
216217
<classpath path="build/temp/@{modulename}-${version}.jar.contents"/>
217218
<arg value="@{configurationfile}"/>
218-
<arg value="@{modulename}/src/main/java"/>
219+
<arg value="@{sources}"/>
219220
<arg value="@{targetclass}"/>
220221
<arg value="build/temp/@{modulename}/generated-code"/>
221222
</java>

0 commit comments

Comments
 (0)