Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9C2FEF064 for ; Fri, 5 Apr 2013 16:35:16 +0000 (UTC) Received: (qmail 27315 invoked by uid 500); 5 Apr 2013 16:35:16 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 27262 invoked by uid 500); 5 Apr 2013 16:35:16 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 27250 invoked by uid 99); 5 Apr 2013 16:35:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2013 16:35:16 +0000 Date: Fri, 5 Apr 2013 16:35:16 +0000 (UTC) From: "Stuart McCulloch (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (FELIX-3585) Dependencies with classes or resources in the default package cannot be embedded MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FELIX-3585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stuart McCulloch resolved FELIX-3585. ------------------------------------- Resolution: Fixed https://github.com/bndtools/bnd/pull/328 and its follow-up https://github.com/bndtools/bnd/pull/332 have been merged and will be in the upcoming release of bnd that will be integrated with the bundleplugin before the 2.4.0 release. > Dependencies with classes or resources in the default package cannot be embedded > -------------------------------------------------------------------------------- > > Key: FELIX-3585 > URL: https://issues.apache.org/jira/browse/FELIX-3585 > Project: Felix > Issue Type: Bug > Components: Maven Bundle Plugin > Affects Versions: maven-bundle-plugin-2.4.0 > Reporter: Ryan Heinen > Priority: Critical > Fix For: maven-bundle-plugin-2.4.0 > > > I'm testing the latest svn revision 1355520 (2.4.0-SNAPSHOT) of the maven-bundle-plugin in my project. A MojoExecutionException is thrown when the plugin attempts to embed dependencies that contain resources or classes in the default package. The error message that I see in the logs is "Classes found in the wrong directory: {JDOMAbout$Info.class=long, JDOMAbout.class=long, ". Those two classes are in the default package in that version of the jdom jar. > A warning is also thrown about "Unused Private-Package instructions, no such package(s) on the class path: [!*]". I've included more log output after the sample POM below. > This worked without errors or warnings in release version 2.3.7, so I believe this is a bug. > Here is a minimal POM that reproduces the issue. The dependency that I am testing with is jdom 1.0, but it should apply to any jar that has content in the default package. I've reproduced this error on both maven 3.0.3 and 3.0.4. > {code} > > > 4.0.0 > com.example > jdom-wrapper > bundle > JDOM Wrapper > 1.0-SNAPSHOT > > > > org.apache.felix > maven-bundle-plugin > true > 2.4.0-SNAPSHOT > > > > jdom;scope=compile > > > > > > > > jdom > jdom > 1.0 > > > > {code} > The last bit of output from a mvn bundle:bundle -debug command. > {code} > [DEBUG] BND Classpath: > #----------------------------------------------------------------------- > -classpath:\ > /private/tmp/jdom/target/classes,\ > /Users/ryan/.m2/repository/jdom/jdom/1.0/jdom-1.0.jar > #----------------------------------------------------------------------- > [DEBUG] BND Manifest: > #----------------------------------------------------------------------- > Manifest-Version: 1.0 > Bnd-LastModified: 1341512614042 > Bundle-ClassPath: .,jdom-1.0.jar > Bundle-ManifestVersion: 2 > Bundle-Name: JDOM Wrapper > Bundle-SymbolicName: com.example.jdom-wrapper > Bundle-Version: 1.0.0.SNAPSHOT > Created-By: 1.6.0_33 (Apple Inc.) > Embed-Dependency: jdom;scope=compile > Embed-Transitive: true > Embedded-Artifacts: jdom-1.0.jar;g="jdom";a="jdom";v="1.0" > Import-Package: javax.xml.parsers,javax.xml.transform,javax.xml.transfor > m.sax,javax.xml.transform.stream,oracle.xml.parser,oracle.xml.parser.v2 > ,org.apache.xerces.dom,org.apache.xerces.parsers,org.jaxen,org.jaxen.jd > om,org.w3c.dom,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers > Tool: Bnd-${Bundle-Version} > #----------------------------------------------------------------------- > [DEBUG] Final Manifest: > #----------------------------------------------------------------------- > Manifest-Version: 1.0 > Bnd-LastModified: 1341512614042 > Build-Jdk: 1.6.0_33 > Built-By: ryan > Bundle-ClassPath: .,jdom-1.0.jar > Bundle-ManifestVersion: 2 > Bundle-Name: JDOM Wrapper > Bundle-SymbolicName: com.example.jdom-wrapper > Bundle-Version: 1.0.0.SNAPSHOT > Created-By: Apache Maven Bundle Plugin > Embed-Dependency: jdom;scope=compile > Embed-Transitive: true > Embedded-Artifacts: jdom-1.0.jar;g="jdom";a="jdom";v="1.0" > Import-Package: javax.xml.parsers,javax.xml.transform,javax.xml.transfor > m.sax,javax.xml.transform.stream,oracle.xml.parser,oracle.xml.parser.v2 > ,org.apache.xerces.dom,org.apache.xerces.parsers,org.jaxen,org.jaxen.jd > om,org.w3c.dom,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers > Tool: Bnd-${Bundle-Version} > #----------------------------------------------------------------------- > [WARNING] Bundle com.example:jdom-wrapper:bundle:1.0-SNAPSHOT : Unused Private-Package instructions, no such package(s) on the class path: [!*] > [ERROR] Bundle com.example:jdom-wrapper:bundle:1.0-SNAPSHOT : Classes found in the wrong directory: {JDOMAbout$Info.class=long, JDOMAbout.class=long, JDOMAbout$Author.class=long} > [ERROR] Error(s) found in bundle configuration > [INFO] ------------------------------------------------------------------------ > [INFO] BUILD FAILURE > [INFO] ------------------------------------------------------------------------ > [INFO] Total time: 1.796s > [INFO] Finished at: Thu Jul 05 11:23:34 PDT 2012 > [INFO] Final Memory: 5M/81M > [INFO] ------------------------------------------------------------------------ > [ERROR] Failed to execute goal org.apache.felix:maven-bundle-plugin:2.4.0-SNAPSHOT:bundle (default-cli) on project jdom-wrapper: Error(s) found in bundle configuration -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.felix:maven-bundle-plugin:2.4.0-SNAPSHOT:bundle (default-cli) on project jdom-wrapper: Error(s) found in bundle configuration > 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:319) > 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:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > 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(s) found in bundle configuration > at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:407) > at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:264) > at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:255) > 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: org.apache.maven.plugin.MojoFailureException: Error(s) found in bundle configuration > at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:356) > ... 23 more > [ERROR] > [ERROR] > [ERROR] For more information about the errors and possible solutions, please read the following articles: > [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException > {code} -- 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