Skip to content

Commit d0edd79

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 8266e6c commit d0edd79

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pom.xml

+4-1
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,10 @@
610610
Bundle-SymbolicName: org.apache.${replacestring;${project.artifactId};-;.}
611611
Automatic-Module-Name: ${Bundle-SymbolicName}
612612
# Export packages not containing the substring 'internal'
613-
-exportcontents: ${removeall;${packages};${packages;NAMED;*internal*}}
613+
-exportcontents: \
614+
*.impl.*;x-internal:=true, \
615+
*.internal.*;x-internal:=true, \
616+
*
614617
# Mark optional Maven dependencies as optional
615618
Import-Package: \
616619
javax.inject*;resolution:=optional, \

0 commit comments

Comments
 (0)