Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hamcrest versioning #785

Merged
merged 1 commit into from
Jun 16, 2023
Merged

Fix hamcrest versioning #785

merged 1 commit into from
Jun 16, 2023

Conversation

timja
Copy link
Member

@timja timja commented Jun 16, 2023

Prior to this junit 4.x was bringing in hamcrest-core, causing jenkinsci/workflow-support-plugin#220 to fail:

mvn dependency:tree | grep -B3 -A 2 hamcrest-core
[INFO] |  |  \- com.shapesecurity:salvation2:jar:3.0.1:test
[INFO] |  +- io.jenkins.lib:support-log-formatter:jar:1.2:test
[INFO] |  +- junit:junit:jar:4.13.2:test
[INFO] |  |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] |  +- org.eclipse.jetty:jetty-security:jar:10.0.15:test
[INFO] |  |  \- org.eclipse.jetty:jetty-server:jar:10.0.15:test

See the docs:
https://hamcrest.org/JavaHamcrest/distributables

Care must be taken when upgrading from Hamcrest 1.3 or earlier. Due to the change in packaging, the version conflict resolution that happens in dependency management tools won’t happen automatically. A common example is projects that depend upon JUnit 4. JUnit 4 declares a transitive dependency upon hamcrest-core-1.3.jar. Because hamcrest-core is not the same artifact as hamcrest, it will not be upgraded.

Amends #762

Testing done

I've tested with a snapshot version of the pom:

mvn dependency:tree | grep -B3  hamcrest-core
[INFO] +- org.jenkins-ci.main:jenkins-test-harness:jar:2025.v6f97169a_d6a_f:test
[INFO] |  +- io.jenkins.lib:support-log-formatter:jar:1.2:test
[INFO] |  +- junit:junit:jar:4.13.2:test
[INFO] |  |  \- org.hamcrest:hamcrest-core:jar:2.2:test

Submitter checklist

Edit tasklist title
Beta Give feedback Tasklist Submitter checklist, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
    Options
  2. Ensure that the pull request title represents the desired changelog entry
    Options
  3. Please describe what you did
    Options
  4. Link to relevant issues in GitHub or Jira
    Options
  5. Link to relevant pull requests, esp. upstream and downstream changes
    Options
  6. Ensure you have provided tests - that demonstrates feature works or fixes the issue
    Options

Copy link
Member

@NotMyFault NotMyFault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JUnit 4, my beloved

@timja timja merged commit d5242a1 into jenkinsci:master Jun 16, 2023
1 check passed
@timja timja deleted the fix-hamcrest branch June 16, 2023 08:19
@basil
Copy link
Member

basil commented Aug 28, 2023

Should have been side-ported to jenkinsci/pom as in #475

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants