PackageTrack
Sign in Get early access

org.hamcrest:hamcrest-core

3.0 #972 most downloaded on Maven Central hamcrest/JavaHamcrest

What this package is like to depend on

Last release 2 years ago

no release in 18 months

Release timing varies

gaps range from 2 weeks to 6.4 years

Most releases are documented

notes for 6 of 7 stable releases

Nothing withdrawn

no release was ever pulled

19 years old

13 releases · first in 2007

0 releases in the last 12 months

see the full history below

Release timeline

13 releases · Jul 2007 to Aug 2024
2008 2010 2012 2014 2016 2018 2020 2022 2024 2026
Release Pre-release

Releases

latest 13
  1. 3.0 01 Aug 2024
    Release notes

    Breaking Changes

    • From version 3.0, the jar distributed to Maven Central is now compiled to Java 1.8 bytecode,
      and is not compatible with previous versions of Java. See Issue #331 and
      PR #411 for details. Developers who use Java 1.7 earlier can still depend upon hamcrest-2.2.jar.

    Improvements

    Open source →
    Release notes

    Breaking Changes

    • From version 3.0, the jar distributed to Maven Central is now compiled to Java 1.8 bytecode, and is not compatible with previous versions of Java. See Issue #331 and PR #411 for details. Developers who use Java 1.7 earlier can still depend upon hamcrest-2.2.jar.

    Improvements

    Open source →
  2. 3.0-rc1 24 Jul 2024 pre-release
    Release notes

    Breaking Changes

    • From version 3.0, the jar distributed to Maven Central is now compiled to Java 1.8 bytecode, and is not compatible with previous versions of Java. See Issue #331 and PR #411 for details. Developers who use Java 1.7 earlier can still depend upon hamcrest-2.2.jar.

    Improvements

    Open source →
  3. 2.2 16 Oct 2019
    Release notes

    Improvements

    • AllOf/AnyOf: Pass the matchers to constructor using varargs (Issue #245)
    • Matchers.anyOf: Fix generic bounds compatibility for JDK 11 (Issue #256, Issue #257)
    • AssertionError message is unhelpful when match fails for byte type (Issue #254, Issue #255)
    • Use platform specific line breaks (PR #267)
    • Build now checks for consistent use of spaces (PR #217)

    Bugfixes

    Open source →
    Release notes

    Improvements

    • AllOf/AnyOf: Pass the matchers to constructor using varargs (Issue #245)
    • Matchers.anyOf: Fix generic bounds compatibility for JDK 11 (Issue #256, Issue #257)
    • AssertionError message is unhelpful when match fails for byte type (Issue #254, Issue #255)
    • Use platform specific line breaks (PR #267)
    • Build now checks for consistent use of spaces (PR #217)

    Bugfixes

    Open source →
  4. 2.2-rc1 05 Sep 2019 pre-release
    Release notes

    Improvements

    • AllOf/AnyOf: Pass the matchers to constructor using varargs (Issue #245)
    • Matchers.anyOf: Fix generic bounds compatibility for JDK 11 (Issue #256, Issue #257)
    • AssertionError message is unhelpful when match fails for byte type (Issue #254, Issue #255)
    • Use platform specific line breaks (PR #267)
    • Build now checks for consistent use of spaces (PR #217)

    Bugfixes

    Open source →
  5. 2.1 20 Dec 2018
    Release notes

    Overview

    After a long hiatus without releases, this version simplifies the packaging of
    Hamcrest into a single jar: hamcrest-2.1.jar. Other big changes include
    Java 9 module compatibility, along with numerous other improvements and bug
    fixes.

    Breaking Changes

    • Although the class API has not changed since Hamcrest 1.3, the way that the
      project is packaged has changed. Refer to the Hamcrest Distributables
      documentation for more information, and in particular the section on
      Upgrading from Hamcrest 1.x
    • The org.hamcrest.Factory annotation has been removed (it should not be used in client code)

    Changes

    • Publish a single jar hamcrest-2.1.jar
    • Documentation updates
    • Add implementation for CharSequence length matcher
    • Fix for TypeSafeDiagnosingMatcher can't detect generic types for subclass
    • Renamed IsCollectionContaining to IsIterableContaining
    • Make Hamcrest an OSGI bundle
    • Add StringRegularExpression matcher
    • Fix StringContainsInOrder to detect if a repeated pattern is missing
    • Add ArrayAsIterableMatcher
    • Fix description for IsEqualIgnoringCase
    • Fix JavaDoc examples
    • Upgraded to Java 7
    • Build with Gradle
    • Publish a single jar java-hamcrest-2.0.0.0.jar
    • Deprecate IsCollectionContaining and IsArrayContainingXXX
    • Removed deprecated methods from previous release
    • Improve mismatch description of hasItem/hasItems
    • General improvements to mismatch descriptions
    • Several JavaDoc improvements and corrections
    • Deprecated several matcher factory methods of the for "isXyz"
    • Fix GH issue #75 - address doclint errors reported in JDK 1.8
    • Fix GH issue #69 - Iterable contains in order is null-safe
    • Fix GH issue #59 - added equalToObject() (i.e. unchecked) method
    • Fix GH issue #25 - arrayContaining(null, null) cause NullPointerException
    • Fix GH issue #36 - string matching on regular expressions
    • Fix GH issue #8 - isCloseTo() shows wrong delta in mismatch description
    • Fix GH issue #59 - add untyped version of equalTo, named equalToObject
    • Fix GC issue #131 - Implement IsEmptyMap, IsMapWithSize
    • Fix GC issue #187 - IsArray.describeMismatchSafely() should use Matcher.describeMismatch
    • Fix GC issue #155 - Add Matcher implementation for files
    • Fix GC issue #69 - fix NPE in IsIterableContainingInOrder
    Open source →
    Release notes

    Overview for 2.1

    After a long hiatus without releases, this version simplifies the packaging of Hamcrest into a single jar: hamcrest-<version>.jar. Other big changes include Java 9 module compatibility, migrating the code repository from Google Code to GitHub, along with numerous other new features, improvements and bug fixes.

    Breaking Changes for 2.1

    • The way that the project is packaged has changed. This may cause problems with correctly upgrading transitive dependencies. Refer to the Hamcrest Distributables documentation for more information, and in particular, Upgrading from Hamcrest 1.x
    • org.hamcrest.Factory has been removed. This was only used in old implementations of the hamcrest build toolchain, and can safely be deleted from client code without any effect.

    Changes for 2.1

    • Documentation updates
    • Several JavaDoc improvements and corrections
    • Fix JavaDoc examples
    • Upgraded to Java 7
    • Build with Gradle
    • Publish a single jar hamcrest-2.1.jar
    • Publish pom-only artifacts for hamcrest-core and hamcrest-library.
    • Add implementation for CharSequence length matcher
    • Fix for TypeSafeDiagnosingMatcher can't detect generic types for subclass
    • Make Hamcrest an OSGI bundle
    • Add StringRegularExpression matcher
    • Fix StringContainsInOrder to detect if a repeated pattern is missing
    • Add ArrayAsIterableMatcher
    • Fix description for IsEqualIgnoringCase
    • Removed deprecated methods from previous release
    • Improve mismatch description of hasItem/hasItems
    • General improvements to mismatch descriptions
    • Deprecated several matcher factory methods of the for "isXyz"
    • Fix GH issue #75 - address doclint errors reported in JDK 1.8
    • Fix GH issue #69 - Iterable contains in order is null-safe
    • Fix GH issue #59 - added equalToObject() (i.e. unchecked) method
    • Fix GH issue #25 - arrayContaining(null, null) cause NullPointerException
    • Fix GH issue #36 - string matching on regular expressions
    • Fix GH issue #8 - isCloseTo() shows wrong delta in mismatch description
    • Fix GH issue #59 - add untyped version of equalTo, named equalToObject
    • Fix GC issue #131 - Implement IsEmptyMap, IsMapWithSize
    • Fix GC issue #187 - IsArray.describeMismatchSafely() should use Matcher.describeMismatch
    • Fix GC issue #155 - Add Matcher implementation for files
    • Fix GC issue #69 - fix NPE in IsIterableContainingInOrder
    Open source →
  6. 2.1-rc4 13 Dec 2018 pre-release
    Release notes

    Restore deleted classes to keep backwards compatibility with version 1.3, and mark them as deprecated.

    Open source →
  7. 2.1-rc3 29 Nov 2018 pre-release
    Release notes

    This fixes the problem that Maven has with interpreting pom-only artifacts. Both hamcrest-core and hamcrest-library artifacts now publish empty jars with a dependency on the hamcrest artifact.

    Open source →
  8. 2.1-rc2 27 Nov 2018 pre-release
    Release notes

    This release publishes pom-only artifacts for hamcrest-core and hamcrest-library for better backwards compatibility with previous releases.

    Open source →
  9. 1.3 09 Jul 2012
    Release notes
    • Introduce Condition class to ease the implementation of multi-step matches
    • Upgrade qdox (included in the generator) to the latest stable version
    • Correct inadvertent deprecation of the Is.isA factory method
    • Fix issue #179 - AllOf does not output mismatch description
    • Fix issue #177 - Introduced closeTo matcher for BigDecimals
    • Fix issue #152 - Factory classes missing from matchers.xml
    • Fix issue #144 - OrderingComparison doesn't describe mismatch of comparables that return values other than (-1,0,1)
    • Fix issue #134 - DescribedAs does not delegate describeMismatch
    • Fix issue #106 - deprecation warning when writing custom matchers
    • Fix issue #101 - Added theInstance alias for sameInstance factory method
    Open source →
  10. 1.3.RC2 22 Dec 2010 pre-release

    Nothing published for this version

  11. 1.2.1 22 Dec 2010

    Nothing published for this version

  12. 1.2 22 Sep 2010
    Release notes
    • Added mismatch reporting
    • Added WithSamePropertyValuesAs matcher
    • Moved any() from IsAnything to IsInstanceOf. It now checks the type of the matched object
    • Moved MatcherAssert from integration to core
    • Tightened up generics.
    • Added IsMapContainingKey and IsMapContainingValue matchers to resolve a generics bug in hasKey and hasValue static factories previously declared in IsMapContaining (ngd)
    • Added IsCollectionOnlyContaining and IsArrayOnlyContaining which matches collections (and arrays) where all match a given matcher. E.g onlyContains(3,4,5) or onlyContains(lessThan(9))
    • text module moved to separate project, hamcrest-text-patterns
    • added more colection matchers: xContainingInAnyOrder, xContainingInOrder, xWithSize
    • new text Matcher: IsEmptyString
    • hamcrest generator uses method return type
    Open source →
  13. 1.1 18 Jul 2007
    Release notes
    • Hamcrest Generator now includes JavaDoc and parameter names in generated code by using QDox to parse the source code.
    • Created hamcrest-core.jar (and removed hamcrest-api.jar). Moved core set of matchers (and, eq, not, etc) to this package to make it more practical for external libraries to embed Hamcrest.
    • Created CoreMatchers (static import sugar) in hamcrest-core.jar.
    • StringBuilder can use any Appendable (not just StringBuffer).
    • Added sensible toString() method to BaseMatcher.
    • Created StringDescription.asString() alias (because toString() caused issues with static imports).
    • Relaxed isInstanceOf() matcher generic type so it can be used on any kind of object. e.g. assertThat(someUnknownObject, isInstanceOf(String.class));
    • Added any(Class<T>), null(Class<T>) and notNull(Class<T>) matchers, which returns Matcher<T>. Helpful when the compiler struggles with type inference.
    • Modified anyOf() and allOf() to accept mixed-types.
    • TypeSafeMatcher.matchesSafely() is now public.
    • Generator recognizes @Factory methods that return subclass of Matcher. (Fix by David Saff)
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive