0

i'm trying to migrate some of my jenkins jobs to maven 3 and i'm facing some troubles with maven plugins.

for instance, i have a job building pretty well under maven 2, which fires the following exception when i move to maven 3

WARNING: Error injecting: org.apache.maven.plugin.jar.JarMojo
    java.lang.NoClassDefFoundError: org/codehaus/plexus/components/io/resources/PlexusIoResourceCollection
.
.
.
    Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection
        at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
        ... 93 more
    mojoFailed org.apache.maven.plugins:maven-jar-plugin:2.3.2(default-jar)

I ckecked that the required class was correctly installed to my local repository. Does anyone have a clue about this behavior ?

thanks in advance.

mab
  • 176
  • 2
  • 13

2 Answers2

1

Just delete org/codehaus from .m2/repository. This fixed the problem for me. Maven will download the dependencies automatically again.

Tahniat Ashraf
  • 1,020
  • 2
  • 12
  • 21
0

Try to upgrade your jar-plugin to the latest 2.4 - Also does this happen when building locally with maven3 ?

Tekdev
  • 448
  • 3
  • 9
  • is there a release note about this bug ? because the compatibility matrix shows that jar plugin should be compatible starting from v2.2 http://goo.gl/Ivo88 – mab Mar 19 '13 at 09:26