Skip to content

Commit

Permalink
[MRESOLVER-570] Remove excessive strictness of OSGi dependency metadata
Browse files Browse the repository at this point in the history
- Mark optional Maven dependencies as optional in OSGi metadata
- Widen version range for org.slf4j.spi package to [1.7,3)
  • Loading branch information
iils-hwellmann authored and gnodet committed Jun 27, 2024
1 parent 52b4db3 commit e33cd94
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions maven-resolver-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@
<name>Maven Artifact Resolver Implementation</name>
<description>An implementation of the repository system.</description>

<properties>
<bnd.instructions.additions><![CDATA[
# Mark optional Maven dependencies as optional
Import-Package: \
org.slf4j.spi;version="[1.7,3)", \
javax.inject;resolution:=optional,\
com.google.inject*;resolution:=optional, \
org.eclipse.sisu*;resolution:=optional, \
*
]]></bnd.instructions.additions>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand Down
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,10 @@
Automatic-Module-Name: ${Bundle-SymbolicName}
# Export packages not containing the substring 'internal'
-exportcontents: ${removeall;${packages};${packages;NAMED;*internal*}}
# Mark optional Maven dependencies as optional
Import-Package: \
javax.inject*;resolution:=optional, \
*
# Reproducible build
-noextraheaders: true
${bnd.instructions.additions}
Expand Down

0 comments on commit e33cd94

Please sign in to comment.