[jira] (MNG-5783) cobertura-maven-plugin:instrument failing NoClassDefFoundError: org/slf4j/LoggerFactory

2015-03-10 Thread Igor Fedorenko (JIRA)

 [ 
https://jira.codehaus.org/browse/MNG-5783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Fedorenko closed MNG-5783.
---

Resolution: Fixed

Maven 3.2.5 and earlier did not filter slf4j and javax.inject from plugin and 
build extension realms, which resulted in the same classes available from 
multiple classloaders and caused in hard to debug build failures in some cases. 

To fix that I've added slf4j and javax.inject to the list of artifacts exported 
by Maven core, which broke cobertura and probably other plugins that use 
${plugin.artifacts} to setup classpath of external jvm and need slf4j.

The solution is to move core artifact from plugin dependency resolver to class 
realm manager. This way ${plugin.artifacts} will include all plugin 
compile/runtime dependencies, but class realms will only include artifacts 
unique to the plugin.

As a result of the fix some plugins will resolve additional artifact jars from 
remote repositories. This should not cause problems in practice because 
corresponding artifact poms are already resolved during the build. If this does 
cause problems, unwanted dependencies can be blocked both from consuming 
projects pom.xml using plugin  elements, or, more permanently, by 
plugin developers by using scope=provided.

Fix
https://git-wip-us.apache.org/repos/asf?p=maven.git&a=search&h=HEAD&st=commit&s=MNG-5783

IT
https://git1-us-west.apache.org/repos/asf?p=maven-integration-testing.git&a=search&h=HEAD&st=commit&s=MNG-5783

> cobertura-maven-plugin:instrument failing NoClassDefFoundError: 
> org/slf4j/LoggerFactory
> ---
>
> Key: MNG-5783
> URL: https://jira.codehaus.org/browse/MNG-5783
> Project: Maven
>  Issue Type: Bug
>Affects Versions: 3.3.0
>Reporter: Herve Boutemy
>Assignee: Igor Fedorenko
>Priority: Critical
> Fix For: 3.3.0
>
> Attachments: build-3.2.5.log, build-3.3.0-SNAPSHOT.log
>
>
> testing cobertura-maven-plugin from svn 
> http://mojo.codehaus.org/cobertura-maven-plugin/
> IT pass with Maven 3.2.5 but fail with 3.3.0-SNAPSHOT
> (not the same issue as MNG-5779)
> {noformat}[DEBUG] /bin/sh -c /opt/jdk1.7.0_71/jre/bin/java 
> -Dlog4j.configuration=file:/tmp/log4j1560920244563737852config.properties 
> -Xmx1024m net.sourceforge.cobertura.instrument.InstrumentMain --commandsfile 
> /tmp/cobertura.4914644993417176752.cmdline
> [DEBUG] exit code: 1
> [DEBUG] 
> [DEBUG]  Standard error from the Cobertura task:
> [DEBUG] 
> [ERROR] Exception in thread "main" java.lang.NoClassDefFoundError: 
> org/slf4j/LoggerFactory
>   at 
> net.sourceforge.cobertura.instrument.InstrumentMain$LoggerWrapper.(InstrumentMain.java:165)
>   at 
> net.sourceforge.cobertura.instrument.InstrumentMain$LoggerWrapper.(InstrumentMain.java:164)
>   at 
> net.sourceforge.cobertura.instrument.InstrumentMain.(InstrumentMain.java:66)
> Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
>   at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
>   at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
>   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>   ... 3 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)


[jira] (MNG-5783) cobertura-maven-plugin:instrument failing NoClassDefFoundError: org/slf4j/LoggerFactory

