[ 
https://issues.apache.org/jira/browse/FELIX-340?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Sauthier updated FELIX-340:
-------------------------------------

    Attachment: FELIX-340.patch

Here is the patch.

This patch simply select only the dependencies that are .jar files before 
trying to unpack them.

Just notice that if you try to re-run the pom I provided, you will still have 
an error, but only telling that the result jar file is empty (as my only 
dependency is a pom, and because I did not selected it, I have no deps to 
filter, resulting in an empty jar, and thus an error from BND).

Here is the new exception, for info:

[INFO] [bundle:bundle]
[ERROR] Error building bundle test.osgi:bundle:bundle:1.0.0-SNAPSHOT : The JAR 
is empty
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Found errors, see log
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unknown error occurred
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        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:585)
        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.MojoExecutionException: Unknown error 
occurred
        at 
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:262)
        at 
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:156)
        at 
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:148)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        ... 16 more
Caused by: org.apache.maven.plugin.MojoFailureException: Found errors, see log
        at 
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:245)
        ... 20 more


> Plug-in fails if dependencies are not all jar files
> ---------------------------------------------------
>
>                 Key: FELIX-340
>                 URL: https://issues.apache.org/jira/browse/FELIX-340
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Guillaume Sauthier
>         Attachments: FELIX-340.patch, FELIX-340.poms.zip
>
>
> I'm just trying to make my first bundle using the felix maven-bundle-plugin.
> As this bundle is intended to have a quite big number of dependencies, I've 
> created a pom module that only defines all the dependencies. The  this module 
> has been placed in the dependencies section of my bundle's pom.xml.
> looks like this: a --> b --> (c, d, e, f, g, h, i, ...)
> When I just build my bundle, It finish quite soon with a NPE in JarFile!
> -> The bundleplugin only manage jar file as dependencies. It should at least 
> check the dependency type before assuming this is a jar file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to