Skip to content

Commit

Permalink
Upgrade Hamcrest to 3.0
Browse files Browse the repository at this point in the history
If upstream changelogs are to be believed, there are no
breaking changes except for:
* The packaging method being changed[1] from several JARs
  to one JAR.
* An annotation, `org.hamcrest.Factory`, being removed
  (we don't use it, and upstream says that people should
  not have been using it externally)
* The minimum version being upgraded to Java 8[2], 
  which is already the case in Ant.

[1]: https://github.com/hamcrest/JavaHamcrest/releases/tag/v2.1
[2]: https://github.com/hamcrest/JavaHamcrest/releases/tag/v3.0
  • Loading branch information
tomodachi94 committed Dec 8, 2024
1 parent 375b513 commit a6c1751
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
3 changes: 1 addition & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1211,8 +1211,7 @@
<fileset dir="${lib.dir}">
<include name="optional/junit-3.8.2.jar"/>
<include name="optional/junit-4.13.2.jar"/>
<include name="optional/hamcrest-core-1.3.jar"/>
<include name="optional/hamcrest-library-1.3.jar"/>
<include name="optional/hamcrest-3.0.jar"/>
<include name="README"/>
<include name="libraries.properties"/>
</fileset>
Expand Down
2 changes: 1 addition & 1 deletion fetch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Set -Ddest=LOCATION on the command line
description="load JUnit libraries"
depends="init">
<f2 project="junit"/>
<f2 project="org.hamcrest" archive="hamcrest-library"/>
<f2 project="org.hamcrest" archive="hamcrest"/>
</target>

<target name="junitlauncher"
Expand Down
7 changes: 3 additions & 4 deletions lib/libraries.properties
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@ commons-logging.version=1.1
commons-logging-api.version=${commons-logging.version}
js.version=20.1.0
js-scriptengine.version=${js.version}
# Note - When updating the hamcrest versions here, make sure to also update the
# "src-dist" target in build.xml to copy the correct hamcrest jars
# Note - When updating the hamcrest version here, make sure to also update the
# "src-dist" target in build.xml to copy the correct hamcrest jar
# into the source distribution. Also update the hamcrest dependency
# version in src/etc/poms/pom.xml.
hamcrest-core.version=1.3
hamcrest-library.version=${hamcrest-core.version}
hamcrest.version=3.0
jai-core.version=1.1.3
jai-codec.version=1.1.3
netrexx.version=2.05
Expand Down
4 changes: 2 additions & 2 deletions src/etc/poms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<artifactId>hamcrest</artifactId>
<version>3.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion src/etc/testcases/taskdefs/optional/junitlauncher.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<path id="junit.engine.vintage.classpath">
<fileset dir="../../../../../lib/optional" includes="junit-vintage-engine*.jar"/>
<fileset dir="../../../../../lib/optional" includes="junit-*.jar"/>
<fileset dir="../../../../../lib/optional" includes="hamcrest*.jar"/>
<fileset dir="../../../../../lib/optional" includes="hamcrest-*.jar"/>
<fileset dir="../../../../../lib/optional" includes="opentest4j*.jar"/>
</path>

Expand Down
2 changes: 1 addition & 1 deletion src/tests/antunit/taskdefs/optional/junit/junit-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<path id="junit">
<fileset dir="../../../../../../lib/optional" includes="junit*" />
<fileset dir="../../../../../../lib/optional" includes="hamcrest-core*" />
<fileset dir="../../../../../../lib/optional" includes="hamcrest" />
</path>

<macrodef name="empty-test">
Expand Down

0 comments on commit a6c1751

Please sign in to comment.