Skip to content

Commit

Permalink
Extract maven-resolver-api from the embedded runtime bundle
Browse files Browse the repository at this point in the history
Currently we embed the maven-resolver-api jar into m2e, but the API
itself is already a bundle an we should consume it as such so we can:

1) update it independently
2) make it reusable by others without require the full runtime
3) cut down the size of the runtime bundle
  • Loading branch information
laeubi committed Jun 3, 2024
1 parent 9955a22 commit a467b14
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 18 deletions.
2 changes: 1 addition & 1 deletion org.eclipse.m2e.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.eclipse.m2e.feature"
label="%featureName"
version="2.6.1.qualifier"
version="2.6.2.qualifier"
provider-name="%providerName"
plugin="org.eclipse.m2e.core"
license-feature="org.eclipse.license"
Expand Down
7 changes: 4 additions & 3 deletions org.eclipse.m2e.maven.runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</parent>

<artifactId>org.eclipse.m2e.maven.runtime</artifactId>
<version>3.9.700-SNAPSHOT</version>
<version>3.9.701-SNAPSHOT</version>
<packaging>jar</packaging>

<name>M2E Embedded Maven Runtime (includes Incubating components)</name>
Expand Down Expand Up @@ -201,7 +201,6 @@
org.apache.maven.*;provider=m2e;mandatory:=provider,\
org.codehaus.plexus.*;provider=m2e;mandatory:=provider,\
org.sonatype.plexus.*;provider=m2e;mandatory:=provider,\
org.eclipse.aether.*;provider=m2e;mandatory:=provider;version=${maven-resolver.version},\
com.google.inject.*;provider=m2e;mandatory:=provider,\
org.apache.maven.wagon.*;provider=m2e;mandatory:=provider,\
org.eclipse.sisu.*;provider=m2e;mandatory:=provider;version=${maven-resolver.version}
Expand All @@ -214,7 +213,8 @@
org.apache.commons.codec*, \
org.apache.commons.lang3*
Require-Bundle: \
com.google.guava;bundle-version="32.0.1"
com.google.guava;bundle-version="32.0.1", \
org.apache.maven.resolver.api;bundle-version="${maven-resolver.version}";visibility:=reexport
-failok: true
-nouses: true
Expand Down Expand Up @@ -316,6 +316,7 @@
<phase>generate-resources</phase>
<configuration>
<outputDirectory>${project.basedir}/${jars.directory}</outputDirectory>
<excludeArtifactIds>maven-resolver-api</excludeArtifactIds>
</configuration>
</execution>
<execution>
Expand Down
4 changes: 2 additions & 2 deletions org.eclipse.m2e.tests.common/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Bundle-ManifestVersion: 2
Bundle-Name: M2E Testing Helpers
Bundle-SymbolicName: org.eclipse.m2e.tests.common;singleton:=true
Bundle-Version: 2.0.7.qualifier
Require-Bundle: org.junit;bundle-version="4.0.0",
Require-Bundle: org.eclipse.m2e.maven.runtime;bundle-version="[3.8.6,4.0.0)",
org.junit;bundle-version="4.0.0",
org.eclipse.m2e.core;bundle-version="[2.0.0,3.0.0)",
org.eclipse.m2e.maven.runtime;bundle-version="[3.8.6,4.0.0)",
org.eclipse.m2e.jdt;bundle-version="[2.0.0,3.0.0)",
org.eclipse.core.runtime,
org.eclipse.jdt.core,
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<dependency>
<groupId>org.eclipse.m2e</groupId>
<artifactId>org.eclipse.m2e.maven.runtime</artifactId>
<version>3.9.700-SNAPSHOT</version>
<version>3.9.701-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down
31 changes: 20 additions & 11 deletions target-platform/target-platform.target
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@
<unit id="org.eclipse.wst.common.emf" version="0.0.0"/>
<unit id="org.eclipse.wst.xsd.core" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="https://download.eclipse.org/wildwebdeveloper/releases/1.3.4/"/>
<repository location="https://download.eclipse.org/tm4e/releases/0.11.0/"/>
<repository location="https://download.eclipse.org/lsp4e/releases/0.26.0/"/>
<repository location="https://download.eclipse.org/lsp4j/updates/releases/0.22.0/"/>
<repository location="https://download.eclipse.org/mylyn/updates/release/4.2.0/"/>
<unit id="org.eclipse.wildwebdeveloper.xml.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.lsp4e" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="https://download.eclipse.org/cbi/updates/license/"/>
<unit id="org.eclipse.license.feature.group" version="0.0.0"/>
Expand Down Expand Up @@ -101,8 +92,7 @@
</dependency>
</dependencies>
</location>
<location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="false" label="M2E Workspace CLI" missingManifest="error" type="Maven">
<!-- Dedicated location to *NOT* include sources -->
<location includeDependencyDepth="none" includeDependencyScopes="compile" label="M2E Workspace CLI" missingManifest="error" type="Maven">
<dependencies>
<dependency>
<groupId>io.takari.m2e.workspace</groupId>
Expand Down Expand Up @@ -169,5 +159,24 @@ Import-Package: !*
]]></instructions>
</location>
<location type="Target" uri="file:${project_loc:/m2e-core}/target-platform/m2e-runtimes.target"/>
<location includeDependencyDepth="none" includeSource="true" label="Maven Resolver" missingManifest="generate" type="Maven">
<dependencies>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-api</artifactId>
<version>1.9.20</version>
<type>jar</type>
</dependency>
</dependencies>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="https://download.eclipse.org/lsp4e/releases/0.26.0/"/>
<repository location="https://download.eclipse.org/lsp4j/updates/releases/0.22.0/"/>
<repository location="https://download.eclipse.org/mylyn/updates/release/4.2.0/"/>
<repository location="https://download.eclipse.org/tm4e/releases/0.11.0/"/>
<repository location="https://download.eclipse.org/wildwebdeveloper/releases/1.3.4/"/>
<unit id="org.eclipse.lsp4e" version="0.0.0"/>
<unit id="org.eclipse.wildwebdeveloper.xml.feature.feature.group" version="0.0.0"/>
</location>
</locations>
</target>

0 comments on commit a467b14

Please sign in to comment.