m2-bootstrap-all.sh fails in IDEA plugin re-build with ClassNotFoundException
-----------------------------------------------------------------------------

         Key: MNG-243
         URL: http://jira.codehaus.org/browse/MNG-243
     Project: m2
        Type: Bug
 Environment: local; not on CI
    Reporter: John Casey
     Fix For: 1.0-alpha-1


For some reason, this is not happening on beaver. However, it's been reported 
at different times by john (me), trygve, and apparently emmanuel (see dev 
list)...

When running the bootstrap, mboot2 completes successfully.

However, when the re-build of the maven-plugins directory is executed from the 
bootstrap script, it fails during the IDEA plugin build, giving the following 
error:

Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/maven/plugin/resources/ResourceEntry
        at 
org.apache.maven.plugin.resources.ResourcesMojo.getJarResources(ResourcesMojo.java:142)
        at 
org.apache.maven.plugin.resources.ResourcesMojo.execute(ResourcesMojo.java:65)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:430)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeMojo(DefaultLifecycleExecutor.java:393)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executePhase(DefaultLifecycleExecutor.java:362)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:138)
        at org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:207)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:131)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:211)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:303)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:243)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:363)

which kills the bootstrap process before the IT's run.

Having said that, when the bootstrap dies I can manually cd into maven-plugins/ 
and execute

'm2 clean:clean install' (which is what command the bootstrap script fails on)

and this will SUCCEED. If I then cd into ../maven-core-it/ and run

'./maven-core-it.sh'

this will successfully run the IT's. Yet for some reason, that re-build step 
fails in the automated script...

Another note is that I can disable the IDEA module in the maven-plugins 
pom.xml, and the whole bootstrap script will complete normally.

I've chased this error for about 3 hours now, and I still have no idea what 
could be causing it. I suspect that if one of the "core" plugins had resources 
to copy, it would be causing the failure instead of the IDEA plugin, but since 
they don't, I'd recommend moving the IDEA plugin to some sort of 
"maven-nonessential-plugins" dir structure, and having a separate pom with 
<modules/> to build this as a parallel structure to maven-plugins. We can then 
add the Eclipse plugin to that new structure without muddying up the bootstrap 
process.

The IDEA plugin doesn't need to be built by everyone with an itch to get at the 
m2 sources anyway...they can still get it via the artifact repository.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to