[ 
https://issues.apache.org/jira/browse/MNG-7818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17734322#comment-17734322
 ] 

ASF GitHub Bot commented on MNG-7818:
-------------------------------------

lprimak opened a new pull request, #1178:
URL: https://github.com/apache/maven/pull/1178

   Removed exclusion of hamcrest from JUnit 4
   
   Following this checklist to help us incorporate your
   contribution quickly and easily:
   
    - [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/MNG) filed
          for the change (usually before you start working on it).  Trivial 
changes like typos do not
          require a JIRA issue. Your pull request should address just this 
issue, without
          pulling in other changes.
    - [ ] Each commit in the pull request should have a meaningful subject line 
and body.
    - [ ] Format the pull request title like `[MNG-XXX] SUMMARY`,
          where you replace `MNG-XXX` and `SUMMARY` with the appropriate JIRA 
issue.
    - [ ] Also format the first line of the commit message like `[MNG-XXX] 
SUMMARY`.
          Best practice is to use the JIRA issue title in both the pull request 
title and in the first line of the commit message.
    - [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
    - [ ] Run `mvn clean verify` to make sure basic checks pass. A more 
thorough check will
          be performed on your pull request automatically.
    - [ ] You have run the [Core IT][core-its] successfully.
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 
2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [ ] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   [core-its]: https://maven.apache.org/core-its/core-it-suite/
   




> [REGRESSION] maven improperly excludes hamcrest-core from junit
> ---------------------------------------------------------------
>
>                 Key: MNG-7818
>                 URL: https://issues.apache.org/jira/browse/MNG-7818
>             Project: Maven
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.9.2
>         Environment: Any
>            Reporter: Lenny Primak
>            Priority: Minor
>
> junit 4 now has exclusions for hamcrest-core, which causes 
> ClassNotFouncException
> BTW: Using hamcrest-core  2.2 (as opposed to 1.3 and without exclusions) with 
> JUnit 4 works just fine as well, making the exclusion, again, unnecessary
> Traced to https://issues.apache.org/jira/browse/MNG-7670
> {code:java}
> [INFO] Running com.flowlogix.arqsuite.DeploymentOneTest
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.088 
> s <<< FAILURE! -- in com.flowlogix.arqsuite.DeploymentOneTest
> [ERROR] com.flowlogix.arqsuite.DeploymentOneTest.initializationError -- Time 
> elapsed: 0.009 s <<< ERROR!
> java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing
>       at java.base/java.lang.ClassLoader.defineClass1(Native Method)
>       at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1013)
>       at 
> java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
>       at 
> java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
>       at 
> java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
>       at 
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
>       at 
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
>       at 
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
>       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
>       at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
>       at 
> java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3473)
>       at java.base/java.lang.Class.getConstructor0(Class.java:3678)
>       at java.base/java.lang.Class.getConstructor(Class.java:2368)
>       at 
> org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
>       at 
> org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
>       at 
> org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
>       at 
> org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)
>       at 
> org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
>       at 
> org.junit.internal.requests.ClassRequest.createRunner(ClassRequest.java:28)
>       at 
> org.junit.internal.requests.MemoizingRequest.getRunner(MemoizingRequest.java:19)
>       at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:314)
>       at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:240)
>       at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:214)
>       at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:155)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
> Caused by: java.lang.ClassNotFoundException: org.hamcrest.SelfDescribing
>       at 
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
>       at 
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
>       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
>       ... 28 more  {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to