Skip to content

Commit

Permalink
Broaden compatibility: 3.6.3+ (#47)
Browse files Browse the repository at this point in the history
Fix properly classpath for both: maven-plugin and CLI (shaded) artifact. This makes toolbox compatible with full range of supported Maven versions: from 3.6.3 to 4-beta-3
  • Loading branch information
cstamas committed May 31, 2024
1 parent 7375869 commit 08bdfe0
Showing 1 changed file with 8 additions and 26 deletions.
34 changes: 8 additions & 26 deletions toolbox/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,6 @@
<artifactId>embedded-maven</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>eu.maveniverse.maven.mima.runtime</groupId>
<artifactId>standalone-static-uber</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
Expand All @@ -102,13 +92,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
Expand Down Expand Up @@ -150,7 +134,7 @@
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-util</artifactId>
<scope>provided</scope>
<scope>compile</scope>
</dependency>

<!-- Search -->
Expand Down Expand Up @@ -184,10 +168,6 @@
<goalPrefix>toolbox</goalPrefix>
<requiredMavenVersion>${prerequisiteMaven}</requiredMavenVersion>
<requiredJavaVersion>${prerequisiteJava}</requiredJavaVersion>
<expectedProvidedScopeExclusions>
<!-- Is needed in compile scope to have it included in CLI Uber JAR as well -->
<expectedProvidedScopeExclusion>org.apache.maven:maven-plugin-api</expectedProvidedScopeExclusion>
</expectedProvidedScopeExclusions>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -238,10 +218,16 @@
<createDependencyReducedPom>false</createDependencyReducedPom>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>cli</shadedClassifierName>
<extraArtifacts>
<extraArtifact>org.slf4j:slf4j-simple:${version.slf4j}</extraArtifact>
<extraArtifact>eu.maveniverse.maven.mima.runtime:standalone-static-uber:${version.mima}</extraArtifact>
<extraArtifact>org.apache.maven:maven-plugin-api:${version.maven}</extraArtifact>
</extraArtifacts>
<artifactSet>
<!-- These are already provided by runtime -->
<excludes>
<exclude>eu.maveniverse.maven.mima.runtime:embedded-maven</exclude>
<exclude>org.apache.maven.resolver:maven-resolver-util</exclude>
<exclude>commons-codec:commons-codec</exclude>
<exclude>org.apache.commons:commons-lang3</exclude>
</excludes>
Expand Down Expand Up @@ -274,10 +260,6 @@
</excludes>
</filter>
</filters>
<entryPoints>
<entryPoint>${mainClass}</entryPoint>
</entryPoints>
<minimizeJar>true</minimizeJar>
</configuration>
</execution>
</executions>
Expand Down

0 comments on commit 08bdfe0

Please sign in to comment.