maven-antrun-plugin fails because of missing class

2012-02-09 Thread Lewis, Eric
Hi

We're migrating our build to Maven 3.0.3 and the latest Nexus.
Now I'm having a problem with the maven-antrun-plugin. I have a build that 
gathers some files, simple stuff.

Anyway, this was building correctly on our test server, until we cleared the 
local Maven repo. Since then I keep getting the error below. My local build 
still works, but then I didn't touch my local Maven repo.

Any clues? It seems to me that org.apache.tools.ant.BuildException should be 
part of Ant and thus be found...

Thanks  best regards,
Eric



[INFO] --- maven-antrun-plugin:1.7:run (gather-internal-xml-schemas) @ 
xml-schemas ---
[DEBUG] org.apache.maven.plugins:maven-antrun-plugin:jar:1.7:
[DEBUG]ant:ant-optional:jar:1.5.3-1:runtime
[DEBUG]org.apache.maven:maven-plugin-api:jar:2.0.11:compile
[DEBUG]org.apache.maven:maven-project:jar:2.0.11:compile
[DEBUG]   org.apache.maven:maven-settings:jar:2.0.11:compile
[DEBUG]   org.apache.maven:maven-profile:jar:2.0.11:compile
[DEBUG]   org.apache.maven:maven-model:jar:2.0.11:compile
[DEBUG]   org.apache.maven:maven-artifact-manager:jar:2.0.11:compile
[DEBUG]  org.apache.maven:maven-repository-metadata:jar:2.0.11:compile
[DEBUG]   org.apache.maven:maven-plugin-registry:jar:2.0.11:compile
[DEBUG]   org.codehaus.plexus:plexus-interpolation:jar:1.1:compile
[DEBUG]   
org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[DEBUG]  junit:junit:jar:3.8.1:compile
[DEBUG]  classworlds:classworlds:jar:1.1-alpha-2:compile
[DEBUG]org.apache.maven:maven-artifact:jar:2.0.11:compile
[DEBUG]org.codehaus.plexus:plexus-utils:jar:2.0.5:compile
[DEBUG]org.apache.ant:ant:jar:1.8.2:compile
[DEBUG]   org.apache.ant:ant-launcher:jar:1.8.2:compile
[DEBUG] Created new class realm 
pluginorg.apache.maven.plugins:maven-antrun-plugin:1.7
[DEBUG] Importing foreign packages into class realm 
pluginorg.apache.maven.plugins:maven-antrun-plugin:1.7
[DEBUG]   Imported:   maven.api
[DEBUG] Populating class realm 
pluginorg.apache.maven.plugins:maven-antrun-plugin:1.7
[DEBUG]   Included: org.apache.maven.plugins:maven-antrun-plugin:jar:1.7
[DEBUG]   Included: ant:ant-optional:jar:1.5.3-1
[DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.1
[DEBUG]   Included: junit:junit:jar:3.8.1
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:2.0.5
[DEBUG]   Included: org.apache.ant:ant:jar:1.8.2
[DEBUG]   Included: org.apache.ant:ant-launcher:jar:1.8.2
[DEBUG]   Excluded: org.apache.maven:maven-plugin-api:jar:2.0.11
[DEBUG]   Excluded: org.apache.maven:maven-project:jar:2.0.11
[DEBUG]   Excluded: org.apache.maven:maven-settings:jar:2.0.11
[DEBUG]   Excluded: org.apache.maven:maven-profile:jar:2.0.11
[DEBUG]   Excluded: org.apache.maven:maven-model:jar:2.0.11
[DEBUG]   Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.11
[DEBUG]   Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.11
[DEBUG]   Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.11
[DEBUG]   Excluded: 
org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1
[DEBUG]   Excluded: classworlds:classworlds:jar:1.1-alpha-2
[DEBUG]   Excluded: org.apache.maven:maven-artifact:jar:2.0.11
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-antrun-plugin:1.7:run 
from plugin realm 
ClassRealm[pluginorg.apache.maven.plugins:maven-antrun-plugin:1.7, parent: 
sun.misc.Launcher$AppClassLoader@799134f4]
09.02.2012 11:15:37 org.sonatype.guice.bean.reflect.LoadedClass
WARNUNG: Error injecting: org.apache.maven.plugin.antrun.AntRunMojo
java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getDeclaredConstructors(Class.java:1836)
at 
com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243)
at 
com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96)
at 
com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:628)
at 
com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:835)
at 
com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:769)
at 
com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:254)
at 
com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205)
at 
com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:843)
at 
com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:957)
at 
com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:990)
at 
com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:951)
at 