2015-03-10 Thread Igor Fedorenko (JIRA)

 [ 
https://jira.codehaus.org/browse/MNG-5783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Fedorenko reassigned MNG-5783:
---

Assignee: Igor Fedorenko

> cobertura-maven-plugin:instrument failing NoClassDefFoundError: 
> org/slf4j/LoggerFactory
> ---
>
> Key: MNG-5783
> URL: https://jira.codehaus.org/browse/MNG-5783
> Project: Maven
>  Issue Type: Bug
>Affects Versions: 3.3.0
>Reporter: Herve Boutemy
>Assignee: Igor Fedorenko
>Priority: Critical
> Fix For: 3.3.0
>
> Attachments: build-3.2.5.log, build-3.3.0-SNAPSHOT.log
>
>
> testing cobertura-maven-plugin from svn 
> http://mojo.codehaus.org/cobertura-maven-plugin/
> IT pass with Maven 3.2.5 but fail with 3.3.0-SNAPSHOT
> (not the same issue as MNG-5779)
> {noformat}[DEBUG] /bin/sh -c /opt/jdk1.7.0_71/jre/bin/java 
> -Dlog4j.configuration=file:/tmp/log4j1560920244563737852config.properties 
> -Xmx1024m net.sourceforge.cobertura.instrument.InstrumentMain --commandsfile 
> /tmp/cobertura.4914644993417176752.cmdline
> [DEBUG] exit code: 1
> [DEBUG] 
> [DEBUG]  Standard error from the Cobertura task:
> [DEBUG] 
> [ERROR] Exception in thread "main" java.lang.NoClassDefFoundError: 
> org/slf4j/LoggerFactory
>   at 
> net.sourceforge.cobertura.instrument.InstrumentMain$LoggerWrapper.(InstrumentMain.java:165)
>   at 
> net.sourceforge.cobertura.instrument.InstrumentMain$LoggerWrapper.(InstrumentMain.java:164)
>   at 
> net.sourceforge.cobertura.instrument.InstrumentMain.(InstrumentMain.java:66)
> Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
>   at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
>   at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
>   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>   ... 3 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)


[jira] (MNG-5783) cobertura-maven-plugin:instrument failing NoClassDefFoundError: org/slf4j/LoggerFactory

