You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Stuart McCulloch (JIRA)" <ji...@apache.org> on 2007/08/22 05:16:31 UTC

[jira] Commented: (FELIX-340) Plug-in fails if dependencies are not all jar files

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

Stuart McCulloch commented on FELIX-340:
----------------------------------------

looking at the maven documentation, the correct way to filter classpath artifacts is using:

   artifact.getArtifactHandler().isAddedToClasspath()

I also believe we should be using project.getArtifacts() instead of getDependencyArtifacts
because the compilation classpath used to build Java sources is derived from getArtifacts.

getDependencyArtifacts only returns artifacts directly referenced in the pom, which is why
the provided testcase failed with the provided patch - using getArtifacts it builds a bundle
containing various javax.* classes (because the test pom has Export-Package: javax.*)

FYI, the key difference between the bundleplugin classpath and the compilation classpath is
that the bundleplugin always uses the file in the local repository, whereas maven will use the
output directories (ie. 'target/classes') for any projects in the same reactor.

  (the reason the bundleplugin doesn't use the output directories is because for bundles
   they may not exist, or they may only contain some of the actual classes of the bundle)


> 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
>            Assignee: Stuart McCulloch
>         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.