Classloading issues with Maven 3 on Linux (was: maven-antrun-plugin fails because of missing class)

2012-02-09 Thread Lewis, Eric
[ERROR] urls[28] = 
file:/home/swe/.m2/repository/org/codehaus/plexus/plexus-velocity/1.1.7/plexus-velocity-1.1.7.jar
[ERROR] urls[29] = 
file:/home/swe/.m2/repository/org/apache/velocity/velocity/1.5/velocity-1.5.jar
[ERROR] urls[30] = 
file:/home/swe/.m2/repository/org/apache/maven/doxia/doxia-decoration-model/1.0-alpha-10/doxia-decoration-model-1.0-alpha-10.jar
[ERROR] urls[31] = 
file:/home/swe/.m2/repository/commons-collections/commons-collections/3.2/commons-collections-3.2.jar
[ERROR] urls[32] = 
file:/home/swe/.m2/repository/org/apache/maven/doxia/doxia-module-apt/1.0-alpha-10/doxia-module-apt-1.0-alpha-10.jar
[ERROR] urls[33] = 
file:/home/swe/.m2/repository/org/apache/maven/doxia/doxia-module-fml/1.0-alpha-10/doxia-module-fml-1.0-alpha-10.jar
[ERROR] urls[34] = 
file:/home/swe/.m2/repository/org/apache/maven/doxia/doxia-module-xdoc/1.0-alpha-10/doxia-module-xdoc-1.0-alpha-10.jar
[ERROR] urls[35] = 
file:/home/swe/.m2/repository/org/apache/maven/doxia/doxia-module-xhtml/1.0-alpha-10/doxia-module-xhtml-1.0-alpha-10.jar
[ERROR] urls[36] = 
file:/home/swe/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] urls[37] = 
file:/home/swe/.m2/repository/org/slf4j/slf4j-api/1.5.10/slf4j-api-1.5.10.jar
[ERROR] urls[38] = 
file:/home/swe/.m2/repository/org/sonatype/gossip/gossip/1.2/gossip-1.2.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -: 
groovy.lang.GroovyResourceLoader
[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/PluginContainerException


-Ursprüngliche Nachricht-
Von: Lewis, Eric [mailto:eric.le...@ipi.ch] 
Gesendet: Donnerstag, 9. Februar 2012 12:12
An: users@maven.apache.org
Betreff: maven-antrun-plugin fails because of missing class

Hi

We're migrating our build to Maven 3.0.3 and the latest Nexus.
Now I'm having a problem with the maven-antrun-plugin. I have a build that 
gathers some files, simple stuff.

Anyway, this was building correctly on our test server, until we cleared the 
local Maven repo. Since then I keep getting the error below. My local build 
still works, but then I didn't touch my local Maven repo.

Any clues? It seems to me that org.apache.tools.ant.BuildException should be 
part of Ant and thus be found...

Thanks  best regards,
Eric



[INFO] --- maven-antrun-plugin:1.7:run (gather-internal-xml-schemas) @ 
xml-schemas ---
[DEBUG] org.apache.maven.plugins:maven-antrun-plugin:jar:1.7:
[DEBUG]ant:ant-optional:jar:1.5.3-1:runtime
[DEBUG]org.apache.maven:maven-plugin-api:jar:2.0.11:compile
[DEBUG]org.apache.maven:maven-project:jar:2.0.11:compile
[DEBUG]   org.apache.maven:maven-settings:jar:2.0.11:compile
[DEBUG]   org.apache.maven:maven-profile:jar:2.0.11:compile
[DEBUG]   org.apache.maven:maven-model:jar:2.0.11:compile
[DEBUG]   org.apache.maven:maven-artifact-manager:jar:2.0.11:compile
[DEBUG]  org.apache.maven:maven-repository-metadata:jar:2.0.11:compile
[DEBUG]   org.apache.maven:maven-plugin-registry:jar:2.0.11:compile
[DEBUG]   org.codehaus.plexus:plexus-interpolation:jar:1.1:compile
[DEBUG]   
org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[DEBUG]  junit:junit:jar:3.8.1:compile
[DEBUG]  classworlds:classworlds:jar:1.1-alpha-2:compile
[DEBUG]org.apache.maven:maven-artifact:jar:2.0.11:compile
[DEBUG]org.codehaus.plexus:plexus-utils:jar:2.0.5:compile
[DEBUG]org.apache.ant:ant:jar:1.8.2:compile
[DEBUG]   org.apache.ant:ant-launcher:jar:1.8.2:compile
[DEBUG] Created new class realm 
pluginorg.apache.maven.plugins:maven-antrun-plugin:1.7
[DEBUG] Importing foreign packages into class realm 
pluginorg.apache.maven.plugins:maven-antrun-plugin:1.7
[DEBUG]   Imported:   maven.api
[DEBUG] Populating class realm 
pluginorg.apache.maven.plugins:maven-antrun-plugin:1.7
[DEBUG]   Included: org.apache.maven.plugins:maven-antrun-plugin:jar:1.7
[DEBUG]   Included: ant:ant-optional:jar:1.5.3-1
[DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.1
[DEBUG]   Included: junit:junit:jar:3.8.1
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:2.0.5
[DEBUG]   Included: org.apache.ant:ant:jar:1.8.2
[DEBUG]   Included: org.apache.ant:ant-launcher:jar:1.8.2
[DEBUG]   Excluded: org.apache.maven:maven-plugin-api:jar:2.0.11
[DEBUG]   Excluded: org.apache.maven:maven-project:jar:2.0.11
[DEBUG]   Excluded: org.apache.maven:maven-settings:jar:2.0.11
[DEBUG]   Excluded: org.apache.maven:maven-profile:jar:2.0.11
[DEBUG]   Excluded: org.apache.maven:maven-model:jar:2.0.11
[DEBUG]   Excluded

Classloading issues with Maven 3 on Linux (was: maven-antrun-plugin fails because of missing class)

2012-02-09 Thread Lewis, Eric
OK, so I checked the last possible difference with the build: Nexus
I switched the settings.xml to use our productive Nexus (1.7.2) instead of our 
test Nexus (1.9.2.4)
Then I once again cleared the local Maven repo.

And to my astonishment, everything worked fine!

Hmmm... has anyone experienced anything like this? Or should I ask on the Nexus 
mailing list?

Best regards,
Eric

-Ursprüngliche Nachricht-
Von: Lewis, Eric [mailto:eric.le...@ipi.ch] 
Gesendet: Donnerstag, 9. Februar 2012 15:38
An: Maven Users List
Betreff: Classloading issues with Maven 3 on Linux (was: maven-antrun-plugin 
fails because of missing class)

Me again  :-)

Ok, it turns out this is not a maven-antrun-problem, but a general classloading 
problem which we seem to have on Linux.
The local builds are on Windows, and to make sure I'm in the same situation as 
on Linux, I removed my local Maven repo and started over, using the 
gmaven-plugin this time.

Everything went well on Windows, all the dependencies downloaded and everything 
ran fine.

However, once I removed the local repo on Linux, the situation was different. 
While the build of our Parent POM worked fine (all plugins downloaded etc.), 
the gmaven-plugin failed (see below). So this seems to be an artifact 
downloading/classloading issue.

Any ideas?

[INFO]
[INFO] --- gmaven-plugin:1.4:execute (gather-internal-xml-schemas) @ 
xml-schemas ---
[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time: 3.379s
[INFO] Finished at: Thu Feb 09 15:33:05 CET 2012
[INFO] Final Memory: 16M/618M
[INFO] 
[ERROR] Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.4:execute 
(gather-internal-xml-schemas) on project xml-schemas: Execution 
gather-internal-xml-schemas of goal 
org.codehaus.gmaven:gmaven-plugin:1.4:execute failed: A required class was 
missing while executing org.codehaus.gmaven:gmaven-plugin:1.4:execute: 
groovy/lang/GroovyResourceLoader
[ERROR] -
[ERROR] realm =pluginorg.codehaus.gmaven:gmaven-plugin:1.4
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = 
file:/home/swe/.m2/repository/org/codehaus/gmaven/gmaven-plugin/1.4/gmaven-plugin-1.4.jar
[ERROR] urls[1] = 
file:/home/swe/.m2/repository/org/codehaus/gmaven/runtime/gmaven-runtime-api/1.4/gmaven-runtime-api-1.4.jar
[ERROR] urls[2] = 
file:/home/swe/.m2/repository/org/codehaus/gmaven/feature/gmaven-feature-api/1.4/gmaven-feature-api-1.4.jar
[ERROR] urls[3] = 
file:/home/swe/.m2/repository/org/codehaus/gmaven/runtime/gmaven-runtime-loader/1.4/gmaven-runtime-loader-1.4.jar
[ERROR] urls[4] = 
file:/home/swe/.m2/repository/org/codehaus/gmaven/feature/gmaven-feature-support/1.4/gmaven-feature-support-1.4.jar
[ERROR] urls[5] = 
file:/home/swe/.m2/repository/org/codehaus/gmaven/runtime/gmaven-runtime-support/1.4/gmaven-runtime-support-1.4.jar
[ERROR] urls[6] = 
file:/home/swe/.m2/repository/org/sonatype/gshell/gshell-io/2.4/gshell-io-2.4.jar
[ERROR] urls[7] = 
file:/home/swe/.m2/repository/org/codehaus/plexus/plexus-utils/3.0/plexus-utils-3.0.jar
[ERROR] urls[8] = 
file:/home/swe/.m2/repository/com/thoughtworks/qdox/qdox/1.12/qdox-1.12.jar
[ERROR] urls[9] = 
file:/home/swe/.m2/repository/org/apache/maven/shared/file-management/1.2.1/file-management-1.2.1.jar
[ERROR] urls[10] = 
file:/home/swe/.m2/repository/org/apache/maven/shared/maven-shared-io/1.1/maven-shared-io-1.1.jar
[ERROR] urls[11] = 
file:/home/swe/.m2/repository/org/apache/xbean/xbean-reflect/3.4/xbean-reflect-3.4.jar
[ERROR] urls[12] = 
file:/home/swe/.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar
[ERROR] urls[13] = 
file:/home/swe/.m2/repository/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar
[ERROR] urls[14] = 
file:/home/swe/.m2/repository/com/google/collections/google-collections/1.0/google-collections-1.0.jar
[ERROR] urls[15] = 
file:/home/swe/.m2/repository/org/apache/maven/reporting/maven-reporting-impl/2.0.4.1/maven-reporting-impl-2.0.4.1.jar
[ERROR] urls[16] = 
file:/home/swe/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.1/plexus-interpolation-1.1.jar
[ERROR] urls[17] = 
file:/home/swe/.m2/repository/commons-validator/commons-validator/1.2.0/commons-validator-1.2.0.jar
[ERROR] urls[18] = 
file:/home/swe/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar
[ERROR] urls[19] = 
file:/home/swe/.m2/repository/commons-digester/commons-digester/1.6/commons-digester-1.6.jar
[ERROR] urls[20] = 
file:/home/swe/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar
[ERROR] urls[21] = file:/home/swe/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar
[ERROR] urls[22] = 
file:/home/swe/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar
[ERROR] urls[23