2015-03-09 Thread Herve Boutemy (JIRA)

 [ 
https://jira.codehaus.org/browse/MNG-5783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Herve Boutemy updated MNG-5783:
---

Attachment: build-3.3.0-SNAPSHOT.log
build-3.2.5.log

attached {{check-pass}} IT build.log for Maven 3.2.5 and 3.3.0-SNAPSHOT to see 
the difference

with Maven 3.2.5
{noformat}[DEBUG] Created new class realm 
plugin>org.codehaus.mojo:cobertura-maven-plugin:2.8-SNAPSHOT
[DEBUG] Importing foreign packages into class realm 
plugin>org.codehaus.mojo:cobertura-maven-plugin:2.8-SNAPSHOT
[DEBUG]   Imported:  < maven.api
[DEBUG] Populating class realm 
plugin>org.codehaus.mojo:cobertura-maven-plugin:2.8-SNAPSHOT
[DEBUG]   Included: org.codehaus.mojo:cobertura-maven-plugin:jar:2.8-SNAPSHOT
[DEBUG]   Included: net.sourceforge.cobertura:cobertura:jar:2.1.1
[DEBUG]   Included: org.ow2.asm:asm:jar:5.0.1
[DEBUG]   Included: org.ow2.asm:asm-tree:jar:5.0.1
[DEBUG]   Included: org.ow2.asm:asm-commons:jar:5.0.1
[DEBUG]   Included: org.ow2.asm:asm-util:jar:5.0.1
[DEBUG]   Included: org.ow2.asm:asm-analysis:jar:5.0.1
[DEBUG]   Included: oro:oro:jar:2.0.8
[DEBUG]   Included: org.apache.ant:ant:jar:1.8.3
[DEBUG]   Included: org.apache.ant:ant-launcher:jar:1.8.3
[DEBUG]   Included: org.apache.ant:ant-junit:jar:1.8.3
[DEBUG]   Included: org.mortbay.jetty:servlet-api-2.5:jar:6.1.14
[DEBUG]   Included: org.mortbay.jetty:jetty:jar:6.1.14
[DEBUG]   Included: org.mortbay.jetty:jetty-util:jar:6.1.14
[DEBUG]   Included: com.sun:tools:jar:0
[DEBUG]   Included: org.slf4j:slf4j-api:jar:1.7.5
[DEBUG]   Included: ch.qos.logback:logback-classic:jar:1.0.13
[DEBUG]   Included: ch.qos.logback:logback-core:jar:1.0.13
[DEBUG]   Included: org.apache.commons:commons-lang3:jar:3.3.2
[DEBUG]   Included: xerces:xercesImpl:jar:2.11.0
[DEBUG]   Included: xml-apis:xml-apis:jar:1.4.01
[DEBUG]   Included: jaxen:jaxen:jar:1.1.4
[DEBUG]   Included: org.jdom:jdom:jar:1.1.3
[DEBUG]   Included: net.sourceforge.cobertura:cobertura-runtime:pom:2.1.1
[DEBUG]   Included: urbanophile:java-getopt:jar:1.0.9
[DEBUG]   Included: commons-cli:commons-cli:jar:1.0
[DEBUG]   Included: org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4
[DEBUG]   Included: org.apache.maven.reporting:maven-reporting-api:jar:2.0.8
[DEBUG]   Included: org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-9
[DEBUG]   Included: org.apache.maven.reporting:maven-reporting-impl:jar:2.0.4.2
[DEBUG]   Included: commons-validator:commons-validator:jar:1.2.0
[DEBUG]   Included: commons-beanutils:commons-beanutils:jar:1.7.0
[DEBUG]   Included: commons-digester:commons-digester:jar:1.6
[DEBUG]   Included: commons-logging:commons-logging:jar:1.0.4
[DEBUG]   Included: org.apache.maven.doxia:doxia-core:jar:1.0
[DEBUG]   Included: org.apache.maven.doxia:doxia-site-renderer:jar:1.0
[DEBUG]   Included: org.codehaus.plexus:plexus-i18n:jar:1.0-beta-7
[DEBUG]   Included: org.codehaus.plexus:plexus-velocity:jar:1.1.7
[DEBUG]   Included: org.apache.velocity:velocity:jar:1.5
[DEBUG]   Included: org.apache.maven.doxia:doxia-decoration-model:jar:1.0
[DEBUG]   Included: commons-collections:commons-collections:jar:3.2
[DEBUG]   Included: org.apache.maven.doxia:doxia-module-apt:jar:1.0
[DEBUG]   Included: org.apache.maven.doxia:doxia-module-fml:jar:1.0
[DEBUG]   Included: org.apache.maven.doxia:doxia-module-xdoc:jar:1.0
[DEBUG]   Included: org.apache.maven.doxia:doxia-module-xhtml:jar:1.0
[DEBUG]   Included: commons-lang:commons-lang:jar:2.4
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:2.0.2
[DEBUG]   Included: org.apache.maven.shared:maven-invoker:jar:2.0.11
[DEBUG]   Excluded: junit:junit:jar:4.11
[DEBUG]   Excluded: org.hamcrest:hamcrest-core:jar:1.3
[DEBUG]   Excluded: org.apache.maven:maven-core:jar:2.0.8
[DEBUG]   Excluded: org.apache.maven:maven-settings:jar:2.0.8
[DEBUG]   Excluded: org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.8
[DEBUG]   Excluded: org.apache.maven:maven-profile:jar:2.0.8
[DEBUG]   Excluded: org.apache.maven:maven-model:jar:2.0.8
[DEBUG]   Excluded: 
org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1
[DEBUG]   Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.8
[DEBUG]   Excluded: org.apache.maven:maven-error-diagnostics:jar:2.0.8
[DEBUG]   Excluded: org.apache.maven:maven-plugin-descriptor:jar:2.0.8
[DEBUG]   Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.8
[DEBUG]   Excluded: org.apache.maven:maven-monitor:jar:2.0.8
[DEBUG]   Excluded: classworlds:classworlds:jar:1.1
[DEBUG]   Excluded: org.apache.maven:maven-artifact:jar:2.0.8
[DEBUG]   Excluded: org.apache.maven:maven-plugin-api:jar:2.0.8
[DEBUG]   Excluded: org.apache.maven:maven-project:jar:2.0.8
[DEBUG]   Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.8
[DEBUG] Configuring mojo 
org.codehaus.mojo:cobertura-maven-plugin:2.8-SNAPSHOT:instrument from plugin 
realm ClassRealm[plugin>org.codehaus.mojo:cobertura-maven-plugin:2.8-SNAPSHOT, 
parent: sun.misc.Launch

[jira] (MNG-5783) cobertura-maven-plugin:instrument failing NoClassDefFoundError: org/slf4j/LoggerFactory

2015-03-09 Thread Herve Boutemy (JIRA)
Herve Boutemy created MNG-5783:
--

 Summary: cobertura-maven-plugin:instrument failing 
NoClassDefFoundError: org/slf4j/LoggerFactory
 Key: MNG-5783
 URL: https://jira.codehaus.org/browse/MNG-5783
 Project: Maven
  Issue Type: Bug
Affects Versions: 3.3.0
Reporter: Herve Boutemy
Priority: Critical


testing cobertura-maven-plugin from svn 
http://mojo.codehaus.org/cobertura-maven-plugin/
IT pass with Maven 3.2.5 but fail with 3.3.0-SNAPSHOT

(not the same issue as MNG-5779)

{noformat}[DEBUG] /bin/sh -c /opt/jdk1.7.0_71/jre/bin/java 
-Dlog4j.configuration=file:/tmp/log4j1560920244563737852config.properties 
-Xmx1024m net.sourceforge.cobertura.instrument.InstrumentMain --commandsfile 
/tmp/cobertura.4914644993417176752.cmdline
[DEBUG] exit code: 1
[DEBUG] 
[DEBUG]  Standard error from the Cobertura task:
[DEBUG] 
[ERROR] Exception in thread "main" java.lang.NoClassDefFoundError: 
org/slf4j/LoggerFactory
at 
net.sourceforge.cobertura.instrument.InstrumentMain$LoggerWrapper.(InstrumentMain.java:165)
at 
net.sourceforge.cobertura.instrument.InstrumentMain$LoggerWrapper.(InstrumentMain.java:164)
at 
net.sourceforge.cobertura.instrument.InstrumentMain.(InstrumentMain.java:66)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 3 more
{noformat}



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)


[jira] (MNG-5783) cobertura-maven-plugin:instrument failing NoClassDefFoundError: org/slf4j/LoggerFactory

2015-03-09 Thread Herve Boutemy (JIRA)

 [ 
https://jira.codehaus.org/browse/MNG-5783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Herve Boutemy updated MNG-5783:
---

Fix Version/s: 3.3.0

> cobertura-maven-plugin:instrument failing NoClassDefFoundError: 
> org/slf4j/LoggerFactory
> ---
>
> Key: MNG-5783
> URL: https://jira.codehaus.org/browse/MNG-5783
> Project: Maven
>  Issue Type: Bug
>Affects Versions: 3.3.0
>Reporter: Herve Boutemy
>Priority: Critical
> Fix For: 3.3.0
>
>
> testing cobertura-maven-plugin from svn 
> http://mojo.codehaus.org/cobertura-maven-plugin/
> IT pass with Maven 3.2.5 but fail with 3.3.0-SNAPSHOT
> (not the same issue as MNG-5779)
> {noformat}[DEBUG] /bin/sh -c /opt/jdk1.7.0_71/jre/bin/java 
> -Dlog4j.configuration=file:/tmp/log4j1560920244563737852config.properties 
> -Xmx1024m net.sourceforge.cobertura.instrument.InstrumentMain --commandsfile 
> /tmp/cobertura.4914644993417176752.cmdline
> [DEBUG] exit code: 1
> [DEBUG] 
> [DEBUG]  Standard error from the Cobertura task:
> [DEBUG] 
> [ERROR] Exception in thread "main" java.lang.NoClassDefFoundError: 
> org/slf4j/LoggerFactory
>   at 
> net.sourceforge.cobertura.instrument.InstrumentMain$LoggerWrapper.(InstrumentMain.java:165)
>   at 
> net.sourceforge.cobertura.instrument.InstrumentMain$LoggerWrapper.(InstrumentMain.java:164)
>   at 
> net.sourceforge.cobertura.instrument.InstrumentMain.(InstrumentMain.java:66)
> Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
>   at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
>   at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
>   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>   ... 3 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)