You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Paul Benedict (JIRA)" <ji...@codehaus.org> on 2014/07/02 15:44:58 UTC

[jira] (MNG-3227) Custom packaging handling doesn't work well in forked lifecycle

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

Paul Benedict updated MNG-3227:
-------------------------------

    Fix Version/s:     (was: Issues to be reviewed for 3.x)

> Custom packaging handling doesn't work well in forked lifecycle
> ---------------------------------------------------------------
>
>                 Key: MNG-3227
>                 URL: https://jira.codehaus.org/browse/MNG-3227
>             Project: Maven
>          Issue Type: Bug
>          Components: Plugins and Lifecycle
>    Affects Versions: 2.0.7
>            Reporter: Nicolas Rougé
>         Attachments: test-custom-packaging.tar.gz
>
>
> I've made a plugin and a test project to show a possible bug when using custom packaging and forked lifecycle (the "site" lifecycle in fact).
> The plugin is called "foobar-maven-plugin". It defines the custom packaging "foobar", that is equivalent to "jar".
> The projet is called "test-project". It contains two modules, "module1" and "module2" that have the "foobar" packaging. "module2" depends on "module1".
> After installing the plugin, I can, for instance, compile or package the project "test-project" by lauching "mvn compile" or "mvn package".
> But the command "mvn site" isn't working (module2 can't find module1). In debug mode, we can in maven logs :
> {code}
> [INFO] ----------------------------------------------------------------------------
> [INFO] Building Unnamed - com.example.test:module1:foobar:1.0
> [INFO]    task-segment: [site]
> [INFO] ----------------------------------------------------------------------------
> [DEBUG] Error looking up lifecycle mapping to retrieve optional mojos. Lifecycle ID: site. Error: Component descriptor cannot be found in the component repository: org.apache.maven.lifecycle.mapping.LifecycleMappingfoobar.
> org.codehaus.plexus.component.repository.exception.ComponentLookupException: Component descriptor cannot be found in the component repository: org.apache.maven.lifecycle.mapping.LifecycleMappingfoobar.
>         at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:323)
>         at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440)
>         at org.apache.maven.execution.MavenSession.lookup(MavenSession.java:123)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findOptionalMojosForLifecycle(DefaultLifecycleExecutor.java:1111)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForPackaging(DefaultLifecycleExecutor.java:999)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:980)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
>         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:597)
>         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)
> {code}



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