[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [m2e-users] [Issue] Embedded maven can't find SLF4J when there's a workspace dependency
|
I don't know if this worked or not, but below is the console output
running jetty:run goal on struts-module of the project you provided.
I had to enable workspace dependency resolution to make this work,
otherwise I was getting artifact resolution error for module1.
This was tested on macosx using fresh/clean m2e 1.1 installation, i.e.
without any m2e extensions.
Hope this helps.
--
Regards,
Igor
<log>
[INFO] Scanning for projects...
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building Struts 2 Blank Convention Webapp 1.0.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] >>> jetty-maven-plugin:8.0.4.v20111024:run (default-cli) @
struts-module >>>
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
struts-module ---
[WARNING] Using platform encoding (MacRoman actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
struts-module ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources
(default-testResources) @ struts-module ---
[WARNING] Using platform encoding (MacRoman actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
/private/tmp/parentA/struts-module/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile)
@ struts-module ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< jetty-maven-plugin:8.0.4.v20111024:run (default-cli) @
struts-module <<<
[INFO]
[INFO] --- jetty-maven-plugin:8.0.4.v20111024:run (default-cli) @
struts-module ---
[INFO] Configuring Jetty for project: Struts 2 Blank Convention Webapp
[INFO] webAppSourceDirectory
/private/tmp/parentA/struts-module/src/main/webapp does not exist.
Defaulting to /private/tmp/parentA/struts-module/src/main/webapp
[INFO] Reload Mechanic: automatic
[INFO] Classes = /private/tmp/parentA/struts-module/target/classes
[INFO] Context path = /
[INFO] Tmp directory = /private/tmp/parentA/struts-module/target/tmp
[INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
[INFO] Web overrides = none
[INFO] web.xml file =
file:/private/tmp/parentA/struts-module/src/main/webapp/WEB-INF/web.xml
[INFO] Webapp directory = /private/tmp/parentA/struts-module/src/main/webapp
2012-01-25 06:54:32.788:INFO:oejs.Server:jetty-8.0.4.v20111024
2012-01-25 06:54:33.147:INFO:oejpw.PlusConfiguration:No Transaction
manager found - if your webapp requires one, please configure one.
2012-01-25 06:54:34.388:INFO:oejsh.ContextHandler:started
o.m.j.p.JettyWebAppContext{/,file:/private/tmp/parentA/struts-module/src/main/webapp/},file:/private/tmp/parentA/struts-module/src/main/webapp/
2012-01-25 06:54:34.388:INFO:oejsh.ContextHandler:started
o.m.j.p.JettyWebAppContext{/,file:/private/tmp/parentA/struts-module/src/main/webapp/},file:/private/tmp/parentA/struts-module/src/main/webapp/
2012-01-25 06:54:34.388:INFO:oejsh.ContextHandler:started
o.m.j.p.JettyWebAppContext{/,file:/private/tmp/parentA/struts-module/src/main/webapp/},file:/private/tmp/parentA/struts-module/src/main/webapp/
2012-01-25 06:54:34.407:INFO:oejsh.ContextHandler:started
o.m.j.p.JettyWebAppContext{/,file:/private/tmp/parentA/struts-module/src/main/webapp/},file:/private/tmp/parentA/struts-module/src/main/webapp/
log4j:WARN No appenders could be found for logger
(com.opensymphony.xwork2.config.providers.XmlConfigurationProvider).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.
2012-01-25 06:54:34.806:INFO:oejs.AbstractConnector:Started
SelectChannelConnector@0.0.0.0:8080 STARTING
[INFO] Started Jetty Server
[INFO] Starting scanner at interval of 10 seconds.
</log>
On 12-01-24 7:49 AM, Miguel Almeida wrote:
Dear all,
I have a possible bug and I'd like to ask your help and opinion on it. T
*Assumptions:*
- The slf4j dependencies in the struts-module pom.xml are correct. I
believe they are: line 44-55 declare the dependencies and line 77 and
below tackle the commons-logging dependency.
- Running m2e 1.0.100.20110804-1717 on Indigo
- Running JDK: java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
*Steps:*
1) Add zipped project in Eclipse. It is composed of parentA and two
modules: module1 (jar) and struts-module (war)
2) Create a run configuration for the struts-module with goal jetty-run
*Expected:*
- Runs without problems
*Actual:*
First few lines of log say:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for
further details.
*Pinpointing the issue:*
- If you remove the module1 dependency of struts-module (line 89 of the
pom) the problem disappears.
- If I switch the run configuration to use "external maven - 3.0.3"
instead of "embedded", the problem doesn't appear.
I appreciate your feedback. If you could try out the testCase, it would
be great.
Cheers,
Miguel Almeida
_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users