Skip to content

Commit

Permalink
[MINSTALL-187] Switch to the new maven 4 api
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Jun 24, 2024
1 parent b604eaa commit c827c0a
Show file tree
Hide file tree
Showing 41 changed files with 947 additions and 1,789 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/maven-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ jobs:
name: Verify
uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v4
with:
maven4-enabled: true

ff-maven: "4.0.0-beta-3" # Maven version for fail-fast-build
maven-matrix: '[ "4.0.0-beta-3" ]'
jdk-matrix: '[ "17", "21" ]'
148 changes: 66 additions & 82 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</parent>

<artifactId>maven-install-plugin</artifactId>
<version>3.1.3-SNAPSHOT</version>
<version>4.0.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>

<name>Apache Maven Install Plugin</name>
Expand All @@ -46,7 +46,7 @@
</contributors>

<prerequisites>
<maven>3.6.3</maven>
<maven>${mavenVersion}</maven>
</prerequisites>

<scm>
Expand All @@ -71,141 +71,130 @@
</distributionManagement>

<properties>
<javaVersion>8</javaVersion>
<mavenVersion>3.9.6</mavenVersion>
<javaVersion>17</javaVersion>
<mavenVersion>4.0.0-beta-3</mavenVersion>
<!-- Maven bound -->
<resolverVersion>1.9.18</resolverVersion>
<!-- Maven bound -->
<slf4jVersion>1.7.36</slf4jVersion>
<slf4jVersion>2.0.13</slf4jVersion>

<!-- plugin versions used in IT tests -->
<mavenAntrunPluginVersion>${version.maven-antrun-plugin}</mavenAntrunPluginVersion>
<mavenCompilerPluginVersion>${version.maven-compiler-plugin}</mavenCompilerPluginVersion>
<mavenEnforcerPluginVersion>${version.maven-enforcer-plugin}</mavenEnforcerPluginVersion>
<mavenJarPluginVersion>${version.maven-jar-plugin}</mavenJarPluginVersion>
<mavenPluginPluginVersion>${version.maven-plugin-tools}</mavenPluginPluginVersion>
<mavenResourcesPluginVersion>${version.maven-resources-plugin}</mavenResourcesPluginVersion>
<mavenSourcePluginVersion>${version.maven-source-plugin}</mavenSourcePluginVersion>
<mavenSurefirePluginVersion>${version.maven-surefire}</mavenSurefirePluginVersion>
<guiceVersion>6.0.0</guiceVersion>
<junitVersion>5.10.2</junitVersion>
<mavenAntrunPluginVersion>3.1.0</mavenAntrunPluginVersion>
<mavenCompilerPluginVersion>3.10.1</mavenCompilerPluginVersion>
<mavenEnforcerPluginVersion>3.1.0</mavenEnforcerPluginVersion>
<mavenJarPluginVersion>3.3.0</mavenJarPluginVersion>
<mavenPluginPluginVersion>4.0.0-SNAPSHOT</mavenPluginPluginVersion>
<mavenPluginTestingVersion>4.0.0-alpha-3-SNAPSHOT</mavenPluginTestingVersion>
<mavenResourcesPluginVersion>3.3.0</mavenResourcesPluginVersion>
<mavenSourcePluginVersion>3.2.1</mavenSourcePluginVersion>
<mavenSurefirePluginVersion>3.2.2</mavenSurefirePluginVersion>
<mockitoVersion>5.12.0</mockitoVersion>
<version.plexus-xml>4.0.1</version.plexus-xml>
<version.maven-plugin-tools>${mavenPluginPluginVersion}</version.maven-plugin-tools>
<version.maven-invoker-plugin>3.7.0</version.maven-invoker-plugin>

<project.build.outputTimestamp>2024-04-26T10:23:20Z</project.build.outputTimestamp>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.0.1-jre</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<artifactId>maven-api-core</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<artifactId>maven-api-di</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<!-- This is here to override 3.0 coming with maven-artifact-transfer -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<artifactId>maven-api-meta</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<artifactId>maven-api-model</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-api</artifactId>
<version>${resolverVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-util</artifactId>
<version>${resolverVersion}</version>
<!-- To work in Maven versions older than 3.9.0 -->
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-xml</artifactId>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>${mavenPluginTestingVersion}</version>
<scope>test</scope>
</dependency>

<!-- dependencies to annotations -->
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<scope>provided</scope>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${mavenVersion}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-impl</artifactId>
<version>${mavenVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>3.3.0</version>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<!-- used by maven-plugin-testing-harness, don't give it compile scope! -->
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>${mavenVersion}</version>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>${guiceVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.8.1</version>
<version>${mockitoVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4jVersion}</version>
<scope>provided</scope>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-api</artifactId>
<version>2.0.0-alpha-11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4jVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-impl</artifactId>
<version>${resolverVersion}</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junitVersion}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<scope>none</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<proc>none</proc>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>${mavenPluginPluginVersion}</version>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
Expand All @@ -222,11 +211,6 @@
</pom>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${mavenSurefirePluginVersion}</version>
</plugin>
</plugins>
</build>

Expand Down
4 changes: 2 additions & 2 deletions src/it/gav-validation/invoker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
invoker.goals = org.apache.maven.plugins:maven-install-plugin:${project.version}:install-file
invoker.buildResult = failure

invoker.systemPropertiesFile.1 = test-invalid.properties
invoker.systemPropertiesFile.2 = test-missing.properties
invoker.userPropertiesFile.1 = test-invalid.properties
invoker.userPropertiesFile.2 = test-missing.properties
2 changes: 1 addition & 1 deletion src/it/no-main-artifact-1/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@

def buildLog = new File ( basedir, "build.log")

assert buildLog.text.contains( "The packaging plugin for project test did not assign "
assert buildLog.text.contains( "The packaging plugin for this project did not assign "
+ "a main file to the project but it has attachments. Change packaging to 'pom'." )
2 changes: 1 addition & 1 deletion src/it/no-main-artifact-2/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@

def buildLog = new File ( basedir, "build.log")

assert buildLog.text.contains( "The packaging plugin for project test did not assign "
assert buildLog.text.contains( "The packaging plugin for this project did not assign "
+ "a main file to the project but it has attachments. Change packaging to 'pom'." )
23 changes: 0 additions & 23 deletions src/it/non-changed-artifact/invoker.properties

This file was deleted.

41 changes: 0 additions & 41 deletions src/it/non-changed-artifact/pom.xml

This file was deleted.

30 changes: 0 additions & 30 deletions src/it/non-changed-artifact/verify.groovy

This file was deleted.

Loading

0 comments on commit c827c0a

Please sign in to comment.