From ed38de368bc510fb7d3813dce1f9cd4338f7abbe Mon Sep 17 00:00:00 2001 From: Tamas Cservenak Date: Thu, 15 Aug 2024 11:16:52 +0200 Subject: [PATCH] [MDEPLOY-322] Use parent POM 43 Also, some ITs were not updated with latest changes and failed. Unsure where were they before this change? --- https://issues.apache.org/jira/browse/MDEPLOY-322 --- pom.xml | 21 ++++--------------- src/it/no-main-artifact-1/verify.groovy | 2 +- src/it/no-main-artifact-2/verify.groovy | 2 +- .../maven/plugins/deploy/DeployFileMojo.java | 2 ++ .../maven/plugins/deploy/DeployMojo.java | 1 + 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index 72dfbfe0..dc0c27d8 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ under the License. org.apache.maven.plugins maven-plugins - 42 + 43 @@ -70,10 +70,10 @@ under the License. 8 3.9.6 - + + 1.9.18 + 1.7.36 - - 1.9.20 ${version.maven-antrun-plugin} @@ -210,19 +210,6 @@ under the License. - - - - org.apache.maven.plugins - maven-compiler-plugin - - none - true - - - - - run-its diff --git a/src/it/no-main-artifact-1/verify.groovy b/src/it/no-main-artifact-1/verify.groovy index 9442aa7d..7274ba5c 100644 --- a/src/it/no-main-artifact-1/verify.groovy +++ b/src/it/no-main-artifact-1/verify.groovy @@ -19,5 +19,5 @@ def buildLog = new File ( basedir, "build.log") -assert buildLog.text.contains( "The packaging plugin for this project did not assign " +assert buildLog.text.contains( "The packaging plugin for project test did not assign " + "a main file to the project but it has attachments. Change packaging to 'pom'." ) \ No newline at end of file diff --git a/src/it/no-main-artifact-2/verify.groovy b/src/it/no-main-artifact-2/verify.groovy index 9442aa7d..7274ba5c 100644 --- a/src/it/no-main-artifact-2/verify.groovy +++ b/src/it/no-main-artifact-2/verify.groovy @@ -19,5 +19,5 @@ def buildLog = new File ( basedir, "build.log") -assert buildLog.text.contains( "The packaging plugin for this project did not assign " +assert buildLog.text.contains( "The packaging plugin for project test did not assign " + "a main file to the project but it has attachments. Change packaging to 'pom'." ) \ No newline at end of file diff --git a/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java b/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java index 7e6536f1..66bf21f1 100644 --- a/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java +++ b/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java @@ -229,6 +229,8 @@ void initProperties() throws MojoExecutionException { } } + @Override + @SuppressWarnings("MethodLength") public void execute() throws MojoExecutionException, MojoFailureException { if (Boolean.parseBoolean(skip) || ("releases".equals(skip) && !ArtifactUtils.isSnapshot(version)) diff --git a/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java b/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java index 79ee1d87..2c586615 100644 --- a/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java +++ b/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java @@ -180,6 +180,7 @@ private boolean hasState(MavenProject project) { return pluginContext.containsKey(DEPLOY_PROCESSED_MARKER); } + @Override public void execute() throws MojoExecutionException, MojoFailureException { State state; if (Boolean.parseBoolean(skip)