Re: Probblem with maven-bundle-plugin (Cannot find lifecycle mapping for packaging: 'bundle)

2009-04-11 Thread Grey

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 tsalora...@gmail.com
 
 On Sat, Mar 7, 2009 at 5:17 PM, Stuart McCulloch mccu...@gmail.com
 wrote:
  2009/3/8 Tatu Saloranta tsalora...@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 

Re: Probblem with maven-bundle-plugin (Cannot find lifecycle mapping for packaging: 'bundle)

2009-04-11 Thread Grey

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 tsalora...@gmail.com
 
 On Sat, Mar 7, 2009 at 5:17 PM, Stuart McCulloch mccu...@gmail.com
 wrote:
  2009/3/8 Tatu Saloranta tsalora...@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 

Re: Probblem with maven-bundle-plugin (Cannot find lifecycle mapping for packaging: 'bundle)

2009-04-11 Thread Grey

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-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org



Re: Probblem with maven-bundle-plugin (Cannot find lifecycle mapping for packaging: 'bundle)

2009-04-11 Thread Grey

OK

Given: 

project
  modelVersion4.0.0/modelVersion
  groupIdexamples/groupId
  artifactIdmy-app/artifactId
  packagingbundle/packaging
  version1.0-SNAPSHOT/version
  build
plugins
  plugin
groupIdorg.apache.felix/groupId
artifactIdmaven-bundle-plugin/artifactId
version2.0.0/version
extensionstrue/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-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org



Re: Probblem with maven-bundle-plugin (Cannot find lifecycle mapping for packaging: 'bundle)

2009-04-11 Thread Stuart McCulloch
2009/4/12 Grey ray.rac...@gmail.com


 OK

 Given:

 project
  modelVersion4.0.0/modelVersion
  groupIdexamples/groupId
  artifactIdmy-app/artifactId
  packagingbundle/packaging
  version1.0-SNAPSHOT/version
  build
plugins
  plugin
groupIdorg.apache.felix/groupId
artifactIdmaven-bundle-plugin/artifactId
version2.0.0/version
extensionstrue/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
 modelVersion4.0.0/modelVersion
 groupIdexamples/groupId
 artifactIdmy-app/artifactId
 packagingnbm/packaging
 version1.0-SNAPSHOT/version
 build
   plugins
 plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdnbm-maven-plugin/artifactId
   version3.0/version
   extensionstrue/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-unsubscr...@felix.apache.org
 For additional commands, e-mail: users-h...@felix.apache.org




-- 
Cheers, Stuart


Re: Probblem with maven-bundle-plugin (Cannot find lifecycle mapping for packaging: 'bundle)

2009-03-07 Thread Stuart McCulloch
2009/3/8 Tatu Saloranta tsalora...@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]task-segment: [install]
 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] Cannot find lifecycle mapping for packaging: 'bundle'.
 Component descriptor cannot be found in the component repository:
 org.apache.maven.lifecycle.mapping.LifecycleMappingbundle.
 [INFO]
 
 ---

 The pom.xml has standard settings as detailed on
 [http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html]
 as well as on multiple blog pages. And specifically I do have
 extensionstrue/extensions in plug-in definition (which was
 mentioned as one cause for such a problem).

 I am using Maven 2.0.10 (had 2.0.7, upgraded, no change), and use the
 default maven repository (repo1.maven.org); although none of changes I
 have tried (various) have had any effect on this particular problem.

 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:

project
  modelVersion4.0.0/modelVersion
  groupIdexamples/groupId
  artifactIdmy-app/artifactId
  packagingbundle/packaging
  version1.0-SNAPSHOT/version
  build
plugins
  plugin
groupIdorg.apache.felix/groupId
artifactIdmaven-bundle-plugin/artifactId
version2.0.0/version
extensionstrue/extensions
  /plugin
/plugins
  /build
/project

perhaps you could post the content of your pom?

another thing to check is whether your download of the bundleplugin got
corrupted
somehow - try removing the
.m2/repository/org/apache/felix/maven-bundle-plugin
directory from your local repository (should be located under your home
directory)

unfortunately Maven doesn't always recover from dropped or interrupted
network
connections, so often it's worth removing the relevant part of the local
repository
and trying again in case the downloaded jar is corrupt...

-+ Tatu +-

 -
 To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
 For additional commands, e-mail: users-h...@felix.apache.org




-- 
Cheers, Stuart


Re: Probblem with maven-bundle-plugin (Cannot find lifecycle mapping for packaging: 'bundle)

2009-03-07 Thread Tatu Saloranta
On Sat, Mar 7, 2009 at 5:17 PM, Stuart McCulloch mccu...@gmail.com wrote:
 2009/3/8 Tatu Saloranta tsalora...@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.

Thank you for your help!

-+ Tatu +-

-
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org



Re: Probblem with maven-bundle-plugin (Cannot find lifecycle mapping for packaging: 'bundle)

2009-03-07 Thread Stuart McCulloch
2009/3/8 Tatu Saloranta tsalora...@gmail.com

 On Sat, Mar 7, 2009 at 5:17 PM, Stuart McCulloch mccu...@gmail.com
 wrote:
  2009/3/8 Tatu Saloranta tsalora...@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-unsubscr...@felix.apache.org
 For additional commands, e-mail: users-h...@felix.apache.org


-- 
Cheers, Stuart