Issue
I have a Maven project that I created in Eclipse, but I impatiently started just running mvn
on the command line instead of resolving all the errors that Eclipse raises.
Now I want to get what I have working from within Eclipse too. I found out you can run mvn compile
by right-clicking the project, then "Run as">"Maven build". Eclipse does actually run the Maven goals, but the console window only says:
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
SLF4J: Ignoring binding found at [jar:file:/C:/Users/kilian/.p2/pool/plugins/org.eclipse.m2e.maven.runtime_3.8.701.20230209-1606/jars/maven-slf4j-provider-3.8.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.
If I add org.slf4j:slf4j-api:2.0.7
as a dependency to the project, then the log statements from within my program (using Log4j2) show up. But no Maven output. I guess it's a separate issue? I can tweak the run configuration and set a checkbox "Debug Output". Then it will print
Apache Maven 3.8.7 (b89d5959fcde851dcb1c8946a785a163f14e1e29)[m
Maven home: C:\Users\kilian\code\eclipse-workspace\test\EMBEDDED
Java version: 17.0.7, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-17
Default locale: de_DE, platform encoding: UTF-8
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
in addition to the warning about SLF4J. But none of the actual Maven output (the whole BUILD SUCCESS stuff that Maven normally outputs) is printed.
I checked if there are any rogue SLF4J providers (this one is actually about my specific problem, that's why I think they may be related), and verified that the "M2E - SLF4J over Logback Logging" plugin is installed.
I'm running Eclipse version 2023-03 (4.27.0), with m2e 2.2.1 and also version 2.2.1 of the SLF4J/Logback plugin. I just created a blank project using maven-archetype-quickstart:1.4
, and it has the same behavior. The project creation process did print all output to the Eclipse console.
Any ideas what could be wrong?
EDIT: The m2e plugin version 2.4.0 does not have this issue any more.
Solution
I updated the m2e plugin to version 2.4.0 and the problem is gone now. Thanks howlger!
Answered By - LemongrabThree
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.