janklab / slf4m-jankalog

Modified forks of FLOSS logging libraries to support SLF4M
Other
0 stars 0 forks source link

slf4j: test failure - "The import junit cannot be resolved" in slf4j-api #18

Open apjanke opened 2 years ago

apjanke commented 2 years ago

In mvn package:

[INFO] skip non existing resourceDirectory /Users/janke/repos/slf4m-jankalog/src/opp/opp-munged/slf4j-1.5.8/slf4j-api/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ slf4j-api ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.5:test (default-test) @ slf4j-api ---
[INFO] Surefire report directory: /Users/janke/repos/slf4m-jankalog/src/opp/opp-munged/slf4j-1.5.8/slf4j-api/target/surefire-reports
org.apache.maven.surefire.booter.SurefireExecutionException: Unresolved compilation problems:
    The import junit cannot be resolved
    TestCase cannot be resolved to a type
    The method fail(String) is undefined for the type NoBindingTest
    The method fail(String) is undefined for the type NoBindingTest
; nested exception is java.lang.Error: Unresolved compilation problems:
    The import junit cannot be resolved
    TestCase cannot be resolved to a type
    The method fail(String) is undefined for the type NoBindingTest
    The method fail(String) is undefined for the type NoBindingTest

java.lang.Error: Unresolved compilation problems:
    The import junit cannot be resolved
    TestCase cannot be resolved to a type
    The method fail(String) is undefined for the type NoBindingTest
    The method fail(String) is undefined for the type NoBindingTest

    at org.slf4j.NoBindingTest.<init>(NoBindingTest.java:3)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at org.apache.maven.surefire.testset.PojoTestSet.<init>(PojoTestSet.java:55)
    at org.apache.maven.surefire.junit.JUnitDirectoryTestSuite.createTestSet(JUnitDirectoryTestSuite.java:64)
    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:69)
    at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:212)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:159)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
    at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for SLF4J 1.5.8-janklab.1:
[INFO]
[INFO] SLF4J .............................................. SUCCESS [  0.220 s]
[INFO] SLF4J API Module ................................... FAILURE [  0.819 s]
[INFO] SLF4J Simple Binding ............................... SKIPPED
[INFO] SLF4J NOP Binding .................................. SKIPPED
[INFO] SLF4J JDK14 Binding ................................ SKIPPED
[INFO] SLF4J LOG4J-12 Binding ............................. SKIPPED
[INFO] SLF4J JCL Binding .................................. SKIPPED
[INFO] SLF4J Extensions Module ............................ SKIPPED
[INFO] JCL 1.1.1 implemented over SLF4J ................... SKIPPED
[INFO] DEPRECATED - JCL 1.0.4 implemented over SLF4J ...... SKIPPED
[INFO] Log4j Implemented Over SLF4J ....................... SKIPPED
[INFO] JUL to SLF4J bridge ................................ SKIPPED
[INFO] SLF4J Integration tests ............................ SKIPPED
[INFO] SLF4J Site ......................................... SKIPPED
[INFO] SLF4J Migrator ..................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.145 s
[INFO] Finished at: 2022-09-13T16:17:12-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test (default-test) on project slf4j-api: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/janke/repos/slf4m-jankalog/src/opp/opp-munged/slf4j-1.5.8/slf4j-api/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :slf4j-api