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 09144bf commit b59ae06
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
5 changes: 3 additions & 2 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 @@ -215,6 +214,7 @@
org.apache.commons.lang3*
Require-Bundle: \
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
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 b59ae06

Please sign in to comment.