Skip to content

Commit

Permalink
[MJAR-311] Switch to Maven 4 API
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Jun 24, 2024
1 parent 816680c commit 571a8b3
Show file tree
Hide file tree
Showing 28 changed files with 252 additions and 1,092 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" ]'
92 changes: 31 additions & 61 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</parent>

<artifactId>maven-jar-plugin</artifactId>
<version>3.4.3-SNAPSHOT</version>
<version>4.0.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>

<name>Apache Maven JAR Plugin</name>
Expand Down Expand Up @@ -73,119 +73,96 @@
</distributionManagement>

<properties>
<javaVersion>8</javaVersion>
<mavenVersion>3.6.3</mavenVersion>
<mavenArchiverVersion>3.6.2</mavenArchiverVersion>
<javaVersion>17</javaVersion>
<mavenVersion>4.0.0-beta-3</mavenVersion>

<guiceVersion>6.0.0</guiceVersion>
<junitVersion>5.10.1</junitVersion>
<mavenPluginPluginVersion>4.0.0-SNAPSHOT</mavenPluginPluginVersion>
<mavenArchiverVersion>4.0.0-SNAPSHOT</mavenArchiverVersion>
<mavenFileManagementVersion>3.1.0</mavenFileManagementVersion>
<mavenPluginTestingVersion>4.0.0-alpha-3-SNAPSHOT</mavenPluginTestingVersion>
<plexusArchiverVersion>4.9.2</plexusArchiverVersion>

<version.maven-plugin-tools>${mavenPluginPluginVersion}</version.maven-plugin-tools>
<version.plexus-xml>4.0.3</version.plexus-xml>

<project.build.outputTimestamp>2024-06-16T12:09:50Z</project.build.outputTimestamp>
</properties>

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

<dependencies>
<!-- Maven Core -->
<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-core</artifactId>
<artifactId>maven-api-di</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<artifactId>maven-api-meta</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>

<!-- plugins annotations -->
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<scope>provided</scope>
</dependency>

<!-- Maven shared -->
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>file-management</artifactId>
<version>3.1.0</version>
<version>${mavenFileManagementVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-archiver</artifactId>
<version>${mavenArchiverVersion}</version>
</dependency>

<!-- plexus -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>4.9.2</version>
</dependency>

<!-- Other used dependencies -->
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
<version>${plexusArchiverVersion}</version>
</dependency>

<!-- Test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junitVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>4.0.0-alpha-2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.11.0</version>
<version>${mavenPluginTestingVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>4.11.0</version>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${mavenVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-xml</artifactId>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>${guiceVersion}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/filtered-resources</directory>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
Expand Down Expand Up @@ -219,13 +196,6 @@
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

<profiles>
Expand Down
5 changes: 3 additions & 2 deletions src/it/MJAR-228/verify.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ try
}
if ( !"lib/junit-4.13.2.jar lib/hamcrest-core-1.3.jar".equals( manifest.get( Attributes.Name.CLASS_PATH ) ) )
{
System.err.println( Attributes.Name.CLASS_PATH.toString() +
" not equals lib/junit-4.13.2.jar lib/hamcrest-core-1.3.jar" );
System.err.println( Attributes.Name.CLASS_PATH.toString() +
" equals '" + manifest.get( Attributes.Name.CLASS_PATH ) + "' " +
" but should be 'lib/junit-4.13.2.jar lib/hamcrest-core-1.3.jar'" );
return false;
}

Expand Down
56 changes: 0 additions & 56 deletions src/it/MJAR-296-exclude-default/pom.xml

This file was deleted.

29 changes: 0 additions & 29 deletions src/it/MJAR-296-exclude-default/setup.groovy

This file was deleted.

23 changes: 0 additions & 23 deletions src/it/MJAR-296-exclude-default/src/main/java/Foo.java

This file was deleted.

31 changes: 0 additions & 31 deletions src/it/MJAR-296-exclude-default/verify.groovy

This file was deleted.

59 changes: 0 additions & 59 deletions src/it/MJAR-296-suppress-default-excludes/pom.xml

This file was deleted.

Loading

0 comments on commit 571a8b3

Please sign in to comment.