Maven 2.0.9 not handling two plugins with extensions ----------------------------------------------------
Key: MNG-4135 URL: http://jira.codehaus.org/browse/MNG-4135 Project: Maven 2 Issue Type: Bug Components: Plugins and Lifecycle Affects Versions: 2.0.9 Environment: mvn -version Maven version: 2.0.9 Java version: 1.6.0_05 OS name: "mac os x" version: "10.5.5" arch: "x86_64" Family: "mac" Reporter: Annies Attachments: test-case.jar In a multi-project environment using two extension plugins results in a file with wrong extension in the repository. In my environment, I am using these two extension plugins from two different sub-projects. I am adding them here in the same POM to make the test case straightforward. Here is a simple pom that uses two plugins with extensions, maven-bundle-plugin and hk2-maven-plugin. When I remove the extensions element from maven bundle plugin, the jar with correct extension is installed into the repository. If the extension element is added back, a file with wrong extension is installed in the repository. Here is the debug trace in that case. [DEBUG] Retrieving parent-POM: org.apache:apache::4 for project: org.apache.felix:felix:pom:1.0.2 from the repository. [DEBUG] Retrieving parent-POM: com.sun.enterprise:hk2-parent::0.3.52 for project: null:hk2-maven-plugin:maven-plugin:null from the repository. [DEBUG] Unable to find the lifecycle component in the extension org.codehaus.plexus.component.repository.exception.ComponentLookupException: Component descriptor cannot be found in the component repository: org.apache.maven.artifact.handler.ArtifactHandlerbundle. at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:323) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:312) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440) at org.codehaus.plexus.DefaultPlexusContainer.lookupMap(DefaultPlexusContainer.java:390) at org.apache.maven.plugin.DefaultPluginManager.getPluginComponents(DefaultPluginManager.java:1522) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findArtifactTypeHandlers(DefaultLifecycleExecutor.java:1198) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findExtensions(DefaultLifecycleExecutor.java:177) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) [INFO] ------------------------------------------------------------------------ [INFO] Building Fuji container for GlassFish V3 [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [DEBUG] Unable to find the lifecycle component in the extension org.codehaus.plexus.component.repository.exception.ComponentLookupException: Component descriptor cannot be found in the component repository: org.apache.maven.lifecycle.mapping.LifecycleMappinghk2-jar. at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:323) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:312) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440) at org.apache.maven.plugin.DefaultPluginManager.getPluginComponent(DefaultPluginManager.java:1511) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findExtension(DefaultLifecycleExecutor.java:1163) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findMappingsForLifecycle(DefaultLifecycleExecutor.java:1068) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForPackaging(DefaultLifecycleExecutor.java:1014) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:997) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:477) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) [DEBUG] Unable to find the lifecycle component in the extension org.codehaus.plexus.component.reposi -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira