From cf25e14f6ab2bbd7153afd51aed21e74475615c4 Mon Sep 17 00:00:00 2001 From: Joe Schmetzer Date: Wed, 24 Jul 2024 16:41:20 +1000 Subject: [PATCH] Cleanup README, fix broken links --- CHANGES.md | 49 ++++++++++++++++------------- README.md | 91 ++++++++++++++++++++++++++++-------------------------- 2 files changed, 75 insertions(+), 65 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 24ed5791..db0b1fcb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,18 +2,23 @@ ## Version 3.0 (Unreleased) +### 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](https://github.com/hamcrest/JavaHamcrest/issues/331) and + [PR #411](https://github.com/hamcrest/JavaHamcrest/issues/411) for details. Developers who use Java 1.7 earlier can still + depend upon `hamcrest-2.2.jar`. + ### Improvements -* Java 1.8 or newer ([Issue #331](https://github.com/hamcrest/JavaHamcrest/issues/331), [PR #411](https://github.com/hamcrest/JavaHamcrest/issues/411)). * FileMatchersTest simplification ([PR #389](https://github.com/hamcrest/JavaHamcrest/issues/389)) * License cleanup ([PR #414](https://github.com/hamcrest/JavaHamcrest/issues/414), -[PR #415](https://github.com/hamcrest/JavaHamcrest/issues/415), see also -[#264](https://github.com/hamcrest/JavaHamcrest/issues/264), -[#355](https://github.com/hamcrest/JavaHamcrest/issues/355), -[#396](https://github.com/hamcrest/JavaHamcrest/issues/396),and -[#399](https://github.com/hamcrest/JavaHamcrest/issues/399)) - -TBD + [PR #415](https://github.com/hamcrest/JavaHamcrest/issues/415), see also + [#264](https://github.com/hamcrest/JavaHamcrest/issues/264), + [#355](https://github.com/hamcrest/JavaHamcrest/issues/355), + [#396](https://github.com/hamcrest/JavaHamcrest/issues/396),and + [#399](https://github.com/hamcrest/JavaHamcrest/issues/399)) ### Bugfixes @@ -30,7 +35,7 @@ TBD * Build now checks for consistent use of spaces ([PR #217](https://github.com/hamcrest/JavaHamcrest/pull/217)) ### Bugfixes -* Fix compatibility issue for development with Android D8 ([Issue #246](https://github.com/hamcrest/JavaHamcrest/issues/246)) +* Fix compatibility issue for development with Android D8 ([Issue #246](https://github.com/hamcrest/JavaHamcrest/issues/246)) * Fix typo in license name ([Issue #247](https://github.com/hamcrest/JavaHamcrest/pull/247)) * 1.3 compatible constructors for string matchers ([Issue #259](https://github.com/hamcrest/JavaHamcrest/issues/259), [Issue #260](https://github.com/hamcrest/JavaHamcrest/issues/260)) * Fix for split packages with Java 9 modules ([Issue #269](https://github.com/hamcrest/JavaHamcrest/issues/269), [PR #270](https://github.com/hamcrest/JavaHamcrest/pull/270)) @@ -48,13 +53,13 @@ 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](http://hamcrest.org/JavaHamcrest/distributables.html) -documentation for more information, and in particular, -[Upgrading from Hamcrest 1.x](http://hamcrest.org/JavaHamcrest/distributables.html#upgrading-from-hamcrest-1.x) + correctly upgrading transitive dependencies. Refer to the + [Hamcrest Distributables](http://hamcrest.org/JavaHamcrest/distributables.html) + documentation for more information, and in particular, + [Upgrading from Hamcrest 1.x](http://hamcrest.org/JavaHamcrest/distributables.html#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. + of the hamcrest build toolchain, and can safely be deleted from client code without + any effect. ### Changes for 2.1 @@ -69,7 +74,7 @@ any effect. * 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 +* Fix StringContainsInOrder to detect if a repeated pattern is missing * Add ArrayAsIterableMatcher * Fix description for IsEqualIgnoringCase * Removed deprecated methods from previous release @@ -112,17 +117,17 @@ any effect. * 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 +* 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) +* 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 +* hamcrest generator uses method return type ## Version 1.1 (30th June 2007) @@ -146,7 +151,7 @@ any effect. * Generator recognizes @Factory methods that return subclass of Matcher. (Fix by David Saff) -## Version 1.0 (15th Dececmber 2006) +## Version 1.0 (15th December 2006) Initial release. diff --git a/README.md b/README.md index 95c5569e..9efd47fb 100644 --- a/README.md +++ b/README.md @@ -1,63 +1,68 @@ ![JavaHamcrest](http://hamcrest.org/images/logo.jpg) -[![Build Status](https://travis-ci.org/hamcrest/JavaHamcrest.png?branch=master)](https://travis-ci.org/hamcrest/JavaHamcrest) [![Maven Central](https://img.shields.io/maven-central/v/org.hamcrest/hamcrest.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.hamcrest/hamcrest) +[![Build Status](https://github.com/hamcrest/JavaHamcrest/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/hamcrest/JavaHamcrest/actions/workflows/build.yml) +[![Maven Central](https://img.shields.io/maven-central/v/org.hamcrest/hamcrest.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.hamcrest/hamcrest) +[![License](https://img.shields.io/github/license/hamcrest/JavaHamcrest.svg)](LICENSE) -Java Hamcrest -============= -Licensed under [BSD License][]. -What is Hamcrest? ------------------ +# Java Hamcrest + +## What is Hamcrest? + Hamcrest is a library of matchers, which can be combined in to create flexible expressions of intent in tests. They've also been used for other purposes. -Downloads ---------- -You can obtain Hamcrest binaries from [maven central](https://search.maven.org/artifact/org.hamcrest/hamcrest). Learn more at [Hamcrest Distributables](http://hamcrest.org/JavaHamcrest/distributables). +The [tutorial]([Hamcrest Distributables](http://hamcrest.org/JavaHamcrest/tutorial)) is +good place to see how Hamcrest can be used. + +## Downloads -Extensions ----------- +You can obtain Hamcrest binaries from [maven central](https://search.maven.org/artifact/org.hamcrest/hamcrest). If you +are using build tooling such as Maven, Gradle, etc, you can simply add a dependency declaration to your build +definition. Learn more at [Hamcrest Distributables](http://hamcrest.org/JavaHamcrest/distributables). -For Hamcrest extension projects see the [hamcrest extensions page][]. +## Documentation -Documentation -------------- Documentation can be found on the [Hamcrest site](http://hamcrest.org). -Reporting Bugs/Issues ---------------------- -If you find an issue with Java Hamcrest, please report it via the -[GitHub issue tracker](https://github.com/hamcrest/JavaHamcrest/issues), -after first checking that it hasn't been raised already. +## Reporting Bugs/Issues -Source ------- -To build, please read BUILDING.txt +If you find an issue with Java Hamcrest, please report it via the +[GitHub issue tracker](https://github.com/hamcrest/JavaHamcrest/issues), +after first checking that it hasn't been raised already. -Acknowledgements ----------------- -Developers: +## Build from Source - * Joe Walnes - * Nat Pryce - * Steve Freeman +Building Hamcrest from source requires a minimum of JDK 1.8. -Contributors: +Clone the repository, and from the top level directory in the repo +run the following command: - * Robert Chatley - * Tom White - * Neil Dunn - * Dan North - * Magne Rasmussen - * David Saff - * Tom Denley - * Joe Schmetzer +```shell +./gradlew clean build javadoc +``` +This will download the correct version of Gradle, do a full clean build, +run all tests and (if successful) package the compiled classes in a jar +file. The resulting look under the `hamcrest/build/libs` directory. -Also, thanks to everyone who has worked on DynaMock, nMock, jMock, EasyMock and MiniMock! These libraries inspired Hamcrest. +## Acknowledgements +Developers: + +* Joe Walnes +* Nat Pryce +* Steve Freeman + +Contributors: -[logo]: http://hamcrest.org/images/logo.jpg -[website]: https://github.com/hamcrest/JavaHamcrest -[BSD License]: http://opensource.org/licenses/BSD-3-Clause -[hamcrest extensions page]: https://github.com/hamcrest/JavaHamcrest/wiki/Related-Projects -[GitHub issue tracker]: https://github.com/hamcrest/JavaHamcrest/issues +* Robert Chatley +* Tom White +* Neil Dunn +* Dan North +* Magne Rasmussen +* David Saff +* Tom Denley +* Joe Schmetzer + +Also, thanks to everyone who has worked on DynaMock, nMock, jMock, EasyMock +and MiniMock! These libraries inspired Hamcrest.