Cannot find lifecycle mapping for packaging: 'bundle'.

Cannot find lifecycle mapping for packaging: 'bundle'.

Problem

When trying to package or install a project using the maven-bundle-plugin, an error message as the following is given:


[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.

Solution

I could resolved the problem by including the elementtrueto the plugin definition for the maven-bundle-plugin.

                                org.apache.felix                                maven-bundle-plugin                                true                                                                                                                          ${pom.artifactId}                                                ${pom.version}                                                ${module.embeddedDependencies}                                                                                                 target/dependency                                                ${module.importedPackages}                                                ${module.exportedPackages}                                                                                                

Resources

Probblem with maven-bundle-plugin ("Cannot find lifecycle mapping for packaging: 'bundle") (Felix Mailing list)