From 52e49fe46379b081c4741970d322131391621240 Mon Sep 17 00:00:00 2001 From: Dirk Mahler Date: Thu, 8 Aug 2024 14:31:11 +0200 Subject: [PATCH] #580 raise minimum maven compatibility requirement to 363 (#581) --- cli/application/pom.xml | 9 ++----- maven/pom.xml | 14 +++++++---- .../jqassistant/scm/maven/AbstractMojo.java | 4 ++-- plugin/maven/pom.xml | 24 +++++++++---------- .../MavenProjectScannerPluginTest.java | 2 ++ pom.xml | 6 ++--- 6 files changed, 30 insertions(+), 29 deletions(-) diff --git a/cli/application/pom.xml b/cli/application/pom.xml index f5a88617c6..e7354821bd 100644 --- a/cli/application/pom.xml +++ b/cli/application/pom.xml @@ -11,11 +11,6 @@ jQAssistant Commandline Application - - 3.5.0 - 3.5.0 - - @@ -49,7 +44,7 @@ org.apache.maven maven-settings-builder - ${maven-settings-builder.version} + ${maven.version} @@ -71,7 +66,7 @@ org.apache.maven maven-resolver-provider - ${maven-resolver-provider.version} + ${maven.version} org.apache.maven.resolver diff --git a/maven/pom.xml b/maven/pom.xml index c5950f1579..91f95d7bcc 100644 --- a/maven/pom.xml +++ b/maven/pom.xml @@ -18,7 +18,6 @@ - 3.5.0 2.2.1 3.2.0 @@ -185,7 +184,8 @@ org.apache.maven maven-plugin-api - ${org.apache.maven.version} + ${maven.version} + provided @@ -194,6 +194,12 @@ + + org.apache.maven + maven-model + ${maven.version} + provided + com.google.inject guice @@ -201,7 +207,7 @@ org.apache.maven maven-core - ${org.apache.maven.version} + ${maven.version} provided @@ -213,7 +219,7 @@ org.apache.maven maven-artifact - ${org.apache.maven.version} + ${maven.version} provided diff --git a/maven/src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java b/maven/src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java index c81a0cdb11..8634b5abe9 100644 --- a/maven/src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java +++ b/maven/src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java @@ -106,8 +106,8 @@ private static String createExecutionKey(MojoExecution mojoExecution) { @Override public final void execute() throws MojoExecutionException, MojoFailureException { - if (!runtimeInformation.isMavenVersion("[3.5,)")) { - throw new MojoExecutionException("jQAssistant requires Maven 3.5.x or above."); + if (!runtimeInformation.isMavenVersion("[3.6.3,)")) { + throw new MojoExecutionException("jQAssistant requires Maven 3.6.3 or above."); } // Synchronize on this class as multiple instances of the plugin may exist in parallel builds synchronized (AbstractMojo.class) { diff --git a/plugin/maven/pom.xml b/plugin/maven/pom.xml index 615845f96d..b4501c75bf 100644 --- a/plugin/maven/pom.xml +++ b/plugin/maven/pom.xml @@ -17,8 +17,7 @@ - 3.5.0 - 3.1.0 + 3.3.0 @@ -85,17 +84,6 @@ org.assertj assertj-core - - org.apache.maven - maven-core - ${org.apache.maven.version} - provided - - - org.apache.maven - maven-plugin-api - ${org.apache.maven.version} - org.apache.maven.shared maven-dependency-tree @@ -107,6 +95,16 @@ + + org.apache.maven + maven-core + ${maven.version} + + + org.apache.maven + maven-plugin-api + ${maven.version} + org.apache.maven.shared maven-common-artifact-filters diff --git a/plugin/maven/src/test/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenProjectScannerPluginTest.java b/plugin/maven/src/test/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenProjectScannerPluginTest.java index 6ecb6a5e06..0d98beb403 100644 --- a/plugin/maven/src/test/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenProjectScannerPluginTest.java +++ b/plugin/maven/src/test/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenProjectScannerPluginTest.java @@ -228,6 +228,8 @@ private void scanAndVerify(Map properties, boolean expectedDepen .getLocalRepository(); doReturn(localRepository).when(mavenSession) .getLocalRepository(); + doReturn(ProjectBuildingRequest.RepositoryMerging.POM_DOMINANT).when(projectBuildingRequest) + .getRepositoryMerging(); doReturn(mavenSession).when(scannerContext) .peek(MavenSession.class); diff --git a/pom.xml b/pom.xml index 9e875fc9f3..a917f1ccff 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,7 @@ - 3.6 + ${maven.version} @@ -96,6 +96,7 @@ 2.2.0 1.18.34 1.5.5.Final + 3.6.3 5.12.0 4.4.36 4.4.0.29 @@ -145,7 +146,6 @@ 1.7.0 4.0.0.4121 - 3.5.0 UTF-8 UTF-8 @@ -511,7 +511,7 @@ - [${maven.min.version},) + [${maven.version},)