|
119 | 119 |
|
120 | 120 | <property name="junit.version" value="4.12"/>
|
121 | 121 | <property name="junit.jar" value="junit-${junit.version}.jar"/>
|
| 122 | + <property name="hamcrest.version" value="1.3"/> |
| 123 | + <property name="hamcrest.jar" value="hamcrest-core-${hamcrest.version}.jar"/> |
122 | 124 |
|
123 | 125 | <property name="mvn.repository" value="http://repo1.maven.org/maven2"/>
|
124 | 126 |
|
|
565 | 567 | </condition>
|
566 | 568 | </target>
|
567 | 569 |
|
568 |
| - <target name="download-junit" depends="-check-junit" if="junit_not_downloaded"> |
| 570 | + <target name="download-junit" depends="-check-junit,download-hamcrest" if="junit_not_downloaded"> |
569 | 571 | <delete>
|
570 | 572 | <fileset dir="lib">
|
571 | 573 | <include name="junit-*.jar"/>
|
|
575 | 577 | dest="lib/${junit.jar}" verbose="true" usetimestamp="true"/>
|
576 | 578 | </target>
|
577 | 579 |
|
| 580 | + <target name="-check-hamcrest" description="Check that hamcrest jar file is present"> |
| 581 | + <available file="${hamcrest.jar}" type="file" property="hamcrest.jar.present"> |
| 582 | + <filepath refid="plainlib.search.path"/> |
| 583 | + </available> |
| 584 | + <condition property="hamcrest_not_downloaded"> |
| 585 | + <not> |
| 586 | + <isset property="hamcrest.jar.present"/> |
| 587 | + </not> |
| 588 | + </condition> |
| 589 | + </target> |
| 590 | + |
| 591 | + <target name="download-hamcrest" depends="-check-hamcrest" if="hamcrest_not_downloaded"> |
| 592 | + <delete> |
| 593 | + <fileset dir="lib"> |
| 594 | + <include name="hamcrest-*.jar"/> |
| 595 | + </fileset> |
| 596 | + </delete> |
| 597 | + <get src="${mvn.repository}/org/hamcrest/hamcrest-core/${hamcrest.version}/${hamcrest.jar}" |
| 598 | + dest="lib/${hamcrest.jar}" verbose="true" usetimestamp="true"/> |
| 599 | + </target> |
| 600 | + |
578 | 601 | <target name="-post-jar" depends="-copy-lib-without-netbeans">
|
579 | 602 | <war destfile="${dist.war}" webxml="web/WEB-INF/web.xml">
|
580 | 603 | <fileset dir="web" excludes="META-INF/context.xml"/>
|
|
863 | 886 | </jacoco:report>
|
864 | 887 | </target>
|
865 | 888 |
|
866 |
| - <target name="-pre-compile-test" depends="-check-junit"><!-- depends="-set-jacocoagent"> --> |
| 889 | + <target name="-pre-compile-test" depends="download-junit"><!-- depends="-set-jacocoagent"> --> |
867 | 890 | </target>
|
868 | 891 |
|
869 | 892 | <!-- <target name="-pre-compile-test-single" depends="-set-jacocoagent"/> -->
|
|
0 commit comments