Skip to content

Commit 5b8f47a

Browse files
iils-hwellmanngnodet
authored andcommitted
[MRESOLVER-572] Export internal packages in OSGi metadata as x-internal
This makes maven-resolver-supplier usable as bundle in an OSGi runtime. At the moment the bundle cannot resolve because the internal.impl packages it uses and imports in its OSGi metadata are not exported by maven-resolver-impl. Simply exporting internal packages fixes that and, although it is discouraged to use internal/impl packages, gives consumers that can accept no API-compatibility guarantees the ability to access these packages. Adding the directive 'x-internal' is a convention that, at least when using Eclipse PDE, shows a corresponding warning at call-sides. Fixes https://issues.apache.org/jira/browse/MRESOLVER-572
1 parent e33cd94 commit 5b8f47a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pom.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,10 @@
475475
Bundle-SymbolicName: org.apache.${replacestring;${project.artifactId};-;.}
476476
Automatic-Module-Name: ${Bundle-SymbolicName}
477477
# Export packages not containing the substring 'internal'
478-
-exportcontents: ${removeall;${packages};${packages;NAMED;*internal*}}
478+
-exportcontents: \
479+
*.impl.*;x-internal:=true, \
480+
*.internal.*;x-internal:=true, \
481+
*
479482
# Mark optional Maven dependencies as optional
480483
Import-Package: \
481484
javax.inject*;resolution:=optional, \

0 commit comments

Comments
 (0)