[ https://issues.apache.org/jira/browse/FELIX-4145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13691505#comment-13691505 ]
Stuart McCulloch commented on FELIX-4145: ----------------------------------------- Well I actually planned to remove the "bundleall" goal in the 2.4.0 release (it's been deprecated for a while) but forgot, and still plan to remove it in 2.4.1. When looking for bundles of third-party dependencies first check the upstream project in case there is a new version with OSGi metadata. Then check whether someone has previously requested adding OSGi metadata (they may have supplied a patch you can apply locally or an issue you can vote on). If not then consider raising an issue to add OSGi metadata - it's usually straightforward and a lot of projects are fine with adding the necessary build steps. Alternatively check if someone else has already bundled the library in one of the known bundle repositories like http://ebr.springsource.com/ or on maven central like the servicemix bundles http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.servicemix.bundles%22 Finally if you want to wrap a library yourself, either create a single project to embed all dependencies into a uber-bundle and export those packages you need: http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html#embedding-dependencies or create a project for each bundle and use the "wrap" goal - you can use the maven-archetype-plugin to make this easier or use the old pax-construct plugin: http://jaceklaskowski.pl/wiki/Rapid_OSGi_development_with_Pax-Construct Otherwise post a message to the users list and you'll get more advice and links. > bundleall goal failure > ---------------------- > > Key: FELIX-4145 > URL: https://issues.apache.org/jira/browse/FELIX-4145 > Project: Felix > Issue Type: Bug > Components: Maven Bundle Plugin > Affects Versions: maven-bundle-plugin-2.4.0 > Environment: Linux 64-bit, Oracle JDK 1.7.0_25-b15, Apache Maven 3.0.4 > Reporter: Amichai Rothman > > When running the bundleall goaI in version 2.4.0 I get the error below. If I > revert to 2.3.7 (and change nothing else) everything works ok. > [ERROR] Failed to execute goal > org.apache.felix:maven-bundle-plugin:2.4.0:bundleall (default-cli) on project > myproject: Error generating OSGi bundle for project > org.apache.geronimo.specs:geronimo-jms_1.1_spec: > aQute.bnd.osgi.Descriptors$PackageRef cannot be cast to java.lang.String -> > [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.felix:maven-bundle-plugin:2.4.0:bundleall (default-cli) on > project myproject: Error generating OSGi bundle for project > org.apache.geronimo.specs:geronimo-jms_1.1_spec > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) > at > org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) > at > org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) > Caused by: org.apache.maven.plugin.MojoExecutionException: Error generating > OSGi bundle for project org.apache.geronimo.specs:geronimo-jms_1.1_spec > at > org.apache.felix.bundleplugin.BundleAllPlugin.bundle(BundleAllPlugin.java:399) > at > org.apache.felix.bundleplugin.BundleAllPlugin.bundleRoot(BundleAllPlugin.java:322) > at > org.apache.felix.bundleplugin.BundleAllPlugin.bundleAll(BundleAllPlugin.java:213) > at > org.apache.felix.bundleplugin.BundleAllPlugin.bundleAll(BundleAllPlugin.java:289) > at > org.apache.felix.bundleplugin.BundleAllPlugin.bundleAll(BundleAllPlugin.java:289) > at > org.apache.felix.bundleplugin.BundleAllPlugin.bundleAll(BundleAllPlugin.java:170) > at > org.apache.felix.bundleplugin.BundleAllPlugin.execute(BundleAllPlugin.java:157) > at > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) > ... 19 more > Caused by: java.lang.ClassCastException: > aQute.bnd.osgi.Descriptors$PackageRef cannot be cast to java.lang.String > at > org.apache.felix.bundleplugin.BundleAllPlugin.addExportedPackages(BundleAllPlugin.java:420) > at > org.apache.felix.bundleplugin.BundleAllPlugin.bundle(BundleAllPlugin.java:388) > ... 27 more -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira