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 2008/12/09 07:47:44 UTC
[jira] Resolved: (FELIX-845) classes from dependencies in scope
compile are always included.
[ https://issues.apache.org/jira/browse/FELIX-845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stuart McCulloch resolved FELIX-845.
------------------------------------
Resolution: Won't Fix
You don't say what your bundleplugin instructions are, but I guess they are something like Export-Package: * (or Private-Package: *)
If so, then the bundleplugin is working as designed - it takes the entire compilation classpath (ie. including compile scope dependencies) and uses the BND tool to pull selected packages into a bundle. So if you ask it to include everything then it will - but if you're more selective with your Export-Package and Private-Package instructions, then it will only bundle what you ask it to.
See: http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html
Historically only compile, runtime, and system scoped dependencies have been passed to BND. Provided and test dependencies have not been included in the classpath seen by BND because of a Maven plugin setting which means it doesn't resolve the provided scope. However, I am planning to change in the next release so that the entire build classpath (including provided scope dependencies) is seen by BND. This of course means you shouldn't rely on setting provided scope to exclude dependencies from the final bundle.
If you really want to exclude dependencies from the classpath passed to BND then you can use the <excludeDependencies> instruction which lets you exclude dependencies by artifactId (see the above link for more details). This feature will be extended to let you exclude dependencies by other criteria such as scope, groupId, etc... https://issues.apache.org/jira/browse/FELIX-684
> classes from dependencies in scope compile are always included.
> ---------------------------------------------------------------
>
> Key: FELIX-845
> URL: https://issues.apache.org/jira/browse/FELIX-845
> Project: Felix
> Issue Type: Bug
> Affects Versions: maven-bundle-plugin-1.4.3
> Reporter: Stefan Franke
>
> Given:
> 1. bundle project foobar:
> - contains classes in org.foo.bar
> 2. bundle project foodoh:
> - contains classes in org.foo.doh
> - has a dependency to org.foo.bar with scope compile
> => the bundle foodoh always ends up with classes from org.foo.doh pls org.foo.bar
> Setting the scope to provide helps here, but then the transient dependencies are vanishing for other components. So this is no acceptable workaround.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.