qos-ch / slf4j

Simple Logging Facade for Java
http://www.slf4j.org
MIT License
2.32k stars 980 forks source link

Version 2.0.10 failed to execute mvn test #384

Closed simon28li closed 8 months ago

simon28li commented 8 months ago

When I execute mvn test in the source directory, I report the following error:

----------------< org.slf4j:slf4j-jdk-platform-logging >----------------
[INFO] Building SLF4J JDK Platform Logging Integration 2.0.10            [7/16]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ slf4j-jdk-platform-logging ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 1 resource to META-INF
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ slf4j-jdk-platform-logging ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:compile (module-compile) @ slf4j-jdk-platform-logging ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-bundle-plugin:5.1.9:manifest (bundle-manifest) @ slf4j-jdk-platform-logging ---
[INFO] Stale files detected, re-generating manifest.
[INFO] Writing manifest: /home/stage/root/spack-stage-slf4j-2.0.10-d3eqrim3igcnehqt456nzz2wvlafq2sh/spack-src/slf4j-jdk-platform-logging/target/classes/META-INF/MANIFEST.MF
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ slf4j-jdk-platform-logging ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/stage/root/spack-stage-slf4j-2.0.10-d3eqrim3igcnehqt456nzz2wvlafq2sh/spack-src/slf4j-jdk-platform-logging/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) @ slf4j-jdk-platform-logging ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/stage/root/spack-stage-slf4j-2.0.10-d3eqrim3igcnehqt456nzz2wvlafq2sh/spack-src/slf4j-jdk-platform-logging/target/test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] module not found: org.slf4j
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for SLF4J BOM 2.0.10:
[INFO]
[INFO] SLF4J BOM .......................................... SUCCESS [  0.006 s]
[INFO] SLF4J Parent POM ................................... SUCCESS [  0.848 s]
[INFO] SLF4J API Module ................................... SUCCESS [  4.847 s]
[INFO] SLF4J Simple Provider .............................. SUCCESS [  3.226 s]
[INFO] SLF4J NOP Provider ................................. SUCCESS [  1.080 s]
[INFO] SLF4J JDK14 Provider ............................... SUCCESS [  2.813 s]
[INFO] SLF4J JDK Platform Logging Integration ............. FAILURE [  0.600 s]
[INFO] SLF4J LOG4J-12 Binding relocated ................... SKIPPED
[INFO] SLF4J Reload4j Provider ............................ SKIPPED
[INFO] SLF4J Extensions Module ............................ SKIPPED
[INFO] JCL 1.2 implemented over SLF4J ..................... SKIPPED
[INFO] Log4j Implemented Over SLF4J ....................... SKIPPED
[INFO] JUL to SLF4J bridge ................................ SKIPPED
[INFO] OSGi LogService implemented over SLF4J ............. SKIPPED
[INFO] SLF4J Integration tests ............................ SKIPPED
[INFO] SLF4J Migrator ..................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  13.908 s
[INFO] Finished at: 2024-01-05T15:20:30+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:testCompile (default-testCompile) on project slf4j-jdk-platform-logging: Compilation failure
[ERROR] module not found: org.slf4j
[ERROR]
[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-jdk-platform-logging
[root@simon28li spack-src]#
[root@simon28li spack-src]# pwd
/home/stage/root/spack-stage-slf4j-2.0.10-d3eqrim3igcnehqt456nzz2wvlafq2sh/spack-src

But when I went to the subdirectory where the test error was reported to test, I didn't report an error. What caused this?

[root@simon28li spack-src]# cd slf4j-jdk-platform-logging
[root@simon28li slf4j-jdk-platform-logging]# mvn test
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< org.slf4j:slf4j-jdk-platform-logging >----------------
[INFO] Building SLF4J JDK Platform Logging Integration 2.0.10
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ slf4j-jdk-platform-logging ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 1 resource to META-INF
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ slf4j-jdk-platform-logging ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:compile (module-compile) @ slf4j-jdk-platform-logging ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-bundle-plugin:5.1.9:manifest (bundle-manifest) @ slf4j-jdk-platform-logging ---
[INFO] Stale files detected, re-generating manifest.
[INFO] Writing manifest: /home/stage/root/spack-stage-slf4j-2.0.10-d3eqrim3igcnehqt456nzz2wvlafq2sh/spack-src/slf4j-jdk-platform-logging/target/classes/META-INF/MANIFEST.MF
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ slf4j-jdk-platform-logging ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/stage/root/spack-stage-slf4j-2.0.10-d3eqrim3igcnehqt456nzz2wvlafq2sh/spack-src/slf4j-jdk-platform-logging/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) @ slf4j-jdk-platform-logging ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/stage/root/spack-stage-slf4j-2.0.10-d3eqrim3igcnehqt456nzz2wvlafq2sh/spack-src/slf4j-jdk-platform-logging/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M7:test (default-test) @ slf4j-jdk-platform-logging ---
[INFO] Using auto detected provider org.apache.maven.surefire.junit4.JUnit4Provider
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.slf4j.jdk.platform.logging.test.SLF4JPlatformLoggingTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.114 s - in org.slf4j.jdk.platform.logging.test.SLF4JPlatformLoggingTest
[INFO] org.slf4j.jdk.platform.logging.test.SLF4JPlatformLoggingTest.throwTest  Time elapsed: 0.034 s
[INFO] org.slf4j.jdk.platform.logging.test.SLF4JPlatformLoggingTest.smoke  Time elapsed: 0 s
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.298 s
[INFO] Finished at: 2024-01-05T15:25:11+08:00
[INFO] ------------------------------------------------------------------------
[root@simon28li slf4j-jdk-platform-logging]#