[
https://issues.apache.org/jira/browse/FELIX-1184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15098195#comment-15098195
]
ASF GitHub Bot commented on FELIX-1184:
---------------------------------------
Github user gdelafosse commented on a diff in the pull request:
https://github.com/apache/incubator-tinkerpop/pull/186#discussion_r49733908
--- Diff: gremlin-shaded/pom.xml ---
@@ -24,6 +24,67 @@ limitations under the License.
</parent>
<artifactId>gremlin-shaded</artifactId>
<name>Apache TinkerPop :: Gremlin Shaded</name>
+ <packaging>bundle</packaging>
+ <properties>
+ <!--
+ As this jar is shaded, the maven-bundle-plugin is not able to
process exported and imported packages from generated classes.
+ So we must explicitely tell which packages are exported and
imported by this bundle to the maven-bundle-plugin.
+ -->
+ <osgi.import>
--- End diff --
I see. That solves the typical trouble that OSGI solves. In OSGI you can
load several versions of the same third library and each bundle tells which
version it wants to use.
I understand your concern about this huge list of packages to maintain. I
thought that the unit test will detect and tell if some packages must be added
to the <osgi.import> and <osgi.export>.
But I'm struggling withe maven-shade-plugin and maven-bundle-plugin to make
this bundle automatically without having to specify the list of packages to
import and to export. I'm trying what's suggested in this
[ticket](https://issues.apache.org/jira/browse/FELIX-1184) without any success.
I don't give up...
> maven-bundle-plugin does not play well with maven-shade-plugin relocate
> -----------------------------------------------------------------------
>
> Key: FELIX-1184
> URL: https://issues.apache.org/jira/browse/FELIX-1184
> Project: Felix
> Issue Type: Bug
> Components: Maven Bundle Plugin
> Affects Versions: maven-bundle-plugin-2.0.0
> Reporter: David Jencks
> Assignee: Stuart McCulloch
>
> maven-shade-plugin v 1.2.1
> If your build runs shade to relocate some classes from a preexisting jar and
> the maven-bundle-plugin to geinerate osgi metadata the bundle plugin refuses
> to generate any Export-Package, Import-Package or Private-Package headers. I
> assume it doesn't find any classes.
> I don't know whose fault this is.
> To see this in action check out
> https://svn.apache.org/repos/asf/geronimo/xbean/trunk/xbean-asm-shaded rev
> 778992 and uncomment the bundle plugin and comment the transformers section
> of the shade plugin config.
> This is also reported as http://jira.codehaus.org/browse/MSHADE-51
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)