Skip to content

Commit 85a2fd6

Browse files
committed
[Maven Runtime] Reduce number of manually maintained version
1. Remove manually maintained version of exported packages The bnd-maven-plugin can derive the version of the org.eclipse.aether* and org.eclipse.sisu* packages perfectly fine based on the OSGi metadata that are embedded in these jars (since some time). Furthermore the version of the exported org.eclipse.sisu* packages has been false before (due to the false version being used manually). 2. Exclude the dependency to 'commons-codec' explicitly instead of mentioning it as provided to exclude it from the runtime bundle. Excluding it does not require a version to be defined.
1 parent a1dad44 commit 85a2fd6

File tree

2 files changed

+16
-19
lines changed

2 files changed

+16
-19
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# To force a version qualifier update add the bug here
2-
Update build-qualifier because maven-runtime version update to Maven 3.9.9 (updated)
2+
Update build-qualifier because maven-runtime version update to Maven 3.9.9

org.eclipse.m2e.maven.runtime/pom.xml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
99
SPDX-License-Identifier: EPL-2.0
1010
-->
11-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11+
<project xmlns="http://maven.apache.org/POM/4.0.0"
12+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1213
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1314
<modelVersion>4.0.0</modelVersion>
1415

@@ -28,12 +29,6 @@
2829
<properties>
2930
<!-- maven core version -->
3031
<maven-core.version>3.9.9</maven-core.version>
31-
<!-- NOTE: When maven-core.version changes, this may impact the versions of the maven-resolver-*
32-
jars that export the org.eclipse.aether.* packages in the org.eclipse.m2e.maven.runtime
33-
bundle. So make sure the following variable has the value of the maven-resolver-* jars
34-
https://bugs.eclipse.org/bugs/show_bug.cgi?id=529540 -->
35-
<maven-resolver.version>1.9.22</maven-resolver.version>
36-
<apache-commons-codec.version>1.16.1</apache-commons-codec.version><!-- Keep in sync with what maven includes-->
3732
<!-- below are m2e-specific addons -->
3833
<plexus-build-api.version>1.2.0</plexus-build-api.version>
3934
<jars.directory>target/jars</jars.directory>
@@ -42,12 +37,14 @@
4237
<buildqualifier.format>%Y%m%d-%H%M</buildqualifier.format>
4338
</properties>
4439
<dependencies>
40+
<!-- Excluded dependencies (or those that are 'provided' to effectivly remove
41+
them from the bundle) are fulfilled via the OSGi requirements specified below
42+
as Import-Package/Require-Bundle and therefore don't have to be
43+
embedded. Or they are not required. -->
4544
<dependency>
4645
<groupId>org.apache.maven</groupId>
4746
<artifactId>maven-core</artifactId>
4847
<exclusions>
49-
<!-- Excluded dependencies are fulfilled via the OSGi requirements specified below as Import-Package/Require-Bundle and
50-
therefore don't have to be embedded. Or they are not required. -->
5148
<exclusion>
5249
<groupId>org.checkerframework</groupId>
5350
<artifactId>checker-compat-qual</artifactId>
@@ -96,6 +93,12 @@
9693
<dependency>
9794
<groupId>org.apache.maven.resolver</groupId>
9895
<artifactId>maven-resolver-transport-http</artifactId>
96+
<exclusions>
97+
<exclusion>
98+
<groupId>commons-codec</groupId>
99+
<artifactId>commons-codec</artifactId>
100+
</exclusion>
101+
</exclusions>
99102
</dependency>
100103
<dependency>
101104
<groupId>org.apache.maven.wagon</groupId>
@@ -137,13 +140,7 @@
137140
<dependency>
138141
<groupId>org.slf4j</groupId>
139142
<artifactId>slf4j-api</artifactId>
140-
<version>2.0.7</version>
141-
<scope>provided</scope>
142-
</dependency>
143-
<dependency>
144-
<groupId>commons-codec</groupId>
145-
<artifactId>commons-codec</artifactId>
146-
<version>${apache-commons-codec.version}</version>
143+
<version>2.0.16</version>
147144
<scope>provided</scope>
148145
</dependency>
149146
<dependency>
@@ -196,10 +193,10 @@
196193
org.apache.maven.*;provider=m2e;mandatory:=provider,\
197194
org.codehaus.plexus.*;provider=m2e;mandatory:=provider,\
198195
org.sonatype.plexus.*;provider=m2e;mandatory:=provider,\
199-
org.eclipse.aether.*;provider=m2e;mandatory:=provider;version=${maven-resolver.version},\
196+
org.eclipse.aether.*;provider=m2e;mandatory:=provider,\
200197
com.google.inject.*;provider=m2e;mandatory:=provider,\
201198
org.apache.maven.wagon.*;provider=m2e;mandatory:=provider,\
202-
org.eclipse.sisu.*;provider=m2e;mandatory:=provider;version=${maven-resolver.version}
199+
org.eclipse.sisu.*;provider=m2e;mandatory:=provider
203200
Import-Package: \
204201
org.slf4j;version="[1.7.31,3.0.0)",\
205202
org.slf4j.*;version="[1.7.31,3.0.0)",\

0 commit comments

Comments
 (0)