You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Grey <ra...@gmail.com> on 2009/04/12 02:29:59 UTC
Re: Probblem with maven-bundle-plugin ("Cannot find lifecycle
mapping for packaging: 'bundle")
I am having a similar problem still.
mvn install -> phases work ok and my pom is similar to the posted one.
But the following fails... It should show me which plugin is offering which
goals etc.
$ mvn -e help:describe -Dcmd=install
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO]
------------------------------------------------------------------------
[INFO] Building OSGi Grizzly - Sun
[INFO] task-segment: [help:describe] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] [help:describe]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] ComponentLookupException: Component descriptor cannot be found in the
component repository:
org.apache.maven.lifecycle.mapping.LifecycleMappingbundle.
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: ComponentLookupException: Component
descriptor cannot be found in the component repository:
org.apache.maven.lifecycle.mapping.LifecycleMappingbundle.
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:699)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
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)
Caused by: org.apache.maven.plugin.MojoFailureException:
ComponentLookupException: Component descriptor cannot be found in the
component repository:
org.apache.maven.lifecycle.mapping.LifecycleMappingbundle.
at
org.apache.maven.plugins.help.DescribeMojo.describeCommand(DescribeMojo.java:906)
at
org.apache.maven.plugins.help.DescribeMojo.execute(DescribeMojo.java:286)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
... 16 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Sat Apr 11 19:27:20 GMT-05:00 2009
[INFO] Final Memory: 15M/170M
[INFO]
------------------------------------------------------------------------
Stuart McCulloch wrote:
>
> 2009/3/8 Tatu Saloranta <ts...@gmail.com>
>
>> On Sat, Mar 7, 2009 at 5:17 PM, Stuart McCulloch <mc...@gmail.com>
>> wrote:
>> > 2009/3/8 Tatu Saloranta <ts...@gmail.com>
>> >
>> >> I am having a problem trying to build a bundle with Maven. Problem
>> >> manifests when doing "mvn install" (or package) with following error
>> >> message:
>> ...
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] Cannot find lifecycle mapping for packaging: 'bundle'.
>> >> Component descriptor cannot be found in the component repository:
>> >> org.apache.maven.lifecycle.mapping.LifecycleMappingbundle.
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> ...
>> >> Does this sound familiar to anyone? I can try to give more details if
>> >> necessary, but pom.xml does not seem to differ at all from suggested
>> >> ones, all of which are very similar to each other. So I'm guessing
>> >> maybe there is something
>> >>
>> > I was able to use the bundleplugin with Maven 2.0.10 and the following
>> pom:
>>
>> Very interesting. Using your sample does make things work, and pointed
>> out exactly what seems to be the problem: I had '<pluginManagement>'
>> inside '<build>'. Removing that seems to resolve the problem. And
>> reading through schema desc for pom.xml it makes sense --
>> pluginManagement defines sort of baseline, and plain <plugins> is
>> needed for instances.
>>
>
> that's right, <pluginManagement> lets you configure plugins without adding
> them to the current pom lifecycle, just like <dependencyManagement> lets
> you configure dependencies (version, etc.) without adding them to the pom
>
> when you add a plugin to the build, the <pluginManagement> configuration
> is merged in with the local configuration - btw, to see the merged pom
> use:
>
> mvn help:effective-pom
>
> which I find very useful when debugging maven configuration issues - HTH
>
> Thank you for your help!
>>
>
> np
>
> -+ Tatu +-
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
> --
> Cheers, Stuart
>
>
--
View this message in context: http://www.nabble.com/Probblem-with-maven-bundle-plugin-%28%22Cannot-find-lifecycle-mapping-for--packaging%3A-%27bundle%22%29-tp22393056p23006832.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Probblem with maven-bundle-plugin ("Cannot find lifecycle mapping
for packaging: 'bundle")
Posted by Stuart McCulloch <mc...@gmail.com>.
2009/4/12 Grey <ra...@gmail.com>
>
> OK
>
> Given:
>
> <project>
> <modelVersion>4.0.0</modelVersion>
> <groupId>examples</groupId>
> <artifactId>my-app</artifactId>
> <packaging>bundle</packaging>
> <version>1.0-SNAPSHOT</version>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.felix</groupId>
> <artifactId>maven-bundle-plugin</artifactId>
> <version>2.0.0</version>
> <extensions>true</extensions>
> </plugin>
> </plugins>
> </build>
> </project>
>
> This will fail:
> mvn help:describe -Dcmd=install
>
> I don't see why it should. With any number of other plugins that command
> works fine.
> FWIW, if the packaging element is removed, it works.
>
I get that exception with any plugin that defines a custom packaging type
(ie. not one of the core packaging types)
for example:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>examples</groupId>
<artifactId>my-app</artifactId>
<packaging>nbm</packaging>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<version>3.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
produces:
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO]
------------------------------------------------------------------------
[INFO] Building Unnamed - examples:my-app:nbm:1.0-SNAPSHOT
[INFO] task-segment: [help:describe] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] [help:describe]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] ComponentLookupException: Component descriptor cannot be found in the
component repository:
org.apache.maven.lifecycle.mapping.LifecycleMappingnbm.
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Sun Apr 12 09:36:49 SGT 2009
[INFO] Final Memory: 6M/11M
[INFO]
------------------------------------------------------------------------
so it would appear to be a bug (or limitation) in the maven-help-plugin
Grey wrote:
> >
> > OK, I thought I had semi-narrowed it down to the bundle plugin but now I
> > see that is not the case. Its something I'm doing on my end.
> >
> > Need more research.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Probblem-with-maven-bundle-plugin-%28%22Cannot-find-lifecycle-mapping-for--packaging%3A-%27bundle%22%29-tp22393056p23007075.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
--
Cheers, Stuart
Re: Probblem with maven-bundle-plugin ("Cannot find lifecycle
mapping for packaging: 'bundle")
Posted by Grey <ra...@gmail.com>.
OK
Given:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>examples</groupId>
<artifactId>my-app</artifactId>
<packaging>bundle</packaging>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.0.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
This will fail:
mvn help:describe -Dcmd=install
I don't see why it should. With any number of other plugins that command
works fine.
FWIW, if the packaging element is removed, it works.
Grey wrote:
>
> OK, I thought I had semi-narrowed it down to the bundle plugin but now I
> see that is not the case. Its something I'm doing on my end.
>
> Need more research.
>
>
--
View this message in context: http://www.nabble.com/Probblem-with-maven-bundle-plugin-%28%22Cannot-find-lifecycle-mapping-for--packaging%3A-%27bundle%22%29-tp22393056p23007075.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Probblem with maven-bundle-plugin ("Cannot find lifecycle
mapping for packaging: 'bundle")
Posted by Grey <ra...@gmail.com>.
OK, I thought I had semi-narrowed it down to the bundle plugin but now I see
that is not the case. Its something I'm doing on my end.
Need more research.
--
View this message in context: http://www.nabble.com/Probblem-with-maven-bundle-plugin-%28%22Cannot-find-lifecycle-mapping-for--packaging%3A-%27bundle%22%29-tp22393056p23006886.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org