Skip to content

Commit

Permalink
[MRESOLVER-571] Import o.e.aether packages with the exact same version
Browse files Browse the repository at this point in the history
The documentation states that only maven-resolver artifacts of the exact
same version should be used together.

With this change all org.eclipse.aether* packages are now imported with
a strict version range of
'org.eclipse.aether*;version="[@Version,@Version]"'

Fixes https://issues.apache.org/jira/browse/MRESOLVER-571
  • Loading branch information
iils-hwellmann committed Jun 26, 2024
1 parent 2239018 commit 18f5777
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions maven-resolver-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<bnd.instructions.additions><![CDATA[
# Mark optional Maven dependencies as optional
Import-Package: \
org.eclipse.aether*;version="${range;[===,===];${mavenResolverVersion}}", \
org.slf4j.spi;version="[1.7,3)", \
javax.inject;resolution:=optional,\
com.google.inject*;resolution:=optional, \
Expand Down
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,15 @@
Automatic-Module-Name: ${Bundle-SymbolicName}
# Export packages not containing the substring 'internal'
-exportcontents: ${removeall;${packages};${packages;NAMED;*internal*}}
# Mark optional Maven dependencies as optional
# Ensure all maven-resolver packages of exactly the same version are imported
# and mark optional Maven dependencies as optional.
mavenResolverVersion=${versionmask;===;${version_cleanup;${project.version}}}
Import-Package: \
org.eclipse.aether*;version="${range;[===,===];${mavenResolverVersion}}", \
javax.inject*;resolution:=optional, \
*
# No re-import of exported packages
-noimport:=true
# Reproducible build
-noextraheaders: true
${bnd.instructions.additions}
Expand Down

0 comments on commit 18f5777

Please sign in to comment.