Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7818

[REGRESSION] maven improperly excludes hamcrest-core from junit

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.9.2
    • 3.9.3
    • Dependencies
    • None
    • Any

    Description

      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

      [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  

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            cstamas Tamas Cservenak
            lprimak Lenny Primak
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment