From 3ed99acda62c6f314fe64e6a5df1d49a4903c92e Mon Sep 17 00:00:00 2001 From: Michael Osipov <michaelo@apache.org> Date: Wed, 29 May 2024 21:59:02 +0200 Subject: [PATCH] [MPIR-457] Upgrade to Parent 42 and Maven 3.6.3 This closes #66 --- pom.xml | 64 ++++++------------- .../stubs/ProjectInfoPluginArtifactStub.java | 13 +++- .../stubs/ProjectInfoProjectStub.java | 2 +- 3 files changed, 31 insertions(+), 48 deletions(-) diff --git a/pom.xml b/pom.xml index 6430edb8..d7493a27 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ under the License. <parent> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-plugins</artifactId> - <version>41</version> + <version>42</version> <relativePath /> </parent> @@ -114,14 +114,13 @@ under the License. </distributionManagement> <properties> + <mavenVersion>3.6.3</mavenVersion> <doxiaVersion>1.11.1</doxiaVersion> <doxiaSitetoolsVersion>1.11.1</doxiaSitetoolsVersion> - <mavenVersion>3.2.5</mavenVersion> <scmVersion>2.0.1</scmVersion> - <aetherVersion>1.0.0.v20140518</aetherVersion> + <resolverVersion>1.4.1</resolverVersion> <sitePluginVersion>3.12.1</sitePluginVersion> <fluidoSkinVersion>1.11.1</fluidoSkinVersion> - <surefire.version>3.1.0</surefire.version> <checkstyle.violation.ignore>ParameterNumber,MethodLength</checkstyle.violation.ignore> <project.build.outputTimestamp>2023-11-17T21:50:41Z</project.build.outputTimestamp> </properties> @@ -138,8 +137,8 @@ under the License. <version>3.2.0</version> <exclusions> <exclusion> - <groupId>org.apache.maven</groupId> - <artifactId>maven-core</artifactId> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-container-default</artifactId> </exclusion> </exclusions> </dependency> @@ -169,12 +168,6 @@ under the License. <version>${mavenVersion}</version> <scope>provided</scope> </dependency> - <dependency> - <groupId>org.apache.maven</groupId> - <artifactId>maven-repository-metadata</artifactId> - <version>${mavenVersion}</version> - <scope>provided</scope> - </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-settings</artifactId> @@ -184,7 +177,7 @@ under the License. <dependency> <groupId>org.apache.maven.shared</groupId> <artifactId>maven-dependency-tree</artifactId> - <version>3.2.1</version> + <version>3.3.0</version> </dependency> <dependency> <groupId>org.apache.maven.shared</groupId> @@ -198,9 +191,10 @@ under the License. <version>3.0.0</version> </dependency> <dependency> - <groupId>org.eclipse.aether</groupId> - <artifactId>aether-api</artifactId> - <version>${aetherVersion}</version> + <groupId>org.apache.maven.resolver</groupId> + <artifactId>maven-resolver-api</artifactId> + <version>${resolverVersion}</version> + <scope>test</scope> </dependency> <dependency> @@ -290,26 +284,6 @@ under the License. </dependency> <!-- Doxia Sitetools --> - <dependency> - <groupId>org.apache.maven.doxia</groupId> - <artifactId>doxia-decoration-model</artifactId> - <version>${doxiaSitetoolsVersion}</version> - </dependency> - <dependency> - <groupId>org.apache.maven.doxia</groupId> - <artifactId>doxia-site-renderer</artifactId> - <version>${doxiaSitetoolsVersion}</version> - <exclusions> - <exclusion> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-container-default</artifactId> - </exclusion> - <exclusion> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-component-api</artifactId> - </exclusion> - </exclusions> - </dependency> <dependency> <groupId>org.apache.maven.doxia</groupId> <artifactId>doxia-integration-tools</artifactId> @@ -392,21 +366,21 @@ under the License. <scope>test</scope> </dependency> <dependency> - <groupId>org.eclipse.aether</groupId> - <artifactId>aether-impl</artifactId> - <version>${aetherVersion}</version> + <groupId>org.apache.maven.resolver</groupId> + <artifactId>maven-resolver-impl</artifactId> + <version>${resolverVersion}</version> <scope>test</scope> </dependency> <dependency> - <groupId>org.eclipse.aether</groupId> - <artifactId>aether-connector-basic</artifactId> - <version>${aetherVersion}</version> + <groupId>org.apache.maven.resolver</groupId> + <artifactId>maven-resolver-connector-basic</artifactId> + <version>${resolverVersion}</version> <scope>test</scope> </dependency> <dependency> - <groupId>org.eclipse.aether</groupId> - <artifactId>aether-transport-wagon</artifactId> - <version>${aetherVersion}</version> + <groupId>org.apache.maven.resolver</groupId> + <artifactId>maven-resolver-transport-wagon</artifactId> + <version>${resolverVersion}</version> <scope>test</scope> </dependency> <dependency> diff --git a/src/test/java/org/apache/maven/report/projectinfo/stubs/ProjectInfoPluginArtifactStub.java b/src/test/java/org/apache/maven/report/projectinfo/stubs/ProjectInfoPluginArtifactStub.java index cc37ed52..f3816378 100644 --- a/src/test/java/org/apache/maven/report/projectinfo/stubs/ProjectInfoPluginArtifactStub.java +++ b/src/test/java/org/apache/maven/report/projectinfo/stubs/ProjectInfoPluginArtifactStub.java @@ -35,15 +35,19 @@ public class ProjectInfoPluginArtifactStub extends ArtifactStub { private String packaging; + private String type; + private VersionRange versionRange; private ArtifactHandler handler; - public ProjectInfoPluginArtifactStub(String groupId, String artifactId, String version, String packaging) { + public ProjectInfoPluginArtifactStub( + String groupId, String artifactId, String version, String packaging, String type) { this.groupId = groupId; this.artifactId = artifactId; this.version = version; this.packaging = packaging; + this.type = type; versionRange = VersionRange.createFromVersion(version); } @@ -107,6 +111,11 @@ public void setArtifactHandler(ArtifactHandler handler) { @Override public String getType() { - return ""; + return type; + } + + @Override + public void setType(String type) { + this.type = type; } } diff --git a/src/test/java/org/apache/maven/report/projectinfo/stubs/ProjectInfoProjectStub.java b/src/test/java/org/apache/maven/report/projectinfo/stubs/ProjectInfoProjectStub.java index 14b40069..1f716301 100644 --- a/src/test/java/org/apache/maven/report/projectinfo/stubs/ProjectInfoProjectStub.java +++ b/src/test/java/org/apache/maven/report/projectinfo/stubs/ProjectInfoProjectStub.java @@ -80,7 +80,7 @@ public ProjectInfoProjectStub() { setPackaging(model.getPackaging()); String type = Objects.toString(super.getPackaging(), "jar"); - Artifact artifact = new ProjectInfoPluginArtifactStub(getGroupId(), getArtifactId(), getVersion(), type); + Artifact artifact = new ProjectInfoPluginArtifactStub(getGroupId(), getArtifactId(), getVersion(), type, type); artifact.setArtifactHandler(new DefaultArtifactHandlerStub()); setArtifact(artifact);