diff --git a/its/core-it-suite/pom.xml b/its/core-it-suite/pom.xml index e3b8be7a32..ce24fb3efd 100644 --- a/its/core-it-suite/pom.xml +++ b/its/core-it-suite/pom.xml @@ -98,13 +98,6 @@ under the License. 3.3.0 - - org.apache.maven.its - maven-it-helper - 2.1-SNAPSHOT - - org.apache.maven.shared maven-verifier @@ -139,7 +132,348 @@ under the License. org.apache.maven maven-repository-metadata - 3.6.3 + + + + + org.apache.maven.its + maven-it-plugin-bootstrap + ${project.version} + + + org.apache.maven.its + core-it-component + ${project.version} + + + org.apache.maven.its + core-it-toolchain + ${project.version} + + + org.apache.maven.its + core-it-wagon + ${project.version} + + + org.apache.maven.its + maven-it-helper + ${project.version} + + + org.apache.maven.its + core-it-extension + ${project.version} + + + org.apache.maven.its + core-it-javaagent + ${project.version} + + + org.apache.maven.plugins + maven-clean-plugin + 0.1-stub-SNAPSHOT + + + org.apache.maven.plugins + maven-compiler-plugin + 0.1-stub-SNAPSHOT + + + org.apache.maven.plugins + maven-deploy-plugin + 0.1-stub-SNAPSHOT + + + org.apache.maven.plugins + maven-ear-plugin + 0.1-stub-SNAPSHOT + + + org.apache.maven.plugins + maven-ejb-plugin + 0.1-stub-SNAPSHOT + + + org.apache.maven.plugins + maven-install-plugin + 0.1-stub-SNAPSHOT + + + org.apache.maven.plugins + maven-jar-plugin + 0.1-stub-SNAPSHOT + + + org.apache.maven.plugins + maven-javadoc-plugin + 0.1-stub-SNAPSHOT + + + org.apache.maven.plugins + maven-plugin-plugin + 0.1-stub-SNAPSHOT + + + org.apache.maven.plugins + maven-rar-plugin + 0.1-stub-SNAPSHOT + + + org.apache.maven.plugins + maven-resources-plugin + 0.1-stub-SNAPSHOT + + + org.apache.maven.plugins + maven-site-plugin + 0.1-stub-SNAPSHOT + + + org.apache.maven.plugins + maven-source-plugin + 0.1-stub-SNAPSHOT + + + org.apache.maven.plugins + maven-surefire-plugin + 0.1-stub-SNAPSHOT + + + org.apache.maven.plugins + maven-war-plugin + 0.1-stub-SNAPSHOT + + + org.apache.maven.its.plugins + maven-it-plugin-active-collection + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-ant-based + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-artifact + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-class-loader + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-configuration + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-context-passing + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-dependency-collection + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-dependency-resolution + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-expression + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-error + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-extension-consumer + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-extension-provider + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-fork + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-invalid-descriptor + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-log-file + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-model-interpolation + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-no-default-comp + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-no-project + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-online + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-optional-mojos + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-packaging + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-plugin-dependency + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-project + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-project-interpolation + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-setter + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-singleton-component + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-site + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-toolchain + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-touch + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-uses-properties + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-uses-wagon + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-all + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-plexus-utils-11 + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-plexus-utils-new + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-plexus-component-api + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-log4j + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-extension1 + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-extension2 + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-plexus-lifecycle + ${project.version} + + + org.apache.maven.its.plugins + maven-it-plugin-settings + ${project.version} + + + org.apache.maven.its.plugins + mng-5805-pkg-type-mojo-configuration-extension + ${project.version} + + + org.apache.maven.its.plugins + mng-5805-pkg-type-mojo-configuration-extension2 + ${project.version} + + + org.apache.maven.its.plugins + mng-5805-pkg-type-mojo-configuration-plugin + ${project.version} + + + org.apache.maven.its.plugins + mng-5805-pkg-type-mojo-configuration-plugin-dep + ${project.version} + + + org.apache.maven.its.plugins + mng-5958-pkg-type-extension + ${project.version} + + + org.apache.maven.its.plugins + mng-6759-resolves-project-dependencies-plugin + ${project.version} @@ -355,7 +689,6 @@ under the License. org.apache.maven.plugins maven-dependency-plugin - 2.10 download-maven-distro @@ -382,7 +715,6 @@ under the License. org.apache.maven.plugins maven-antrun-plugin - 3.0.0 unpack-maven-distro @@ -429,7 +761,6 @@ under the License. org.apache.maven.plugins maven-antrun-plugin - 3.0.0 unpack-maven-distro @@ -471,7 +802,6 @@ under the License. org.apache.maven.plugins maven-antrun-plugin - 3.0.0 copy-maven-distro @@ -495,7 +825,6 @@ under the License. org.apache.maven.plugins maven-dependency-plugin - 2.0 inject-emma-into-core-realm diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0956ComponentInjectionViaProjectLevelPluginDepTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0956ComponentInjectionViaProjectLevelPluginDepTest.java index 403a167ccd..a68083d2ac 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0956ComponentInjectionViaProjectLevelPluginDepTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0956ComponentInjectionViaProjectLevelPluginDepTest.java @@ -63,7 +63,7 @@ public class MavenITmng0956ComponentInjectionViaProjectLevelPluginDepTest verifier.verifyErrorFreeLog(); Properties apiProps = verifier.loadProperties( "target/component.properties" ); - assertEquals( "true", apiProps.getProperty( "org.apache.maven.plugin.coreit.DefaultComponent" ) ); + assertEquals( "true", apiProps.getProperty( "org.apache.maven.plugin.coreit.DefaultTestComponent" ) ); } } diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2293CustomPluginParamImplTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2293CustomPluginParamImplTest.java deleted file mode 100644 index 952b639189..0000000000 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2293CustomPluginParamImplTest.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.apache.maven.it; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import org.apache.maven.shared.verifier.util.ResourceExtractor; -import org.apache.maven.shared.verifier.Verifier; - -import java.io.File; -import java.util.Properties; - -import org.junit.jupiter.api.Test; - -/** - * This is a test set for MNG-2293. - * - * - */ -public class MavenITmng2293CustomPluginParamImplTest - extends AbstractMavenIntegrationTestCase -{ - - public MavenITmng2293CustomPluginParamImplTest() - { - super( "(2.0.4,)" ); - } - - /** - * Verify that default implementation of an implementation for a complex object works as expected. - * - * @throws Exception in case of failure - */ - @Test - public void testitMNG2293() - throws Exception - { - File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2293" ); - - Verifier verifier = newVerifier( testDir.getAbsolutePath() ); - verifier.setAutoclean( false ); - verifier.deleteDirectory( "target" ); - verifier.addCliArgument( "validate" ); - verifier.execute(); - verifier.verifyErrorFreeLog(); - - Properties props = verifier.loadProperties( "target/param.properties" ); - assertEquals( "org.apache.maven.plugin.coreit.sub.AnImplementation-foobar", props.getProperty( "theParameter.string" ) ); - assertEquals( "org.apache.maven.plugin.coreit.sub.AnImplementation", props.getProperty( "theParameter.class" ) ); - } - -} diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3379ParallelArtifactDownloadsTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3379ParallelArtifactDownloadsTest.java index a64d0cc8e5..13439e11ab 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3379ParallelArtifactDownloadsTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3379ParallelArtifactDownloadsTest.java @@ -71,7 +71,7 @@ public class MavenITmng3379ParallelArtifactDownloadsTest assertArtifact( verifier, gid + "a", "x", "0.2-SNAPSHOT", "", "jar", "69c041c12f35894230c7c23c49cd245886c6fb6f" ); assertArtifact( verifier, gid + "a", "x", "0.2-SNAPSHOT", "", "pom", - "f0abcb2aa6d99f045c013ecb2671a3a3e71bd715" ); + "04a8ecb6dc279585b6d17552a4518805f0ff33b9" ); assertArtifact( verifier, gid + "a", "x", "0.2-SNAPSHOT", "tests", "jar", "69c041c12f35894230c7c23c49cd245886c6fb6f" ); assertArtifact( verifier, gid + "a", "x", "0.2-SNAPSHOT", "sources", "jar", @@ -84,7 +84,7 @@ public class MavenITmng3379ParallelArtifactDownloadsTest assertArtifact( verifier, gid + "b", "x", "0.2-SNAPSHOT", "", "jar", "efb7c4046565774cd7e44645e02f06ecdf91098d" ); assertArtifact( verifier, gid + "b", "x", "0.2-SNAPSHOT", "", "pom", - "a057baebe5cdae3978b530c0bfea8b523b3d4506" ); + "834b45a91af07702a59855bf99614c099979c065" ); assertArtifact( verifier, gid + "b", "x", "0.2-SNAPSHOT", "tests", "jar", "efb7c4046565774cd7e44645e02f06ecdf91098d" ); assertArtifact( verifier, gid + "b", "x", "0.2-SNAPSHOT", "sources", "jar", @@ -99,7 +99,7 @@ public class MavenITmng3379ParallelArtifactDownloadsTest assertArtifact( verifier, gid + "c", "x", "0.2-SNAPSHOT", "", "jar", "1eb0d5a421b3074e8a69b0dcca7e325c0636a932" ); assertArtifact( verifier, gid + "c", "x", "0.2-SNAPSHOT", "", "pom", - "9c993bdebc7bd1b673891f203511fed9085996f3" ); + "f25d7907d7bd9807e823d15f49363de7826204b0" ); assertArtifact( verifier, gid + "c", "x", "0.2-SNAPSHOT", "tests", "jar", "1eb0d5a421b3074e8a69b0dcca7e325c0636a932" ); assertArtifact( verifier, gid + "c", "x", "0.2-SNAPSHOT", "sources", "jar", @@ -114,7 +114,7 @@ public class MavenITmng3379ParallelArtifactDownloadsTest assertArtifact( verifier, gid + "d", "x", "0.2-SNAPSHOT", "", "jar", "3d606c564625a594165bcbbe4a24c8f11b18b5a0" ); assertArtifact( verifier, gid + "d", "x", "0.2-SNAPSHOT", "", "pom", - "e7b6322cea42970e61316b161f79da690f042f7e" ); + "4255f7a5781e1be7564a09c86eee140fad042de8" ); assertArtifact( verifier, gid + "d", "x", "0.2-SNAPSHOT", "tests", "jar", "3d606c564625a594165bcbbe4a24c8f11b18b5a0" ); assertArtifact( verifier, gid + "d", "x", "0.2-SNAPSHOT", "sources", "jar", diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4479ProjectLevelPluginDepUsedForCliConfigTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4479ProjectLevelPluginDepUsedForCliConfigTest.java deleted file mode 100644 index 774d8f9b50..0000000000 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4479ProjectLevelPluginDepUsedForCliConfigTest.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.apache.maven.it; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import org.apache.maven.shared.verifier.util.ResourceExtractor; -import org.apache.maven.shared.verifier.Verifier; - -import java.io.File; -import java.util.Properties; - -import org.junit.jupiter.api.Test; - -/** - * This is a test set for MNG-4479. - * - * @author Benjamin Bentmann - */ -public class MavenITmng4479ProjectLevelPluginDepUsedForCliConfigTest - extends AbstractMavenIntegrationTestCase -{ - - public MavenITmng4479ProjectLevelPluginDepUsedForCliConfigTest() - { - super( "[2.0.3,2.0.99),[3.0-alpha-2,)" ); - } - - /** - * Verify that project-level plugin dependencies are used for direct invocations of the plugin and that they - * can contribute classes required for the plugin configuration when the plugin is declared using properties - * for its key. - * - * @throws Exception in case of failure - */ - @Test - public void testit() - throws Exception - { - File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4479" ); - - Verifier verifier = newVerifier( testDir.getAbsolutePath() ); - verifier.setAutoclean( false ); - verifier.deleteDirectory( "target" ); - verifier.deleteArtifacts( "org.apache.maven.its.mng4479" ); - verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() ); - verifier.addCliOption( "-s" ); - verifier.addCliOption( "settings.xml" ); - verifier.addCliArgument( "org.apache.maven.its.plugins:maven-it-plugin-parameter-implementation:2.1-SNAPSHOT:param-implementation" ); - verifier.execute(); - verifier.verifyErrorFreeLog(); - - Properties props = verifier.loadProperties( "target/param.properties" ); - assertEquals( "org.apache.maven.plugin.coreit.ItImpl-passed", props.getProperty( "theParameter.string" ) ); - assertEquals( "org.apache.maven.plugin.coreit.ItImpl", props.getProperty( "theParameter.class" ) ); - } - -} diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java index f02ff677cb..67445d15c3 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java @@ -43,6 +43,8 @@ public class MavenITmng5669ReadPomsOnce extends AbstractMavenIntegrationTestCase { + private static final int LOG_SIZE = 233; + public MavenITmng5669ReadPomsOnce() { super( "[4.0.0-alpha-1,)" ); @@ -57,7 +59,7 @@ public class MavenITmng5669ReadPomsOnce Verifier verifier = newVerifier( testDir.getAbsolutePath(), false ); Map filterProperties = Collections.singletonMap( "${javaAgentJar}", - verifier.getArtifactPath( "mng-coreit", "javaagent", "1.0-SNAPSHOT", "jar" ) ); + verifier.getArtifactPath( "org.apache.maven.its", "core-it-javaagent", "2.1-SNAPSHOT", "jar" ) ); verifier.filterFile( ".mvn/jvm.config", ".mvn/jvm.config", null, filterProperties ); verifier.setForkJvm( true ); // pick up agent @@ -78,10 +80,10 @@ public class MavenITmng5669ReadPomsOnce break; } } - assertEquals( logTxt.toString(), 202, logTxt.size() ); + assertEquals( logTxt.toString(), LOG_SIZE, logTxt.size() ); // analyze lines. It is a Hashmap, so we can't rely on the order - Set uniqueBuildingSources = new HashSet<>( 202 ); + Set uniqueBuildingSources = new HashSet<>( LOG_SIZE ); final String buildSourceKey = "org.apache.maven.model.building.source="; final int keyLength = buildSourceKey.length(); for ( String line : logTxt ) @@ -99,7 +101,7 @@ public class MavenITmng5669ReadPomsOnce } uniqueBuildingSources.add( line.substring( start + keyLength, end ) ); } - assertEquals( uniqueBuildingSources.size(), 201 /* is 202 minus superpom */ ); + assertEquals( uniqueBuildingSources.size(), LOG_SIZE - 1 /* minus superpom */ ); } @Test @@ -111,7 +113,7 @@ public class MavenITmng5669ReadPomsOnce Verifier verifier = newVerifier( testDir.getAbsolutePath(), false ); Map filterProperties = Collections.singletonMap( "${javaAgentJar}", - verifier.getArtifactPath( "mng-coreit", "javaagent", "1.0-SNAPSHOT", "jar" ) ); + verifier.getArtifactPath( "org.apache.maven.its", "core-it-javaagent", "2.1-SNAPSHOT", "jar" ) ); verifier.filterFile( ".mvn/jvm.config", ".mvn/jvm.config", null, filterProperties ); verifier.setLogFileName( "log-bc.txt" ); @@ -133,11 +135,11 @@ public class MavenITmng5669ReadPomsOnce break; } } - assertEquals( logTxt.toString(), 202 + 4 /* reactor poms are read twice: file + raw (=XMLFilters) */, + assertEquals( logTxt.toString(), LOG_SIZE + 4 /* reactor poms are read twice: file + raw (=XMLFilters) */, logTxt.size() ); // analyze lines. It is a Hashmap, so we can't rely on the order - Set uniqueBuildingSources = new HashSet<>( 202 ); + Set uniqueBuildingSources = new HashSet<>( LOG_SIZE ); final String buildSourceKey = "org.apache.maven.model.building.source="; final int keyLength = buildSourceKey.length(); for ( String line : logTxt ) @@ -155,7 +157,7 @@ public class MavenITmng5669ReadPomsOnce } uniqueBuildingSources.add( line.substring( start + keyLength, end ) ); } - assertEquals( uniqueBuildingSources.size(), 201 /* is 202 minus superpom */ ); + assertEquals( uniqueBuildingSources.size(), LOG_SIZE - 1 /* minus superpom */ ); } } diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java b/its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java index 26697d9fb8..b07b23f929 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java @@ -294,7 +294,6 @@ public class TestSuiteOrdering implements ClassOrderer suite.addTestSuite( MavenITmng4489MirroringOfExtensionRepoTest.class ); suite.addTestSuite( MavenITmng4488ValidateExternalParenPomLenientTest.class ); suite.addTestSuite( MavenITmng4482ForcePluginSnapshotUpdateTest.class ); - suite.addTestSuite( MavenITmng4479ProjectLevelPluginDepUsedForCliConfigTest.class ); suite.addTestSuite( MavenITmng4474PerLookupWagonInstantiationTest.class ); suite.addTestSuite( MavenITmng4470AuthenticatedDeploymentToProxyTest.class ); suite.addTestSuite( MavenITmng4469AuthenticatedDeploymentToCustomRepoTest.class ); @@ -600,7 +599,6 @@ public class TestSuiteOrdering implements ClassOrderer suite.addTestSuite( MavenITmng2318LocalParentResolutionTest.class ); suite.addTestSuite( MavenITmng2309ProfileInjectionOrderTest.class ); suite.addTestSuite( MavenITmng2305MultipleProxiesTest.class ); - suite.addTestSuite( MavenITmng2293CustomPluginParamImplTest.class ); suite.addTestSuite( MavenITmng2277AggregatorAndResolutionPluginsTest.class ); suite.addTestSuite( MavenITmng2276ProfileActivationBySettingsPropertyTest.class ); suite.addTestSuite( MavenITmng2254PomEncodingTest.class ); diff --git a/its/core-it-suite/src/test/resources-filtered/bootstrap.txt b/its/core-it-suite/src/test/resources-filtered/bootstrap.txt index 47afb6d0b8..d9ccd06b77 100644 --- a/its/core-it-suite/src/test/resources-filtered/bootstrap.txt +++ b/its/core-it-suite/src/test/resources-filtered/bootstrap.txt @@ -39,7 +39,6 @@ org.apache.maven.its.plugins:maven-it-plugin-no-project:${project.version} org.apache.maven.its.plugins:maven-it-plugin-online:${project.version} org.apache.maven.its.plugins:maven-it-plugin-optional-mojos:${project.version} org.apache.maven.its.plugins:maven-it-plugin-packaging:${project.version} -org.apache.maven.its.plugins:maven-it-plugin-parameter-implementation:${project.version} org.apache.maven.its.plugins:maven-it-plugin-plexus-component-api:${project.version} org.apache.maven.its.plugins:maven-it-plugin-plexus-utils-11:${project.version} org.apache.maven.its.plugins:maven-it-plugin-plexus-utils-new:${project.version} @@ -62,14 +61,14 @@ org.apache.maven.its:core-it-wagon:${project.version} org.apache.maven.its:maven-core-it-support:1.0 org.apache.maven.its:maven-core-it-support:1.3 org.apache.maven.its:maven-core-it-support:1.4 +org.apache.maven.plugin-tools:maven-plugin-annotations:3.3 org.apache.maven.plugins:maven-antrun-plugin:3.0.0 -org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 org.apache.maven.plugins:maven-assembly-plugin:3.1.0 org.apache.maven.plugins:maven-clean-plugin:${stubPluginVersion} org.apache.maven.plugins:maven-clean-plugin:2.5 org.apache.maven.plugins:maven-clean-plugin:3.1.0 +org.apache.maven.plugins:maven-clean-plugin:3.2.0 org.apache.maven.plugins:maven-compiler-plugin:${stubPluginVersion} -org.apache.maven.plugins:maven-compiler-plugin:2.0.2 org.apache.maven.plugins:maven-compiler-plugin:3.1 org.apache.maven.plugins:maven-compiler-plugin:3.8.1 org.apache.maven.plugins:maven-compiler-plugin:3.10.1 @@ -79,43 +78,35 @@ org.apache.maven.plugins:maven-dependency-plugin:3.1.1 org.apache.maven.plugins:maven-dependency-plugin:3.3.0 org.apache.maven.plugins:maven-deploy-plugin:${stubPluginVersion} org.apache.maven.plugins:maven-deploy-plugin:2.7 -org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1 -org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M2 +org.apache.maven.plugins:maven-deploy-plugin:3.0.0 org.apache.maven.plugins:maven-ear-plugin:${stubPluginVersion} -org.apache.maven.plugins:maven-ear-plugin:2.8 +org.apache.maven.plugins:maven-ear-plugin:3.2.0 org.apache.maven.plugins:maven-ejb-plugin:${stubPluginVersion} -org.apache.maven.plugins:maven-ejb-plugin:2.5.1 +org.apache.maven.plugins:maven-ejb-plugin:3.1.0 org.apache.maven.plugins:maven-install-plugin:${stubPluginVersion} -org.apache.maven.plugins:maven-install-plugin:2.4 -org.apache.maven.plugins:maven-install-plugin:2.5.2 -org.apache.maven.plugins:maven-install-plugin:3.0.0-M1 +org.apache.maven.plugins:maven-install-plugin:3.0.1 org.apache.maven.plugins:maven-jar-plugin:${stubPluginVersion} -org.apache.maven.plugins:maven-jar-plugin:2.2 -org.apache.maven.plugins:maven-jar-plugin:2.4 -org.apache.maven.plugins:maven-jar-plugin:3.2.0 +org.apache.maven.plugins:maven-jar-plugin:3.3.0 org.apache.maven.plugins:maven-javadoc-plugin:${stubPluginVersion} org.apache.maven.plugins:maven-plugin-plugin:${stubPluginVersion} org.apache.maven.plugins:maven-plugin-plugin:3.2 org.apache.maven.plugins:maven-plugin-plugin:3.3 org.apache.maven.plugins:maven-plugin-plugin:3.6.0 org.apache.maven.plugins:maven-rar-plugin:${stubPluginVersion} -org.apache.maven.plugins:maven-release-plugin:2.5.3 +org.apache.maven.plugins:maven-release-plugin:3.0.0-M5 org.apache.maven.plugins:maven-resources-plugin:${stubPluginVersion} -org.apache.maven.plugins:maven-resources-plugin:2.6 -org.apache.maven.plugins:maven-resources-plugin:2.7 org.apache.maven.plugins:maven-resources-plugin:3.2.0 org.apache.maven.plugins:maven-resources-plugin:3.3.0 org.apache.maven.plugins:maven-site-plugin:${stubPluginVersion} -org.apache.maven.plugins:maven-site-plugin:3.2 -org.apache.maven.plugins:maven-site-plugin:3.3 +org.apache.maven.plugins:maven-site-plugin:3.9.1 org.apache.maven.plugins:maven-source-plugin:${stubPluginVersion} org.apache.maven.plugins:maven-surefire-plugin:${stubPluginVersion} -org.apache.maven.plugins:maven-surefire-plugin:2.12.4 -org.apache.maven.plugins:maven-surefire-plugin:2.22.0 org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5 +org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7 org.apache.maven.plugins:maven-war-plugin:${stubPluginVersion} -org.apache.maven.plugins:maven-war-plugin:2.6 +org.apache.maven.plugins:maven-war-plugin:3.3.2 org.apache.maven.plugins:maven-wrapper-plugin:3.1.0 +org.apache.maven.reporting:maven-reporting-exec:1.1 org.apache.maven.resolver:maven-resolver-api:1.7.3 org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3 org.apache.maven.resolver:maven-resolver-impl:1.7.3 @@ -124,16 +115,11 @@ org.apache.maven.resolver:maven-resolver-util:1.7.3 org.apache.maven.shared:maven-artifact-transfer:0.11.0 org.apache.maven.shared:maven-common-artifact-filters:3.1.0 org.apache.maven.shared:maven-shared-utils:3.3.3 -org.apache.maven.skins:maven-default-skin:1.0 -org.apache.maven.surefire:surefire-junit4:2.12.4 -org.apache.maven.surefire:surefire-junit4:2.22.0 -org.apache.maven.wagon:wagon-webdav-jackrabbit:2.0 +org.apache.maven.skins:maven-default-skin:1.3 +org.apache.maven.surefire:surefire-junit4:3.0.0-M7 org.apache.maven.wagon:wagon-webdav-jackrabbit:2.10 -org.apache.maven:maven-aether-provider:3.1.1 -org.apache.maven:maven-artifact-manager:2.1.0 -org.apache.maven:maven-core:3.1.0 -org.apache.maven:maven-core:3.3.1 -org.apache.maven:maven-model:2.1.0 +org.apache.maven.wagon:wagon-webdav:1.0-beta-2 +org.apache.maven:maven-core:3.8.6 org.apache.maven:maven-plugin-api:3.1.0 org.apache.maven:maven-plugin-api:3.2.5 org.apache.maven:maven-plugin-registry:2.1.0 @@ -141,10 +127,9 @@ org.apache.maven:maven-profile:2.1.0 org.apache.maven:maven-project:2.1.0 org.apache.maven:maven-repository-metadata:2.1.0 org.apache.maven:maven-repository-metadata:3.1.1 +org.apache.maven:maven-resolver-provider:3.8.6 org.apache.maven:maven-script-ant:2.1.0 org.apache.maven:maven-settings-builder:3.1.1 -org.apache.maven:maven-settings:2.0 -org.apache.maven:maven-settings:2.1.0 org.apache.maven:maven-settings:3.1.1 org.codehaus.gmavenplus:gmavenplus-plugin:1.11.0 org.codehaus.mojo:flatten-maven-plugin:1.0.0 @@ -152,6 +137,7 @@ org.codehaus.plexus:plexus-classworlds:2.5.1 org.codehaus.plexus:plexus-component-annotations:1.5.5 org.codehaus.plexus:plexus-component-metadata:1.5.5 org.codehaus.plexus:plexus-container-default:1.5.5 +org.codehaus.plexus:plexus-io:1.0 org.codehaus.plexus:plexus-java:1.0.5 org.codehaus.plexus:plexus-utils:1.1 org.codehaus.plexus:plexus-utils:1.4.5 diff --git a/its/core-it-suite/src/test/resources/mng-0377/repo/org/apache/maven/its/mng0377/maven-it-plugin-prefix/0.1/maven-it-plugin-prefix-0.1.pom b/its/core-it-suite/src/test/resources/mng-0377/repo/org/apache/maven/its/mng0377/maven-it-plugin-prefix/0.1/maven-it-plugin-prefix-0.1.pom index d1687abdd7..2425861144 100644 --- a/its/core-it-suite/src/test/resources/mng-0377/repo/org/apache/maven/its/mng0377/maven-it-plugin-prefix/0.1/maven-it-plugin-prefix-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-0377/repo/org/apache/maven/its/mng0377/maven-it-plugin-prefix/0.1/maven-it-plugin-prefix-0.1.pom @@ -48,7 +48,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-0449/repo/org/apache/maven/its/mng0449/maven-it-plugin-a/0.1/maven-it-plugin-a-0.1.pom b/its/core-it-suite/src/test/resources/mng-0449/repo/org/apache/maven/its/mng0449/maven-it-plugin-a/0.1/maven-it-plugin-a-0.1.pom index c65c678fae..51032c6963 100644 --- a/its/core-it-suite/src/test/resources/mng-0449/repo/org/apache/maven/its/mng0449/maven-it-plugin-a/0.1/maven-it-plugin-a-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-0449/repo/org/apache/maven/its/mng0449/maven-it-plugin-a/0.1/maven-it-plugin-a-0.1.pom @@ -48,7 +48,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-0449/repo/org/apache/maven/its/mng0449/maven-it-plugin-a/0.2-SNAPSHOT/maven-it-plugin-a-0.2-20090306.154319-1.pom b/its/core-it-suite/src/test/resources/mng-0449/repo/org/apache/maven/its/mng0449/maven-it-plugin-a/0.2-SNAPSHOT/maven-it-plugin-a-0.2-20090306.154319-1.pom index 1f67272bbb..2c1ebcc765 100644 --- a/its/core-it-suite/src/test/resources/mng-0449/repo/org/apache/maven/its/mng0449/maven-it-plugin-a/0.2-SNAPSHOT/maven-it-plugin-a-0.2-20090306.154319-1.pom +++ b/its/core-it-suite/src/test/resources/mng-0449/repo/org/apache/maven/its/mng0449/maven-it-plugin-a/0.2-SNAPSHOT/maven-it-plugin-a-0.2-20090306.154319-1.pom @@ -48,7 +48,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-0449/repo/org/apache/maven/its/mng0449/maven-it-plugin-b/0.1/maven-it-plugin-b-0.1.pom b/its/core-it-suite/src/test/resources/mng-0449/repo/org/apache/maven/its/mng0449/maven-it-plugin-b/0.1/maven-it-plugin-b-0.1.pom index 3b6d9dbc06..957efaa465 100644 --- a/its/core-it-suite/src/test/resources/mng-0449/repo/org/apache/maven/its/mng0449/maven-it-plugin-b/0.1/maven-it-plugin-b-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-0449/repo/org/apache/maven/its/mng0449/maven-it-plugin-b/0.1/maven-it-plugin-b-0.1.pom @@ -48,7 +48,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-4357/repo/org/apache/maven/its/mng4357/extension/0.1/extension-0.1.pom b/its/core-it-suite/src/test/resources/mng-4357/repo/org/apache/maven/its/mng4357/extension/0.1/extension-0.1.pom index ecf817c470..5fb8acb777 100644 --- a/its/core-it-suite/src/test/resources/mng-4357/repo/org/apache/maven/its/mng4357/extension/0.1/extension-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-4357/repo/org/apache/maven/its/mng4357/extension/0.1/extension-0.1.pom @@ -49,7 +49,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-4357/repo/org/apache/maven/its/mng4357/extension/0.2/extension-0.2.pom b/its/core-it-suite/src/test/resources/mng-4357/repo/org/apache/maven/its/mng4357/extension/0.2/extension-0.2.pom index c0ab9a09b0..2d50bf6917 100644 --- a/its/core-it-suite/src/test/resources/mng-4357/repo/org/apache/maven/its/mng4357/extension/0.2/extension-0.2.pom +++ b/its/core-it-suite/src/test/resources/mng-4357/repo/org/apache/maven/its/mng4357/extension/0.2/extension-0.2.pom @@ -49,7 +49,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-4360/jackrabbit/pom.xml b/its/core-it-suite/src/test/resources/mng-4360/jackrabbit/pom.xml index f1884ba71c..9807e679a0 100644 --- a/its/core-it-suite/src/test/resources/mng-4360/jackrabbit/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-4360/jackrabbit/pom.xml @@ -47,7 +47,7 @@ under the License. org.apache.maven.wagon wagon-webdav-jackrabbit - 2.0 + 2.10 diff --git a/its/core-it-suite/src/test/resources/mng-4465/repo/org/apache/maven/its/mng4465/maven-mng4465-plugin/0.1/maven-mng4465-plugin-0.1.pom b/its/core-it-suite/src/test/resources/mng-4465/repo/org/apache/maven/its/mng4465/maven-mng4465-plugin/0.1/maven-mng4465-plugin-0.1.pom index abea5ece6b..6ac4493616 100644 --- a/its/core-it-suite/src/test/resources/mng-4465/repo/org/apache/maven/its/mng4465/maven-mng4465-plugin/0.1/maven-mng4465-plugin-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-4465/repo/org/apache/maven/its/mng4465/maven-mng4465-plugin/0.1/maven-mng4465-plugin-0.1.pom @@ -45,7 +45,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-4479/pom.xml b/its/core-it-suite/src/test/resources/mng-4479/pom.xml deleted file mode 100644 index 615ab811ee..0000000000 --- a/its/core-it-suite/src/test/resources/mng-4479/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - 4.0.0 - - org.apache.maven.its.mng4479 - test - 0.1 - jar - - Maven Integration Test :: MNG-4479 - - Verify that project-level plugin dependencies are used for direct invocations of the plugin and that they - can contribute classes required for the plugin configuration when the plugin is declared using properties - for its key. - - - - org.apache.maven.its.plugins - maven-it-plugin-parameter-implementation - - - - - - - ${pluginGroupId} - ${pluginArtifactId} - 2.1-SNAPSHOT - - target/param.properties - - - passed - - - - - org.apache.maven.its.mng4479 - dep - 0.1 - - - - - - maven-resources-plugin - 2.1 - - - - diff --git a/its/core-it-suite/src/test/resources/mng-4479/repo/.gitattributes b/its/core-it-suite/src/test/resources/mng-4479/repo/.gitattributes deleted file mode 100644 index e3bce59d1b..0000000000 --- a/its/core-it-suite/src/test/resources/mng-4479/repo/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -*.pom text eol=lf -maven-metadata.xml text eol=lf - diff --git a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.jar b/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.jar deleted file mode 100644 index 6c7566dc71..0000000000 Binary files a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.jar and /dev/null differ diff --git a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.jar.md5 b/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.jar.md5 deleted file mode 100644 index 41e1b42795..0000000000 --- a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -401d7e263a40309f7cfca4363b65afbd \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.jar.sha1 b/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.jar.sha1 deleted file mode 100644 index baa85572dd..0000000000 --- a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -0663c65954d3b1181ed1e9fd2d876801657f2d72 \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.pom b/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.pom deleted file mode 100644 index b4d3725343..0000000000 --- a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.pom +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - 4.0.0 - - org.apache.maven.its.mng4479 - dep - 0.1 - jar - - Maven Integration Test :: MNG-4479 :: Plugin Dependency - - - - maven-core-it - file:///${basedir}/repo - - - - - - org.apache.maven.its.plugins - maven-it-plugin-parameter-implementation - 2.1-SNAPSHOT - provided - - - - - - - . - - pom.xml - src/** - - - - src/main/resources - - - - diff --git a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.pom.md5 b/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.pom.md5 deleted file mode 100644 index 42cf1780a6..0000000000 --- a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -5568ea5b0f81059a5a9a834148c8a37a \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.pom.sha1 b/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.pom.sha1 deleted file mode 100644 index 83d0265f3a..0000000000 --- a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/0.1/dep-0.1.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -c94435a1e03ee11926cef6d20f6e320d346026b0 \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/maven-metadata.xml b/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/maven-metadata.xml deleted file mode 100644 index 16f5fcdd3a..0000000000 --- a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/maven-metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - org.apache.maven.its.mng4479 - dep - 0.1 - - - 0.1 - - 20091206230357 - - diff --git a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/maven-metadata.xml.md5 b/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/maven-metadata.xml.md5 deleted file mode 100644 index de21ecdf56..0000000000 --- a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/maven-metadata.xml.md5 +++ /dev/null @@ -1 +0,0 @@ -bbccb347c2dd460e8a3e6cf1e985e440 \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/maven-metadata.xml.sha1 b/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/maven-metadata.xml.sha1 deleted file mode 100644 index 87ba49f82c..0000000000 --- a/its/core-it-suite/src/test/resources/mng-4479/repo/org/apache/maven/its/mng4479/dep/maven-metadata.xml.sha1 +++ /dev/null @@ -1 +0,0 @@ -419037264795a7894d642ee8a40169ac32512997 \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-4479/settings-template.xml b/its/core-it-suite/src/test/resources/mng-4479/settings-template.xml deleted file mode 100644 index cde4215860..0000000000 --- a/its/core-it-suite/src/test/resources/mng-4479/settings-template.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - maven-core-it-repo - - - maven-core-it - @baseurl@/repo - - ignore - - - false - - - - - - maven-core-it - @baseurl@/repo - - ignore - - - false - - - - - - - maven-core-it-repo - - diff --git a/its/core-it-suite/src/test/resources/mng-4482/repo-1/org/apache/maven/its/mng4482/maven-mng4482-plugin/0.1-SNAPSHOT/maven-mng4482-plugin-0.1-20091204.194743-1.pom b/its/core-it-suite/src/test/resources/mng-4482/repo-1/org/apache/maven/its/mng4482/maven-mng4482-plugin/0.1-SNAPSHOT/maven-mng4482-plugin-0.1-20091204.194743-1.pom index 64bd877117..93cf192f24 100644 --- a/its/core-it-suite/src/test/resources/mng-4482/repo-1/org/apache/maven/its/mng4482/maven-mng4482-plugin/0.1-SNAPSHOT/maven-mng4482-plugin-0.1-20091204.194743-1.pom +++ b/its/core-it-suite/src/test/resources/mng-4482/repo-1/org/apache/maven/its/mng4482/maven-mng4482-plugin/0.1-SNAPSHOT/maven-mng4482-plugin-0.1-20091204.194743-1.pom @@ -43,7 +43,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-4482/repo-2/org/apache/maven/its/mng4482/maven-mng4482-plugin/0.1-SNAPSHOT/maven-mng4482-plugin-0.1-20091204.194942-2.pom b/its/core-it-suite/src/test/resources/mng-4482/repo-2/org/apache/maven/its/mng4482/maven-mng4482-plugin/0.1-SNAPSHOT/maven-mng4482-plugin-0.1-20091204.194942-2.pom index e024735791..6998715e18 100644 --- a/its/core-it-suite/src/test/resources/mng-4482/repo-2/org/apache/maven/its/mng4482/maven-mng4482-plugin/0.1-SNAPSHOT/maven-mng4482-plugin-0.1-20091204.194942-2.pom +++ b/its/core-it-suite/src/test/resources/mng-4482/repo-2/org/apache/maven/its/mng4482/maven-mng4482-plugin/0.1-SNAPSHOT/maven-mng4482-plugin-0.1-20091204.194942-2.pom @@ -48,7 +48,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-4489/repo-a/org/apache/maven/its/mng4489/ext/0.1/ext-0.1.pom b/its/core-it-suite/src/test/resources/mng-4489/repo-a/org/apache/maven/its/mng4489/ext/0.1/ext-0.1.pom index 37e0b28d87..302f740415 100644 --- a/its/core-it-suite/src/test/resources/mng-4489/repo-a/org/apache/maven/its/mng4489/ext/0.1/ext-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-4489/repo-a/org/apache/maven/its/mng4489/ext/0.1/ext-0.1.pom @@ -40,7 +40,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-4554/repo-1/org/apache/maven/its/mng4554/a-maven-plugin/0.1/a-maven-plugin-0.1.pom b/its/core-it-suite/src/test/resources/mng-4554/repo-1/org/apache/maven/its/mng4554/a-maven-plugin/0.1/a-maven-plugin-0.1.pom index 65c6a4a660..04a5b6523b 100644 --- a/its/core-it-suite/src/test/resources/mng-4554/repo-1/org/apache/maven/its/mng4554/a-maven-plugin/0.1/a-maven-plugin-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-4554/repo-1/org/apache/maven/its/mng4554/a-maven-plugin/0.1/a-maven-plugin-0.1.pom @@ -47,7 +47,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-4554/repo-1/org/apache/maven/its/mng4554/a-maven-plugin/0.1/a-maven-plugin-0.1.pom.md5 b/its/core-it-suite/src/test/resources/mng-4554/repo-1/org/apache/maven/its/mng4554/a-maven-plugin/0.1/a-maven-plugin-0.1.pom.md5 index ffb7561801..2839db5f1a 100644 --- a/its/core-it-suite/src/test/resources/mng-4554/repo-1/org/apache/maven/its/mng4554/a-maven-plugin/0.1/a-maven-plugin-0.1.pom.md5 +++ b/its/core-it-suite/src/test/resources/mng-4554/repo-1/org/apache/maven/its/mng4554/a-maven-plugin/0.1/a-maven-plugin-0.1.pom.md5 @@ -1 +1 @@ -3f95d29de76828655789e5785026d174 \ No newline at end of file +cb030c26156526e8f31390ccd1b8462c \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-4554/repo-1/org/apache/maven/its/mng4554/a-maven-plugin/0.1/a-maven-plugin-0.1.pom.sha1 b/its/core-it-suite/src/test/resources/mng-4554/repo-1/org/apache/maven/its/mng4554/a-maven-plugin/0.1/a-maven-plugin-0.1.pom.sha1 index b4696de670..943c5b9827 100644 --- a/its/core-it-suite/src/test/resources/mng-4554/repo-1/org/apache/maven/its/mng4554/a-maven-plugin/0.1/a-maven-plugin-0.1.pom.sha1 +++ b/its/core-it-suite/src/test/resources/mng-4554/repo-1/org/apache/maven/its/mng4554/a-maven-plugin/0.1/a-maven-plugin-0.1.pom.sha1 @@ -1 +1 @@ -c922024196f921779ed781a49cf18935496638d9 \ No newline at end of file +ba39882edd1776397321bbd8d0dd14cb71f06554 \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-4554/repo-2/org/apache/maven/its/mng4554/b-maven-plugin/0.1/b-maven-plugin-0.1.pom b/its/core-it-suite/src/test/resources/mng-4554/repo-2/org/apache/maven/its/mng4554/b-maven-plugin/0.1/b-maven-plugin-0.1.pom index 05f51e9f7b..f9b88a4c5a 100644 --- a/its/core-it-suite/src/test/resources/mng-4554/repo-2/org/apache/maven/its/mng4554/b-maven-plugin/0.1/b-maven-plugin-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-4554/repo-2/org/apache/maven/its/mng4554/b-maven-plugin/0.1/b-maven-plugin-0.1.pom @@ -47,7 +47,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-4554/repo-2/org/apache/maven/its/mng4554/b-maven-plugin/0.1/b-maven-plugin-0.1.pom.md5 b/its/core-it-suite/src/test/resources/mng-4554/repo-2/org/apache/maven/its/mng4554/b-maven-plugin/0.1/b-maven-plugin-0.1.pom.md5 index 8b25354424..cbcc62ccce 100644 --- a/its/core-it-suite/src/test/resources/mng-4554/repo-2/org/apache/maven/its/mng4554/b-maven-plugin/0.1/b-maven-plugin-0.1.pom.md5 +++ b/its/core-it-suite/src/test/resources/mng-4554/repo-2/org/apache/maven/its/mng4554/b-maven-plugin/0.1/b-maven-plugin-0.1.pom.md5 @@ -1 +1 @@ -e2ddcf968ff240316b64740be361d49e \ No newline at end of file +5e6eb336fa7d01a5657b51739c9e96a9 \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-4554/repo-2/org/apache/maven/its/mng4554/b-maven-plugin/0.1/b-maven-plugin-0.1.pom.sha1 b/its/core-it-suite/src/test/resources/mng-4554/repo-2/org/apache/maven/its/mng4554/b-maven-plugin/0.1/b-maven-plugin-0.1.pom.sha1 index 0f138b6c20..10980aac8e 100644 --- a/its/core-it-suite/src/test/resources/mng-4554/repo-2/org/apache/maven/its/mng4554/b-maven-plugin/0.1/b-maven-plugin-0.1.pom.sha1 +++ b/its/core-it-suite/src/test/resources/mng-4554/repo-2/org/apache/maven/its/mng4554/b-maven-plugin/0.1/b-maven-plugin-0.1.pom.sha1 @@ -1 +1 @@ -16407d9c8581fb171ed665bc11d02d4f1b4201d9 \ No newline at end of file +3ff9902a668457b8b84644e989c237ef58a568c0 \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-4561/repo-a/org/apache/maven/its/mng4561/plugin/0.1/plugin-0.1.pom b/its/core-it-suite/src/test/resources/mng-4561/repo-a/org/apache/maven/its/mng4561/plugin/0.1/plugin-0.1.pom index c92f6035cb..168914796e 100644 --- a/its/core-it-suite/src/test/resources/mng-4561/repo-a/org/apache/maven/its/mng4561/plugin/0.1/plugin-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-4561/repo-a/org/apache/maven/its/mng4561/plugin/0.1/plugin-0.1.pom @@ -40,7 +40,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/0.1/maven-mng4586-plugin-0.1.pom b/its/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/0.1/maven-mng4586-plugin-0.1.pom index 486747c524..dca4fb3d91 100644 --- a/its/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/0.1/maven-mng4586-plugin-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/0.1/maven-mng4586-plugin-0.1.pom @@ -48,7 +48,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-4654/repo/org/apache/maven/its/mng4654/maven-ext-plugin/1.0/maven-ext-plugin-1.0.pom b/its/core-it-suite/src/test/resources/mng-4654/repo/org/apache/maven/its/mng4654/maven-ext-plugin/1.0/maven-ext-plugin-1.0.pom index f54dabae14..34515d9d9e 100644 --- a/its/core-it-suite/src/test/resources/mng-4654/repo/org/apache/maven/its/mng4654/maven-ext-plugin/1.0/maven-ext-plugin-1.0.pom +++ b/its/core-it-suite/src/test/resources/mng-4654/repo/org/apache/maven/its/mng4654/maven-ext-plugin/1.0/maven-ext-plugin-1.0.pom @@ -38,7 +38,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-a/pom.xml b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-a/pom.xml index fc9eae4105..5308222114 100644 --- a/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-a/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-a/pom.xml @@ -38,7 +38,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-b/pom.xml b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-b/pom.xml index 829c384b02..bfb4aa7d11 100644 --- a/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-b/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-b/pom.xml @@ -46,7 +46,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/pom.xml b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/pom.xml index 2a2ba63338..565b2fc7a8 100644 --- a/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/pom.xml @@ -38,8 +38,8 @@ under the License. UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-a/pom.xml b/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-a/pom.xml index fc9eae4105..5308222114 100644 --- a/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-a/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-a/pom.xml @@ -38,7 +38,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/pom.xml b/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/pom.xml index 829c384b02..bfb4aa7d11 100644 --- a/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/pom.xml @@ -46,7 +46,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-4660-resume-from/pom.xml b/its/core-it-suite/src/test/resources/mng-4660-resume-from/pom.xml index f98cc761b0..1589fd08d3 100644 --- a/its/core-it-suite/src/test/resources/mng-4660-resume-from/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-4660-resume-from/pom.xml @@ -38,8 +38,8 @@ under the License. UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/its/core-it-suite/src/test/resources/mng-4745/repo/org/apache/maven/its/mng4745/maven-it-plugin/1.0/maven-it-plugin-1.0.pom b/its/core-it-suite/src/test/resources/mng-4745/repo/org/apache/maven/its/mng4745/maven-it-plugin/1.0/maven-it-plugin-1.0.pom index 5b9f7fd430..55fd03c5b9 100644 --- a/its/core-it-suite/src/test/resources/mng-4745/repo/org/apache/maven/its/mng4745/maven-it-plugin/1.0/maven-it-plugin-1.0.pom +++ b/its/core-it-suite/src/test/resources/mng-4745/repo/org/apache/maven/its/mng4745/maven-it-plugin/1.0/maven-it-plugin-1.0.pom @@ -48,7 +48,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-4745/repo/org/apache/maven/its/mng4745/maven-it-plugin/1.1/maven-it-plugin-1.1.pom b/its/core-it-suite/src/test/resources/mng-4745/repo/org/apache/maven/its/mng4745/maven-it-plugin/1.1/maven-it-plugin-1.1.pom index d044dd7403..be9aca75c9 100644 --- a/its/core-it-suite/src/test/resources/mng-4745/repo/org/apache/maven/its/mng4745/maven-it-plugin/1.1/maven-it-plugin-1.1.pom +++ b/its/core-it-suite/src/test/resources/mng-4745/repo/org/apache/maven/its/mng4745/maven-it-plugin/1.1/maven-it-plugin-1.1.pom @@ -47,7 +47,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-4761/repo/org/apache/maven/its/mng4761/maven-mng4761-plugin/0.1/maven-mng4761-plugin-0.1.pom b/its/core-it-suite/src/test/resources/mng-4761/repo/org/apache/maven/its/mng4761/maven-mng4761-plugin/0.1/maven-mng4761-plugin-0.1.pom index 2f1b027c64..c28b178921 100644 --- a/its/core-it-suite/src/test/resources/mng-4761/repo/org/apache/maven/its/mng4761/maven-mng4761-plugin/0.1/maven-mng4761-plugin-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-4761/repo/org/apache/maven/its/mng4761/maven-mng4761-plugin/0.1/maven-mng4761-plugin-0.1.pom @@ -31,7 +31,7 @@ org.apache.maven maven-plugin-api - 2.0 + 3.8.6 junit @@ -58,7 +58,7 @@ org.apache.maven.plugins maven-plugin-plugin - 2.5.1 + 3.6.4 test-plugin diff --git a/its/core-it-suite/src/test/resources/mng-4840/repo/org/apache/maven/its/mng4840/maven-mng4840-plugin/0.1/maven-mng4840-plugin-0.1.pom b/its/core-it-suite/src/test/resources/mng-4840/repo/org/apache/maven/its/mng4840/maven-mng4840-plugin/0.1/maven-mng4840-plugin-0.1.pom index 51862d51eb..8fb98abc37 100644 --- a/its/core-it-suite/src/test/resources/mng-4840/repo/org/apache/maven/its/mng4840/maven-mng4840-plugin/0.1/maven-mng4840-plugin-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-4840/repo/org/apache/maven/its/mng4840/maven-mng4840-plugin/0.1/maven-mng4840-plugin-0.1.pom @@ -48,7 +48,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-4840/repo/org/apache/maven/its/mng4840/maven-mng4840-plugin/0.2/maven-mng4840-plugin-0.2.pom b/its/core-it-suite/src/test/resources/mng-4840/repo/org/apache/maven/its/mng4840/maven-mng4840-plugin/0.2/maven-mng4840-plugin-0.2.pom index 7bdc07883c..3523ecb3b5 100644 --- a/its/core-it-suite/src/test/resources/mng-4840/repo/org/apache/maven/its/mng4840/maven-mng4840-plugin/0.2/maven-mng4840-plugin-0.2.pom +++ b/its/core-it-suite/src/test/resources/mng-4840/repo/org/apache/maven/its/mng4840/maven-mng4840-plugin/0.2/maven-mng4840-plugin-0.2.pom @@ -48,7 +48,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-4925/repo/org/apache/maven/its/mng4925/maven-mng4925-plugin/0.1/maven-mng4925-plugin-0.1.pom b/its/core-it-suite/src/test/resources/mng-4925/repo/org/apache/maven/its/mng4925/maven-mng4925-plugin/0.1/maven-mng4925-plugin-0.1.pom index 53b7e52e27..83e76bec1e 100644 --- a/its/core-it-suite/src/test/resources/mng-4925/repo/org/apache/maven/its/mng4925/maven-mng4925-plugin/0.1/maven-mng4925-plugin-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-4925/repo/org/apache/maven/its/mng4925/maven-mng4925-plugin/0.1/maven-mng4925-plugin-0.1.pom @@ -42,7 +42,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 org.codehaus.plexus diff --git a/its/core-it-suite/src/test/resources/mng-5019/repo/org/apache/maven/its/mng5019/maven-it-plugin/0.1/maven-it-plugin-0.1.pom b/its/core-it-suite/src/test/resources/mng-5019/repo/org/apache/maven/its/mng5019/maven-it-plugin/0.1/maven-it-plugin-0.1.pom index 8812a2b0a3..d36561c096 100644 --- a/its/core-it-suite/src/test/resources/mng-5019/repo/org/apache/maven/its/mng5019/maven-it-plugin/0.1/maven-it-plugin-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-5019/repo/org/apache/maven/its/mng5019/maven-it-plugin/0.1/maven-it-plugin-0.1.pom @@ -35,13 +35,13 @@ under the License. org.apache.maven maven-plugin-api - 3.0 + 3.8.6 provided org.apache.maven maven-core - 3.0 + 3.8.6 provided diff --git a/its/core-it-suite/src/test/resources/mng-5207/prepare/master-1.pom b/its/core-it-suite/src/test/resources/mng-5207/prepare/master-1.pom index 3b0b082b0e..363af63941 100644 --- a/its/core-it-suite/src/test/resources/mng-5207/prepare/master-1.pom +++ b/its/core-it-suite/src/test/resources/mng-5207/prepare/master-1.pom @@ -227,18 +227,18 @@ - 2.2.1 - 2.4.1 - 2.3.2 - 2.3 - 2.7 - 2.6 - 2.3 - 2.3.1 - 2.3.2 - 2.5 - 2.1.2 - 2.9 + 3.4.0 + 3.2.0 + 3.10.1 + 3.3.0 + 3.0.0 + 3.3.0 + 3.1.0 + 3.0.1 + 3.3.0 + 3.2.0 + 3.2.1 + 3.0.0-M7 1.7 diff --git a/its/core-it-suite/src/test/resources/mng-5207/prepare/master-x.pom b/its/core-it-suite/src/test/resources/mng-5207/prepare/master-x.pom index 5d5999f28b..35c5d79719 100644 --- a/its/core-it-suite/src/test/resources/mng-5207/prepare/master-x.pom +++ b/its/core-it-suite/src/test/resources/mng-5207/prepare/master-x.pom @@ -227,18 +227,18 @@ - 2.2.1 - 2.4.1 - 2.3.2 - 2.3 - 2.7 - 2.6 - 2.3 - 2.3.1 - 2.3.2 - 2.5 - 2.1.2 - 2.9 + 3.4.0 + 3.2.0 + 3.10.1 + 3.3.0 + 3.0.0 + 3.2.0 + 3.1.0 + 3.0.1 + 3.3.0 + 3.3.0 + 3.2.1 + 3.0.0-M7 1.7 diff --git a/its/core-it-suite/src/test/resources/mng-5208/spy/pom.xml b/its/core-it-suite/src/test/resources/mng-5208/spy/pom.xml index 130e308686..2a69a2b285 100644 --- a/its/core-it-suite/src/test/resources/mng-5208/spy/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5208/spy/pom.xml @@ -12,7 +12,7 @@ org.apache.maven maven-core - 3.0.3 + 3.8.6 org.codehaus.plexus @@ -50,7 +50,7 @@ org.apache.maven.plugins maven-resources-plugin - 2.2 + 3.3.0 diff --git a/its/core-it-suite/src/test/resources/mng-5280/fake-maven-plugin/fake-maven-plugin-1.0.pom b/its/core-it-suite/src/test/resources/mng-5280/fake-maven-plugin/fake-maven-plugin-1.0.pom index 495aa5981f..19ee18e3ff 100644 --- a/its/core-it-suite/src/test/resources/mng-5280/fake-maven-plugin/fake-maven-plugin-1.0.pom +++ b/its/core-it-suite/src/test/resources/mng-5280/fake-maven-plugin/fake-maven-plugin-1.0.pom @@ -31,7 +31,7 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-5389-lifecycleParticipant-afterSession/extension/pom.xml b/its/core-it-suite/src/test/resources/mng-5389-lifecycleParticipant-afterSession/extension/pom.xml index 8a3a9446a1..46a94d480f 100644 --- a/its/core-it-suite/src/test/resources/mng-5389-lifecycleParticipant-afterSession/extension/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5389-lifecycleParticipant-afterSession/extension/pom.xml @@ -28,7 +28,7 @@ under the License. 0.1 - 3.2.1 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-5503/module-a/pom.xml b/its/core-it-suite/src/test/resources/mng-5503/module-a/pom.xml index 0e631734ad..c7b09f248e 100644 --- a/its/core-it-suite/src/test/resources/mng-5503/module-a/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5503/module-a/pom.xml @@ -8,7 +8,7 @@ org.apache.maven.plugins maven-assembly-plugin - 3.1.0 + 3.4.0 zip.xml diff --git a/its/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/extension-plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/extension-plugin/pom.xml index fc5bf959b8..668b3626d2 100644 --- a/its/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/extension-plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/extension-plugin/pom.xml @@ -29,7 +29,7 @@ under the License. maven-plugin - 3.2.1 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/extension/pom.xml b/its/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/extension/pom.xml index ce16209d0e..0d43230d51 100644 --- a/its/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/extension/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/extension/pom.xml @@ -28,7 +28,7 @@ under the License. 0.1 - 3.2.1 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/plugin/pom.xml index 687429d529..58bbf3980c 100644 --- a/its/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/plugin/pom.xml @@ -29,7 +29,7 @@ under the License. maven-plugin - 3.2.1 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/new-plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/new-plugin/pom.xml index 6714047549..f3c33fc9e6 100644 --- a/its/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/new-plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/new-plugin/pom.xml @@ -9,8 +9,8 @@ UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 3.1.0 @@ -44,7 +44,7 @@ org.apache.maven.plugins maven-resources-plugin - 3.2.0 + 3.3.0 diff --git a/its/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/old-plugin-with-relocation/pom.xml b/its/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/old-plugin-with-relocation/pom.xml index f89adfbb33..ab97b543b9 100644 --- a/its/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/old-plugin-with-relocation/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/old-plugin-with-relocation/pom.xml @@ -9,8 +9,8 @@ UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 3.1.0 @@ -51,7 +51,7 @@ org.apache.maven.plugins maven-resources-plugin - 3.2.0 + 3.3.0 diff --git a/its/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/project/pom.xml b/its/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/project/pom.xml index 8b17bd200d..675ee0bf77 100644 --- a/its/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/project/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/project/pom.xml @@ -9,8 +9,8 @@ UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/its/core-it-suite/src/test/resources/mng-5572-reactor-plugin-extensions/plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-5572-reactor-plugin-extensions/plugin/pom.xml index 226db24632..6c12de76a2 100644 --- a/its/core-it-suite/src/test/resources/mng-5572-reactor-plugin-extensions/plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5572-reactor-plugin-extensions/plugin/pom.xml @@ -52,7 +52,7 @@ org.apache.maven.plugins maven-jar-plugin - 2.2 + 3.3.0 diff --git a/its/core-it-suite/src/test/resources/mng-5576-cd-friendly-versions/pom.xml b/its/core-it-suite/src/test/resources/mng-5576-cd-friendly-versions/pom.xml index 42c3160a14..d500f10e52 100644 --- a/its/core-it-suite/src/test/resources/mng-5576-cd-friendly-versions/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5576-cd-friendly-versions/pom.xml @@ -39,28 +39,28 @@ org.apache.maven.plugins maven-clean-plugin - 3.1.0 + 3.2.0 org.apache.maven.plugins maven-site-plugin - 3.7.1 + 3.9.1 org.apache.maven.plugins maven-resources-plugin - 3.1.0 + 3.3.0 org.apache.maven.plugins maven-compiler-plugin - 3.7.0 + 3.10.1 org.apache.maven.plugins maven-surefire-plugin - 2.12 + 3.0.0-M7 org.apache.maven.plugins @@ -70,12 +70,12 @@ org.apache.maven.plugins maven-install-plugin - 2.5.2 + 3.0.1 org.apache.maven.plugins maven-deploy-plugin - 2.8.2 + 3.0.0 diff --git a/its/core-it-suite/src/test/resources/mng-5578-session-scope/extension-plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-5578-session-scope/extension-plugin/pom.xml index 2ee9228ac2..3101534f3a 100644 --- a/its/core-it-suite/src/test/resources/mng-5578-session-scope/extension-plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5578-session-scope/extension-plugin/pom.xml @@ -29,7 +29,7 @@ under the License. maven-plugin - 3.2.1 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-5578-session-scope/extension/pom.xml b/its/core-it-suite/src/test/resources/mng-5578-session-scope/extension/pom.xml index 21f1086711..f7b9ecccbf 100644 --- a/its/core-it-suite/src/test/resources/mng-5578-session-scope/extension/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5578-session-scope/extension/pom.xml @@ -28,7 +28,7 @@ under the License. 0.1 - 3.2.1 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-5578-session-scope/plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-5578-session-scope/plugin/pom.xml index 22dd8c4c92..a6c87316ab 100644 --- a/its/core-it-suite/src/test/resources/mng-5578-session-scope/plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5578-session-scope/plugin/pom.xml @@ -29,7 +29,7 @@ under the License. maven-plugin - 3.2.1 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-5581-lifecycle-mapping-delegate/extension/pom.xml b/its/core-it-suite/src/test/resources/mng-5581-lifecycle-mapping-delegate/extension/pom.xml index c8a4a6d25d..ae434b28f1 100644 --- a/its/core-it-suite/src/test/resources/mng-5581-lifecycle-mapping-delegate/extension/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5581-lifecycle-mapping-delegate/extension/pom.xml @@ -27,11 +27,15 @@ under the License. mng-5581-lifecycle-mapping-delegate-extension 0.1 + + 3.8.6 + + org.apache.maven maven-core - 3.2.5 + ${maven-version} provided diff --git a/its/core-it-suite/src/test/resources/mng-5591-workspace-reader/extension/pom.xml b/its/core-it-suite/src/test/resources/mng-5591-workspace-reader/extension/pom.xml index 27258497c5..71bfd39855 100644 --- a/its/core-it-suite/src/test/resources/mng-5591-workspace-reader/extension/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5591-workspace-reader/extension/pom.xml @@ -28,14 +28,14 @@ under the License. 0.1 - 3.2.1 + 3.8.6 org.apache.maven maven-core - ${maven.version} + ${maven-version} provided diff --git a/its/core-it-suite/src/test/resources/mng-5639-import-scope-pom-resolution/pom.xml b/its/core-it-suite/src/test/resources/mng-5639-import-scope-pom-resolution/pom.xml index ce839f315b..1ee39c4ac9 100644 --- a/its/core-it-suite/src/test/resources/mng-5639-import-scope-pom-resolution/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5639-import-scope-pom-resolution/pom.xml @@ -44,7 +44,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 2.12.4 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-5640-lifecycleParticipant-afterSession/badplugin/pom.xml b/its/core-it-suite/src/test/resources/mng-5640-lifecycleParticipant-afterSession/badplugin/pom.xml index 7f1730e58f..67027353f0 100644 --- a/its/core-it-suite/src/test/resources/mng-5640-lifecycleParticipant-afterSession/badplugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5640-lifecycleParticipant-afterSession/badplugin/pom.xml @@ -29,7 +29,7 @@ under the License. maven-plugin - 3.2.1 + 3.8.6 @@ -52,7 +52,7 @@ under the License. org.apache.maven.plugins maven-plugin-plugin - 3.3 + 3.6.4 diff --git a/its/core-it-suite/src/test/resources/mng-5640-lifecycleParticipant-afterSession/extension/pom.xml b/its/core-it-suite/src/test/resources/mng-5640-lifecycleParticipant-afterSession/extension/pom.xml index 64825e2f70..322bb4b03a 100644 --- a/its/core-it-suite/src/test/resources/mng-5640-lifecycleParticipant-afterSession/extension/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5640-lifecycleParticipant-afterSession/extension/pom.xml @@ -28,7 +28,7 @@ under the License. 0.1 - 3.2.1 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/pom-template.xml b/its/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/pom-template.xml index 6ffaf766a0..39d9d1fb0e 100644 --- a/its/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/pom-template.xml +++ b/its/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/pom-template.xml @@ -65,7 +65,7 @@ under the License. org.apache.maven.plugins maven-resources-plugin - 2.6 + 3.3.0 org.apache.maven.plugins @@ -75,7 +75,7 @@ under the License. org.apache.maven.plugins maven-jar-plugin - 2.2 + 3.3.0 org.apache.maven.plugins @@ -85,7 +85,7 @@ under the License. org.apache.maven.plugins maven-install-plugin - 2.5.2 + 3.0.1 diff --git a/its/core-it-suite/src/test/resources/mng-5669-read-poms-once/pom.xml b/its/core-it-suite/src/test/resources/mng-5669-read-poms-once/pom.xml index 8b41e0b6a5..c764fc9011 100644 --- a/its/core-it-suite/src/test/resources/mng-5669-read-poms-once/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5669-read-poms-once/pom.xml @@ -39,7 +39,7 @@ under the License. org.apache.maven.plugins maven-resources-plugin - 3.2.0 + 3.3.0 org.apache.maven.plugins @@ -49,12 +49,12 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M5 + 3.0.0-M7 org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.3.0 diff --git a/its/core-it-suite/src/test/resources/mng-5742-build-extension-classloader/plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-5742-build-extension-classloader/plugin/pom.xml index c261daf0af..424c53e163 100644 --- a/its/core-it-suite/src/test/resources/mng-5742-build-extension-classloader/plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5742-build-extension-classloader/plugin/pom.xml @@ -29,7 +29,7 @@ under the License. maven-plugin - 3.2.1 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-5753-custom-mojo-execution-configurator/plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-5753-custom-mojo-execution-configurator/plugin/pom.xml index 691f090a03..b6c54748b0 100644 --- a/its/core-it-suite/src/test/resources/mng-5753-custom-mojo-execution-configurator/plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5753-custom-mojo-execution-configurator/plugin/pom.xml @@ -29,7 +29,7 @@ under the License. maven-plugin - 3.3.1 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-a/pom.xml b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-a/pom.xml index 8104eb18ff..cb7b7de646 100644 --- a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-a/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-a/pom.xml @@ -38,7 +38,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-b/pom.xml b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-b/pom.xml index b64336a958..4f6699d0c6 100644 --- a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-b/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-b/pom.xml @@ -38,7 +38,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-c/pom.xml b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-c/pom.xml index 84845954f5..02581e31c9 100644 --- a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-c/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-c/pom.xml @@ -46,7 +46,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-d/pom.xml b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-d/pom.xml index 3a501b6efd..b193dd7de2 100644 --- a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-d/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-d/pom.xml @@ -46,7 +46,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/pom.xml b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/pom.xml index 2d15253a86..831ad90c2e 100644 --- a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/pom.xml @@ -37,8 +37,8 @@ under the License. UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-a/pom.xml b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-a/pom.xml index 8104eb18ff..cb7b7de646 100644 --- a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-a/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-a/pom.xml @@ -38,7 +38,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-b/pom.xml b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-b/pom.xml index b64336a958..4f6699d0c6 100644 --- a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-b/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-b/pom.xml @@ -38,7 +38,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-c/pom.xml b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-c/pom.xml index 84845954f5..02581e31c9 100644 --- a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-c/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-c/pom.xml @@ -46,7 +46,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/pom.xml b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/pom.xml index 8df0d4ca51..ca797e0d25 100644 --- a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/pom.xml @@ -37,8 +37,8 @@ under the License. UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-a/pom.xml b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-a/pom.xml index 8f0f72118b..d92e689b37 100644 --- a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-a/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-a/pom.xml @@ -43,7 +43,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-b/pom.xml b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-b/pom.xml index 195303d8c7..344f0342b1 100644 --- a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-b/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-b/pom.xml @@ -43,7 +43,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/pom.xml b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/pom.xml index d7ffdaa4ce..45463c5b7c 100644 --- a/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/pom.xml @@ -37,8 +37,8 @@ under the License. UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo-src/maven-it-core-extensions-no-descriptor/pom.xml b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo-src/maven-it-core-extensions-no-descriptor/pom.xml index f4e9f5d6d5..e993782958 100644 --- a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo-src/maven-it-core-extensions-no-descriptor/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo-src/maven-it-core-extensions-no-descriptor/pom.xml @@ -40,7 +40,7 @@ under the License. org.apache.maven maven-core - 3.0.3 + 3.8.6 provided diff --git a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo-src/maven-it-core-extensions/pom.xml b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo-src/maven-it-core-extensions/pom.xml index c2da347a7e..ac31d75aa0 100644 --- a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo-src/maven-it-core-extensions/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo-src/maven-it-core-extensions/pom.xml @@ -40,7 +40,7 @@ under the License. org.apache.maven maven-core - 3.0.3 + 3.8.6 provided diff --git a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo-src/maven-it-plugin-core-extensions-client/pom.xml b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo-src/maven-it-plugin-core-extensions-client/pom.xml index 7b392ba2b2..9f34696b4d 100644 --- a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo-src/maven-it-plugin-core-extensions-client/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo-src/maven-it-plugin-core-extensions-client/pom.xml @@ -40,13 +40,13 @@ under the License. org.apache.maven maven-core - 3.0.3 + 3.8.6 provided org.apache.maven maven-plugin-api - 3.0.3 + 3.8.6 provided diff --git a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-core-extensions-no-descriptor/0.1/maven-it-core-extensions-no-descriptor-0.1.pom b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-core-extensions-no-descriptor/0.1/maven-it-core-extensions-no-descriptor-0.1.pom index f4e9f5d6d5..e993782958 100644 --- a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-core-extensions-no-descriptor/0.1/maven-it-core-extensions-no-descriptor-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-core-extensions-no-descriptor/0.1/maven-it-core-extensions-no-descriptor-0.1.pom @@ -40,7 +40,7 @@ under the License. org.apache.maven maven-core - 3.0.3 + 3.8.6 provided diff --git a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-core-extensions-no-descriptor/0.1/maven-it-core-extensions-no-descriptor-0.1.pom.sha1 b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-core-extensions-no-descriptor/0.1/maven-it-core-extensions-no-descriptor-0.1.pom.sha1 index 6cf46deac2..c120fcc320 100644 --- a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-core-extensions-no-descriptor/0.1/maven-it-core-extensions-no-descriptor-0.1.pom.sha1 +++ b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-core-extensions-no-descriptor/0.1/maven-it-core-extensions-no-descriptor-0.1.pom.sha1 @@ -1 +1 @@ -88a9ea10005b24ebe90b38cd30dffdc435b126e8 \ No newline at end of file +84ac1a33979dd8ef069df196cc2a5197b7c4fdb1 \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-core-extensions/0.1/maven-it-core-extensions-0.1.pom b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-core-extensions/0.1/maven-it-core-extensions-0.1.pom index c2da347a7e..ac31d75aa0 100644 --- a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-core-extensions/0.1/maven-it-core-extensions-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-core-extensions/0.1/maven-it-core-extensions-0.1.pom @@ -40,7 +40,7 @@ under the License. org.apache.maven maven-core - 3.0.3 + 3.8.6 provided diff --git a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-core-extensions/0.1/maven-it-core-extensions-0.1.pom.sha1 b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-core-extensions/0.1/maven-it-core-extensions-0.1.pom.sha1 index 05d7415c67..7c2a24cba3 100644 --- a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-core-extensions/0.1/maven-it-core-extensions-0.1.pom.sha1 +++ b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-core-extensions/0.1/maven-it-core-extensions-0.1.pom.sha1 @@ -1 +1 @@ -8585d6a605ef22f8ba8674c193e774fc71b38941 \ No newline at end of file +9681b78533948ce4b5fabdc697dfd4511e3ebd35 \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-plugin-core-extensions-client/0.1/maven-it-plugin-core-extensions-client-0.1.pom b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-plugin-core-extensions-client/0.1/maven-it-plugin-core-extensions-client-0.1.pom index 7b392ba2b2..9f34696b4d 100644 --- a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-plugin-core-extensions-client/0.1/maven-it-plugin-core-extensions-client-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-plugin-core-extensions-client/0.1/maven-it-plugin-core-extensions-client-0.1.pom @@ -40,13 +40,13 @@ under the License. org.apache.maven maven-core - 3.0.3 + 3.8.6 provided org.apache.maven maven-plugin-api - 3.0.3 + 3.8.6 provided diff --git a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-plugin-core-extensions-client/0.1/maven-it-plugin-core-extensions-client-0.1.pom.sha1 b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-plugin-core-extensions-client/0.1/maven-it-plugin-core-extensions-client-0.1.pom.sha1 index 68c9c7cad5..f441132e98 100644 --- a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-plugin-core-extensions-client/0.1/maven-it-plugin-core-extensions-client-0.1.pom.sha1 +++ b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/repo/org/apache/maven/its/it-core-extensions/maven-it-plugin-core-extensions-client/0.1/maven-it-plugin-core-extensions-client-0.1.pom.sha1 @@ -1 +1 @@ -520e6cd05914cf86eae16861af23d00a854262a3 \ No newline at end of file +a7dd3cd05b5c2c2059ac6674a8f90e9a0cb8afb7 \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/settings-template-mirror-auth.xml b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/settings-template-mirror-auth.xml index efaaab3acc..adacec1641 100644 --- a/its/core-it-suite/src/test/resources/mng-5771-core-extensions/settings-template-mirror-auth.xml +++ b/its/core-it-suite/src/test/resources/mng-5771-core-extensions/settings-template-mirror-auth.xml @@ -23,12 +23,18 @@ central http://central + + ignore + central http://central + + ignore + diff --git a/its/core-it-suite/src/test/resources/mng-5783-plugin-dependency-filtering/plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-5783-plugin-dependency-filtering/plugin/pom.xml index 2fc285c3f8..a205cc94ca 100644 --- a/its/core-it-suite/src/test/resources/mng-5783-plugin-dependency-filtering/plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5783-plugin-dependency-filtering/plugin/pom.xml @@ -29,7 +29,7 @@ under the License. maven-plugin - 3.2.5 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-5868/pom.xml b/its/core-it-suite/src/test/resources/mng-5868/pom.xml index 13bb490624..c10fb550e5 100644 --- a/its/core-it-suite/src/test/resources/mng-5868/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5868/pom.xml @@ -33,6 +33,11 @@ run + + org.apache.maven.plugins + maven-deploy-plugin + 3.0.0 + diff --git a/its/core-it-suite/src/test/resources/mng-5895-ci-friendly-usage-with-property/pom.xml b/its/core-it-suite/src/test/resources/mng-5895-ci-friendly-usage-with-property/pom.xml index e3d34da11f..8ab6242824 100644 --- a/its/core-it-suite/src/test/resources/mng-5895-ci-friendly-usage-with-property/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5895-ci-friendly-usage-with-property/pom.xml @@ -37,17 +37,17 @@ under the License. org.apache.maven.plugins maven-assembly-plugin - 3.1.0 + 3.4.0 org.apache.maven.plugins maven-jar-plugin - 2.2 + 3.3.0 org.apache.maven.plugins maven-compiler-plugin - 2.0.2 + 3.10.1 diff --git a/its/core-it-suite/src/test/resources/mng-5898/pom.xml b/its/core-it-suite/src/test/resources/mng-5898/pom.xml index c1276815d7..05b07238d1 100644 --- a/its/core-it-suite/src/test/resources/mng-5898/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-5898/pom.xml @@ -18,37 +18,37 @@ org.apache.maven.plugins maven-compiler-plugin - 2.0.2 + 3.10.1 org.apache.maven.plugins maven-ejb-plugin - 2.5.1 + 3.2.1 org.apache.maven.plugins maven-jar-plugin - 2.2 + 3.3.0 org.apache.maven.plugins maven-resources-plugin - 2.7 + 3.3.0 org.apache.maven.plugins maven-ear-plugin - 2.8 + 3.2.0 org.apache.maven.plugins maven-war-plugin - 2.6 + 3.3.2 org.apache.maven.plugins maven-surefire-plugin - 2.12.4 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-6071/pom.xml b/its/core-it-suite/src/test/resources/mng-6071/pom.xml index 9704eee08d..3ac27f9672 100644 --- a/its/core-it-suite/src/test/resources/mng-6071/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6071/pom.xml @@ -12,8 +12,8 @@ UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 @@ -30,7 +30,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-6090-ci-friendly/module-3/pom.xml b/its/core-it-suite/src/test/resources/mng-6090-ci-friendly/module-3/pom.xml index f3f5ea119a..b2656c8da9 100644 --- a/its/core-it-suite/src/test/resources/mng-6090-ci-friendly/module-3/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6090-ci-friendly/module-3/pom.xml @@ -35,7 +35,7 @@ org.apache.maven.plugins maven-assembly-plugin - 3.1.0 + 3.4.0 assemblies diff --git a/its/core-it-suite/src/test/resources/mng-6090-ci-friendly/pom.xml b/its/core-it-suite/src/test/resources/mng-6090-ci-friendly/pom.xml index 17627bf099..bb4baf8060 100644 --- a/its/core-it-suite/src/test/resources/mng-6090-ci-friendly/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6090-ci-friendly/pom.xml @@ -43,17 +43,17 @@ under the License. org.apache.maven.plugins maven-assembly-plugin - 3.1.0 + 3.4.0 org.apache.maven.plugins maven-jar-plugin - 2.2 + 3.3.0 org.apache.maven.plugins maven-compiler-plugin - 2.0.2 + 3.10.1 org.codehaus.mojo diff --git a/its/core-it-suite/src/test/resources/mng-6118-submodule-invocation-full-reactor/pom.xml b/its/core-it-suite/src/test/resources/mng-6118-submodule-invocation-full-reactor/pom.xml index 9db0e99584..b894cbced8 100644 --- a/its/core-it-suite/src/test/resources/mng-6118-submodule-invocation-full-reactor/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6118-submodule-invocation-full-reactor/pom.xml @@ -37,8 +37,8 @@ under the License. UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 @@ -53,12 +53,12 @@ under the License. org.apache.maven.plugins maven-resources-plugin - 2.7 + 3.3.0 org.apache.maven.plugins maven-compiler-plugin - 2.0.2 + 3.10.1 diff --git a/its/core-it-suite/src/test/resources/mng-6127-plugin-execution-configuration-interference/plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-6127-plugin-execution-configuration-interference/plugin/pom.xml index b8db3ed4f0..ed34ab5f54 100644 --- a/its/core-it-suite/src/test/resources/mng-6127-plugin-execution-configuration-interference/plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6127-plugin-execution-configuration-interference/plugin/pom.xml @@ -29,7 +29,7 @@ under the License. maven-plugin - 3.3.1 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-6189-site-reportPlugins-warning/pom.xml b/its/core-it-suite/src/test/resources/mng-6189-site-reportPlugins-warning/pom.xml index 28d71d4457..ade3ce58c4 100644 --- a/its/core-it-suite/src/test/resources/mng-6189-site-reportPlugins-warning/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6189-site-reportPlugins-warning/pom.xml @@ -52,7 +52,7 @@ under the License. org.apache.maven.plugins maven-surefire-report-plugin - 2.5 + 3.0.0-M5 diff --git a/its/core-it-suite/src/test/resources/mng-6210-core-extensions-scopes/repo-src/maven-it-core-extensions/pom.xml b/its/core-it-suite/src/test/resources/mng-6210-core-extensions-scopes/repo-src/maven-it-core-extensions/pom.xml index bcd2a695b0..b3e276b46a 100644 --- a/its/core-it-suite/src/test/resources/mng-6210-core-extensions-scopes/repo-src/maven-it-core-extensions/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6210-core-extensions-scopes/repo-src/maven-it-core-extensions/pom.xml @@ -40,7 +40,7 @@ under the License. org.apache.maven maven-core - 3.3.1 + 3.8.6 provided diff --git a/its/core-it-suite/src/test/resources/mng-6210-core-extensions-scopes/repo-src/maven-it-plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-6210-core-extensions-scopes/repo-src/maven-it-plugin/pom.xml index 6e1adfde9a..3ddccbf779 100644 --- a/its/core-it-suite/src/test/resources/mng-6210-core-extensions-scopes/repo-src/maven-it-plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6210-core-extensions-scopes/repo-src/maven-it-plugin/pom.xml @@ -40,7 +40,7 @@ under the License. org.apache.maven maven-core - 3.3.1 + 3.8.6 provided diff --git a/its/core-it-suite/src/test/resources/mng-6210-core-extensions-scopes/repo/org/apache/maven/its/6210-core-extensions-scopes/maven-it-core-extensions/0.1/maven-it-core-extensions-0.1.pom b/its/core-it-suite/src/test/resources/mng-6210-core-extensions-scopes/repo/org/apache/maven/its/6210-core-extensions-scopes/maven-it-core-extensions/0.1/maven-it-core-extensions-0.1.pom index bcd2a695b0..b3e276b46a 100644 --- a/its/core-it-suite/src/test/resources/mng-6210-core-extensions-scopes/repo/org/apache/maven/its/6210-core-extensions-scopes/maven-it-core-extensions/0.1/maven-it-core-extensions-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-6210-core-extensions-scopes/repo/org/apache/maven/its/6210-core-extensions-scopes/maven-it-core-extensions/0.1/maven-it-core-extensions-0.1.pom @@ -40,7 +40,7 @@ under the License. org.apache.maven maven-core - 3.3.1 + 3.8.6 provided diff --git a/its/core-it-suite/src/test/resources/mng-6210-core-extensions-scopes/repo/org/apache/maven/its/6210-core-extensions-scopes/maven-it-plugin/0.1/maven-it-plugin-0.1.pom b/its/core-it-suite/src/test/resources/mng-6210-core-extensions-scopes/repo/org/apache/maven/its/6210-core-extensions-scopes/maven-it-plugin/0.1/maven-it-plugin-0.1.pom index 6e1adfde9a..0ec6cd6627 100644 --- a/its/core-it-suite/src/test/resources/mng-6210-core-extensions-scopes/repo/org/apache/maven/its/6210-core-extensions-scopes/maven-it-plugin/0.1/maven-it-plugin-0.1.pom +++ b/its/core-it-suite/src/test/resources/mng-6210-core-extensions-scopes/repo/org/apache/maven/its/6210-core-extensions-scopes/maven-it-plugin/0.1/maven-it-plugin-0.1.pom @@ -40,13 +40,13 @@ under the License. org.apache.maven maven-core - 3.3.1 + 3.8.6 provided org.apache.maven maven-plugin-api - 3.3.1 + 3.8.6 provided diff --git a/its/core-it-suite/src/test/resources/mng-6240-plugin-extension-aether-provider/plugin-extension/pom.xml b/its/core-it-suite/src/test/resources/mng-6240-plugin-extension-aether-provider/plugin-extension/pom.xml index 8afe9ac42d..89e08be801 100644 --- a/its/core-it-suite/src/test/resources/mng-6240-plugin-extension-aether-provider/plugin-extension/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6240-plugin-extension-aether-provider/plugin-extension/pom.xml @@ -28,7 +28,7 @@ under the License. maven-plugin UTF-8 - 3.3.9 + 3.8.6 @@ -39,7 +39,7 @@ under the License. org.apache.maven - maven-aether-provider + maven-resolver-provider ${maven-version} diff --git a/its/core-it-suite/src/test/resources/mng-6352-print-version/pom.xml b/its/core-it-suite/src/test/resources/mng-6352-print-version/pom.xml index 811d47cf32..102381a979 100644 --- a/its/core-it-suite/src/test/resources/mng-6352-print-version/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6352-print-version/pom.xml @@ -40,17 +40,17 @@ under the License. org.apache.maven.plugins maven-assembly-plugin - 3.1.0 + 3.4.0 org.apache.maven.plugins maven-jar-plugin - 2.2 + 3.3.0 org.apache.maven.plugins maven-compiler-plugin - 2.0.2 + 3.10.1 diff --git a/its/core-it-suite/src/test/resources/mng-6391-print-version-aggregator/pom.xml b/its/core-it-suite/src/test/resources/mng-6391-print-version-aggregator/pom.xml index 43a7aba301..66d7a95c99 100644 --- a/its/core-it-suite/src/test/resources/mng-6391-print-version-aggregator/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6391-print-version-aggregator/pom.xml @@ -40,17 +40,17 @@ under the License. org.apache.maven.plugins maven-assembly-plugin - 3.1.0 + 3.4.0 org.apache.maven.plugins maven-jar-plugin - 2.2 + 3.3.0 org.apache.maven.plugins maven-compiler-plugin - 2.0.2 + 3.10.1 diff --git a/its/core-it-suite/src/test/resources/mng-6391-print-version/pom.xml b/its/core-it-suite/src/test/resources/mng-6391-print-version/pom.xml index 811d47cf32..102381a979 100644 --- a/its/core-it-suite/src/test/resources/mng-6391-print-version/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6391-print-version/pom.xml @@ -40,17 +40,17 @@ under the License. org.apache.maven.plugins maven-assembly-plugin - 3.1.0 + 3.4.0 org.apache.maven.plugins maven-jar-plugin - 2.2 + 3.3.0 org.apache.maven.plugins maven-compiler-plugin - 2.0.2 + 3.10.1 diff --git a/its/core-it-suite/src/test/resources/mng-6506-package-annotation/plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-6506-package-annotation/plugin/pom.xml index 47533fc2e8..7c812a2e96 100644 --- a/its/core-it-suite/src/test/resources/mng-6506-package-annotation/plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6506-package-annotation/plugin/pom.xml @@ -27,21 +27,17 @@ under the License. 0.1 maven-plugin - - 3.6.0 - - org.apache.maven.plugin-tools maven-plugin-annotations - ${maven-version} + 3.3 provided org.apache.maven maven-plugin-api - ${maven-version} + 3.8.6 provided diff --git a/its/core-it-suite/src/test/resources/mng-6511-optional-project-selection/pom.xml b/its/core-it-suite/src/test/resources/mng-6511-optional-project-selection/pom.xml index 98c2253de4..ee5591bfc4 100644 --- a/its/core-it-suite/src/test/resources/mng-6511-optional-project-selection/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6511-optional-project-selection/pom.xml @@ -37,8 +37,8 @@ under the License. UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 @@ -52,12 +52,12 @@ under the License. org.apache.maven.plugins maven-resources-plugin - 2.7 + 3.3.0 org.apache.maven.plugins maven-compiler-plugin - 2.0.2 + 3.10.1 diff --git a/its/core-it-suite/src/test/resources/mng-6566-execute-annotation-should-not-re-execute-goals/plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-6566-execute-annotation-should-not-re-execute-goals/plugin/pom.xml index bdb977a557..cb0b7d152c 100644 --- a/its/core-it-suite/src/test/resources/mng-6566-execute-annotation-should-not-re-execute-goals/plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6566-execute-annotation-should-not-re-execute-goals/plugin/pom.xml @@ -30,8 +30,8 @@ under the License. 3.6.0 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/its/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-webapp.pom b/its/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-webapp.pom index c7977a6d39..1ecae6db79 100644 --- a/its/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-webapp.pom +++ b/its/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-webapp.pom @@ -43,7 +43,7 @@ under the License. org.apache.maven.plugins maven-war-plugin - 2.6 + 3.3.2 diff --git a/its/core-it-suite/src/test/resources/mng-6656-buildconsumer/simple-parent/simple-webapp/pom.xml b/its/core-it-suite/src/test/resources/mng-6656-buildconsumer/simple-parent/simple-webapp/pom.xml index 776d54d07b..a1ac951337 100644 --- a/its/core-it-suite/src/test/resources/mng-6656-buildconsumer/simple-parent/simple-webapp/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6656-buildconsumer/simple-parent/simple-webapp/pom.xml @@ -43,7 +43,7 @@ under the License. org.apache.maven.plugins maven-war-plugin - 2.6 + 3.3.2 diff --git a/its/core-it-suite/src/test/resources/mng-6720-fail-fast/module-1/pom.xml b/its/core-it-suite/src/test/resources/mng-6720-fail-fast/module-1/pom.xml index ed05aa38e0..9faeb73068 100644 --- a/its/core-it-suite/src/test/resources/mng-6720-fail-fast/module-1/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6720-fail-fast/module-1/pom.xml @@ -37,20 +37,13 @@ - - - - org.apache.maven.plugins - maven-resources-plugin - 3.3.0 - - - org.apache.maven.plugins - maven-surefire-plugin - 2.22.0 - - - + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M7 + + diff --git a/its/core-it-suite/src/test/resources/mng-6720-fail-fast/module-2/pom.xml b/its/core-it-suite/src/test/resources/mng-6720-fail-fast/module-2/pom.xml index 53dbc6dd6f..483ac75143 100644 --- a/its/core-it-suite/src/test/resources/mng-6720-fail-fast/module-2/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6720-fail-fast/module-2/pom.xml @@ -37,20 +37,13 @@ - - - - org.apache.maven.plugins - maven-resources-plugin - 3.3.0 - - - org.apache.maven.plugins - maven-surefire-plugin - 2.22.0 - - - + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M7 + + diff --git a/its/core-it-suite/src/test/resources/mng-6720-fail-fast/module-3/pom.xml b/its/core-it-suite/src/test/resources/mng-6720-fail-fast/module-3/pom.xml index 9636190ec2..6eb9d7893a 100644 --- a/its/core-it-suite/src/test/resources/mng-6720-fail-fast/module-3/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6720-fail-fast/module-3/pom.xml @@ -42,20 +42,13 @@ - - - - org.apache.maven.plugins - maven-resources-plugin - 3.3.0 - - - org.apache.maven.plugins - maven-surefire-plugin - 2.22.0 - - - + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M7 + + diff --git a/its/core-it-suite/src/test/resources/mng-6720-fail-fast/pom.xml b/its/core-it-suite/src/test/resources/mng-6720-fail-fast/pom.xml index 2ca2743546..6f71a650da 100644 --- a/its/core-it-suite/src/test/resources/mng-6720-fail-fast/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6720-fail-fast/pom.xml @@ -35,4 +35,15 @@ under the License. module-3 + + + + + org.apache.maven.plugins + maven-resources-plugin + 3.3.0 + + + + diff --git a/its/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml b/its/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml index cdab5b637f..ff1562dc52 100644 --- a/its/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml @@ -42,7 +42,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-b/pom.xml b/its/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-b/pom.xml index 428eaeb3a6..69cb4b20a3 100644 --- a/its/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-b/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-b/pom.xml @@ -42,7 +42,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M7 diff --git a/its/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/pom.xml b/its/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/pom.xml index e3bb3b8345..fcbb78d4f0 100644 --- a/its/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/pom.xml @@ -37,8 +37,8 @@ under the License. UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 yyyyMMddHHmmss ${maven.build.timestamp} diff --git a/its/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-webapp.pom b/its/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-webapp.pom index edde31ab72..a422ba06af 100644 --- a/its/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-webapp.pom +++ b/its/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-webapp.pom @@ -43,7 +43,7 @@ under the License. org.apache.maven.plugins maven-war-plugin - 2.6 + 3.3.2 diff --git a/its/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/simple-webapp/pom.xml b/its/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/simple-webapp/pom.xml index b1068b7ce2..cc92c4b207 100644 --- a/its/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/simple-webapp/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/simple-webapp/pom.xml @@ -43,7 +43,7 @@ under the License. org.apache.maven.plugins maven-war-plugin - 2.6 + 3.3.2 diff --git a/its/core-it-suite/src/test/resources/mng-6972-allow-access-to-graph-package/build-plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-6972-allow-access-to-graph-package/build-plugin/pom.xml index 72191b77f1..501e6c7986 100644 --- a/its/core-it-suite/src/test/resources/mng-6972-allow-access-to-graph-package/build-plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6972-allow-access-to-graph-package/build-plugin/pom.xml @@ -28,11 +28,11 @@ under the License. UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 1.5.5 - 3.3.1 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-6981-pl-should-include-children/pom.xml b/its/core-it-suite/src/test/resources/mng-6981-pl-should-include-children/pom.xml index 09e643fad4..0d23bafd08 100644 --- a/its/core-it-suite/src/test/resources/mng-6981-pl-should-include-children/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-6981-pl-should-include-children/pom.xml @@ -37,8 +37,8 @@ under the License. UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/its/core-it-suite/src/test/resources/mng-7045/pom.xml b/its/core-it-suite/src/test/resources/mng-7045/pom.xml index 7a5b7c75f2..1b80c69c77 100644 --- a/its/core-it-suite/src/test/resources/mng-7045/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7045/pom.xml @@ -23,7 +23,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.10.1 1.7 1.7 diff --git a/its/core-it-suite/src/test/resources/mng-7128-block-external-http-reactor/pom.xml b/its/core-it-suite/src/test/resources/mng-7128-block-external-http-reactor/pom.xml index f69a336757..b0eb756dcd 100644 --- a/its/core-it-suite/src/test/resources/mng-7128-block-external-http-reactor/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7128-block-external-http-reactor/pom.xml @@ -23,7 +23,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.10.1 1.7 1.7 diff --git a/its/core-it-suite/src/test/resources/mng-7160-extensionclassloader/extension/pom.xml b/its/core-it-suite/src/test/resources/mng-7160-extensionclassloader/extension/pom.xml index 41ebd3cd5a..555a103236 100644 --- a/its/core-it-suite/src/test/resources/mng-7160-extensionclassloader/extension/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7160-extensionclassloader/extension/pom.xml @@ -32,7 +32,7 @@ under the License. org.apache.maven maven-core - 3.3.1 + 3.8.6 provided diff --git a/its/core-it-suite/src/test/resources/mng-7310-lifecycle-activated-in-specified-module/project/pom.xml b/its/core-it-suite/src/test/resources/mng-7310-lifecycle-activated-in-specified-module/project/pom.xml index 5e8d49b2d7..c51129147f 100644 --- a/its/core-it-suite/src/test/resources/mng-7310-lifecycle-activated-in-specified-module/project/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7310-lifecycle-activated-in-specified-module/project/pom.xml @@ -39,4 +39,25 @@ under the License. other-module + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.0 + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + org.apache.maven.plugins + maven-compiler-plugin + 3.10.1 + + + + diff --git a/its/core-it-suite/src/test/resources/mng-7335-missing-jar-in-parallel-build/pom.xml b/its/core-it-suite/src/test/resources/mng-7335-missing-jar-in-parallel-build/pom.xml index 3ff0e85e89..3ca74c590e 100644 --- a/its/core-it-suite/src/test/resources/mng-7335-missing-jar-in-parallel-build/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7335-missing-jar-in-parallel-build/pom.xml @@ -10,8 +10,8 @@ UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 @@ -57,18 +57,6 @@ pom - - - - - org.apache.maven.plugins - maven-resources-plugin - 3.2.0 - - - - - commons-lang @@ -77,4 +65,21 @@ + + + + + org.apache.maven.plugins + maven-resources-plugin + 3.3.0 + + + org.apache.maven.plugins + maven-clean-plugin + 3.2.0 + + + + + diff --git a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-dep-dep/pom.xml b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-dep-dep/pom.xml index a1107d554d..e6c90c75f0 100644 --- a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-dep-dep/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-dep-dep/pom.xml @@ -9,9 +9,9 @@ UTF-8 - 1.7 - 1.7 - 3.1.1 + 1.8 + 1.8 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-dep/pom.xml b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-dep/pom.xml index 871fc3d7da..c96ed25314 100644 --- a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-dep/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-dep/pom.xml @@ -9,9 +9,9 @@ UTF-8 - 1.7 - 1.7 - 3.1.1 + 1.8 + 1.8 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin-dep/pom.xml b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin-dep/pom.xml index b58258b839..ff6c59054d 100644 --- a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin-dep/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin-dep/pom.xml @@ -9,9 +9,9 @@ UTF-8 - 1.7 - 1.7 - 3.1.1 + 1.8 + 1.8 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin/pom.xml index cc5abe9200..b9971e7688 100644 --- a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin/pom.xml @@ -9,9 +9,9 @@ UTF-8 - 1.7 - 1.7 - 3.1.1 + 1.8 + 1.8 + 3.8.6 @@ -45,7 +45,7 @@ org.apache.maven.plugins maven-plugin-plugin - 3.3 + 3.6.4 diff --git a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-dep-dep/pom.xml b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-dep-dep/pom.xml index a8b9d35e1c..02c6096aff 100644 --- a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-dep-dep/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-dep-dep/pom.xml @@ -9,9 +9,9 @@ UTF-8 - 1.7 - 1.7 - 3.1.1 + 1.8 + 1.8 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-dep/pom.xml b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-dep/pom.xml index c47fa1ae5e..766b9fd7c6 100644 --- a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-dep/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-dep/pom.xml @@ -9,9 +9,9 @@ UTF-8 - 1.7 - 1.7 - 3.1.1 + 1.8 + 1.8 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin-dep/pom.xml b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin-dep/pom.xml index 4362075f4e..9ab2f5efa9 100644 --- a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin-dep/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin-dep/pom.xml @@ -9,9 +9,9 @@ UTF-8 - 1.7 - 1.7 - 3.1.1 + 1.8 + 1.8 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin/pom.xml index 33cca508a2..3bc7ae4a0e 100644 --- a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin/pom.xml @@ -9,9 +9,9 @@ UTF-8 - 1.7 - 1.7 - 3.1.1 + 1.8 + 1.8 + 3.8.6 @@ -48,7 +48,7 @@ org.apache.maven.plugins maven-plugin-plugin - 3.3 + 3.6.4 diff --git a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/pom.xml b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/pom.xml index eb13a5bdc9..7b9bd61df7 100644 --- a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/pom.xml @@ -9,9 +9,9 @@ UTF-8 - 1.7 - 1.7 - 3.1.1 + 1.8 + 1.8 + 3.8.6 diff --git a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/project/pom.xml b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/project/pom.xml index fe9b0e14e7..3a56cfb662 100644 --- a/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/project/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7349-relocation-warning/project/pom.xml @@ -9,8 +9,8 @@ UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/its/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd-no-dotmvn/pom.xml b/its/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd-no-dotmvn/pom.xml index 1e9a1545fd..e8b6829256 100644 --- a/its/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd-no-dotmvn/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd-no-dotmvn/pom.xml @@ -36,8 +36,8 @@ under the License. UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/its/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd/pom.xml b/its/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd/pom.xml index ea34c31885..0d4407acd6 100644 --- a/its/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd/pom.xml @@ -36,8 +36,8 @@ under the License. UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/its/core-it-suite/src/test/resources/mng-7474-session-scope/plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-7474-session-scope/plugin/pom.xml index f37a47ab6f..c3846c7c3f 100644 --- a/its/core-it-suite/src/test/resources/mng-7474-session-scope/plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7474-session-scope/plugin/pom.xml @@ -7,8 +7,8 @@ maven-plugin - 1.7 - 1.7 + 1.8 + 1.8 3.2.5 diff --git a/its/core-it-suite/src/test/resources/mng-7487-deadlock/consumer/pom.xml b/its/core-it-suite/src/test/resources/mng-7487-deadlock/consumer/pom.xml index 016676166f..9bb14e39c6 100644 --- a/its/core-it-suite/src/test/resources/mng-7487-deadlock/consumer/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7487-deadlock/consumer/pom.xml @@ -52,8 +52,8 @@ under the License. UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/its/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/pom.xml index 5789a3eefe..cc59e64070 100644 --- a/its/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/pom.xml @@ -29,9 +29,9 @@ under the License. maven-plugin - 1.7 - 1.7 - 3.1.1 + 1.8 + 1.8 + 3.8.6 @@ -60,7 +60,7 @@ under the License. org.apache.maven.plugins maven-plugin-plugin - 3.3 + 3.6.4 diff --git a/its/core-it-suite/src/test/resources/mng-7606/pom.xml b/its/core-it-suite/src/test/resources/mng-7606/pom.xml index 9491e23444..502bd53702 100644 --- a/its/core-it-suite/src/test/resources/mng-7606/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7606/pom.xml @@ -34,7 +34,7 @@ org.apache.maven maven-core - 3.3.1 + 3.8.6 pom import diff --git a/its/core-it-support/core-it-javaagent/pom.xml b/its/core-it-support/core-it-javaagent/pom.xml index 3f852f6aed..58802bdea8 100644 --- a/its/core-it-support/core-it-javaagent/pom.xml +++ b/its/core-it-support/core-it-javaagent/pom.xml @@ -27,9 +27,8 @@ under the License. core-it-support 2.1-SNAPSHOT - mng-coreit - javaagent - 1.0-SNAPSHOT + core-it-javaagent + 2.1-SNAPSHOT @@ -48,6 +47,7 @@ under the License. org.apache.maven.plugins maven-shade-plugin + 3.4.1 diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/pom.xml index b9d3d9b0db..e8e0913c79 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/pom.xml @@ -45,7 +45,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/CheckMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/CheckMojo.java index 6b6907f7aa..dbc0e2c9f0 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/CheckMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/CheckMojo.java @@ -22,6 +22,10 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.FileOutputStream; @@ -35,42 +39,35 @@ import java.util.Properties; /** * Checks the general retrieval of components from active component collections. * - * @goal check - * @phase validate - * * @author Benjamin Bentmann */ +@Mojo( name = "check", defaultPhase = LifecyclePhase.VALIDATE ) public class CheckMojo extends AbstractMojo { /** * Project base directory used for manual path alignment. - * - * @parameter default-value="${basedir}" - * @readonly */ + @Parameter( defaultValue = "${basedir}", readonly = true ) private File basedir; /** * The available components, as a map. - * - * @component role="org.apache.maven.plugin.coreit.Component" */ - private Map componentMap; + @Component + private Map componentMap; /** * The available components, as a list. - * - * @component role="org.apache.maven.plugin.coreit.Component" */ - private List componentList; + @Component + private List componentList; /** * The path to the properties file to create. - * - * @parameter property="collections.outputFile" */ + @Parameter( property = "clsldr.pluginClassLoaderOutput" ) private File outputFile; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/CheckThreadSafetyMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/CheckThreadSafetyMojo.java index f9851c42bf..29122de137 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/CheckThreadSafetyMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/CheckThreadSafetyMojo.java @@ -21,6 +21,10 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.FileOutputStream; @@ -35,40 +39,34 @@ import java.util.Vector; * Checks the thread-safe retrieval of components from active component collections. * * @author Benjamin Bentmann - * @goal check-thread-safety - * @phase validate - */ + */ +@Mojo( name = "check-thread-safety", defaultPhase = LifecyclePhase.VALIDATE ) public class CheckThreadSafetyMojo extends AbstractMojo { /** * Project base directory used for manual path alignment. - * - * @parameter default-value="${basedir}" - * @readonly */ + @Parameter( defaultValue = "${basedir}", readonly = true ) private File basedir; /** * The available components, as a map. - * - * @component role="org.apache.maven.plugin.coreit.Component" */ - private Map componentMap; + @Component + private Map componentMap; /** * The available components, as a list. - * - * @component role="org.apache.maven.plugin.coreit.Component" */ - private List componentList; + @Component + private List componentList; /** * The path to the properties file to create. - * - * @parameter property="collections.outputFile" */ + @Parameter( property = "collections.outputFile" ) private File outputFile; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/DefaultComponent.java b/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/DefaultTestComponent.java similarity index 93% rename from its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/DefaultComponent.java rename to its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/DefaultTestComponent.java index e218dc4f84..bd10925a26 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/DefaultComponent.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/DefaultTestComponent.java @@ -24,8 +24,8 @@ package org.apache.maven.plugin.coreit; * * @author Benjamin Bentmann */ -public class DefaultComponent - implements Component +public class DefaultTestComponent + implements TestComponent { } diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/DumpRepoLayoutsMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/DumpRepoLayoutsMojo.java index 6750a821d8..f27d6c3b47 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/DumpRepoLayoutsMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/DumpRepoLayoutsMojo.java @@ -19,9 +19,14 @@ package org.apache.maven.plugin.coreit; * under the License. */ +import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.FileOutputStream; @@ -35,40 +40,34 @@ import java.util.Properties; * Dumps the role hints of the available repository layouts to a properties file. * * @author Benjamin Bentmann - * @goal dump-repo-layouts - * @phase validate - */ + */ +@Mojo( name = "dump-repo-layouts", defaultPhase = LifecyclePhase.VALIDATE ) public class DumpRepoLayoutsMojo extends AbstractMojo { /** * Project base directory used for manual path alignment. - * - * @parameter default-value="${basedir}" - * @readonly */ + @Parameter( defaultValue = "${basedir}", readonly = true ) private File basedir; /** * The available repository layouts, as a map. - * - * @component role="org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout" */ - private Map repositoryLayouts; + @Component + private Map repositoryLayouts; /** * The available repository layouts, as a list. - * - * @component role="org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout" */ - private List repoLayouts; + @Component + private List repoLayouts; /** * The path to the properties file used to dump the repository layouts. - * - * @parameter property="collections.layoutsFile" */ + @Parameter( property = "collections.layoutsFile" ) private File layoutsFile; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/Component.java b/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/TestComponent.java similarity index 96% rename from its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/Component.java rename to its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/TestComponent.java index 70f69048b9..6adc9a4c2c 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/Component.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/TestComponent.java @@ -24,7 +24,7 @@ package org.apache.maven.plugin.coreit; * * @author Benjamin Bentmann */ -public interface Component +public interface TestComponent { } diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/resources/META-INF/plexus/components.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/resources/META-INF/plexus/components.xml index d50cb0263b..ac21bb4743 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/resources/META-INF/plexus/components.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/resources/META-INF/plexus/components.xml @@ -22,15 +22,15 @@ under the License. - org.apache.maven.plugin.coreit.Component + org.apache.maven.plugin.coreit.TestComponent stateless - org.apache.maven.plugin.coreit.DefaultComponent + org.apache.maven.plugin.coreit.DefaultTestComponent singleton - org.apache.maven.plugin.coreit.Component + org.apache.maven.plugin.coreit.TestComponent stateful - org.apache.maven.plugin.coreit.DefaultComponent + org.apache.maven.plugin.coreit.DefaultTestComponent per-lookup diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-all/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-all/pom.xml index d567b263b4..a22965fe85 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-all/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-all/pom.xml @@ -42,7 +42,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-all/src/main/java/org/apache/maven/plugin/coreit/AggregatorDependenciesMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-all/src/main/java/org/apache/maven/plugin/coreit/AggregatorDependenciesMojo.java index 20747be4fb..c26b526326 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-all/src/main/java/org/apache/maven/plugin/coreit/AggregatorDependenciesMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-all/src/main/java/org/apache/maven/plugin/coreit/AggregatorDependenciesMojo.java @@ -24,22 +24,23 @@ import java.io.IOException; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; /** - * @requiresDependencyResolution test - * @aggregator - * @goal aggregator-dependencies - * @phase validate */ +@Mojo( name = "aggregator-dependencies", defaultPhase = LifecyclePhase.VALIDATE, + requiresDependencyResolution = ResolutionScope.TEST, aggregator = true ) public class AggregatorDependenciesMojo extends AbstractMojo { /** * The path to the touch file, relative to the project's base directory. - * - * @parameter property="aggregator.touchFile" default-value="${project.build.directory}/touch.txt" */ + @Parameter( property = "aggregator.touchFile", defaultValue = "${project.build.directory}/touch.txt" ) private File touchFile; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-ant-based/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-ant-based/pom.xml index aa1aa828ea..0fef1178af 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-ant-based/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-ant-based/pom.xml @@ -105,6 +105,9 @@ under the License. ${project.build.directory} + + ant + diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-ant-based/src/main/resources/META-INF/maven/plugin.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-ant-based/src/main/resources/META-INF/maven/plugin.xml index 26b12aa49e..5f6725e324 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-ant-based/src/main/resources/META-INF/maven/plugin.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-ant-based/src/main/resources/META-INF/maven/plugin.xml @@ -66,8 +66,7 @@ org.apache.maven maven-plugin-api - jar - 2.0.6 + 3.8.6 org.codehaus.plexus diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/pom.xml index ad4d1b2684..f6882665ca 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/pom.xml @@ -47,32 +47,31 @@ under the License. org.apache.maven maven-plugin-api - 2.0 provided - org.apache.maven - maven-project - 2.0 - provided - - - org.apache.maven - maven-model - 2.0 + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven maven-artifact - 2.0 + provided + + + org.apache.maven + maven-compat + provided + + + org.apache.maven + maven-model provided org.apache.maven maven-repository-metadata - 2.0 - provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AbstractRepoMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AbstractRepoMojo.java index a04fa38a5a..12d26bb300 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AbstractRepoMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AbstractRepoMojo.java @@ -22,6 +22,7 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.util.Collection; @@ -38,47 +39,32 @@ public abstract class AbstractRepoMojo /** * The project's main artifact. - * - * @parameter default-value="${project.artifact}" - * @readonly - * @required */ + @Parameter( defaultValue = "${project.artifact}", required = true, readonly = true ) protected Artifact mainArtifact; /** * The project's attached artifact. - * - * @parameter default-value="${project.attachedArtifacts}" - * @readonly - * @required */ + @Parameter( defaultValue = "${project.attachedArtifacts}", required = true, readonly = true ) protected Collection attachedArtifacts; /** * The packaging of the project. - * - * @parameter default-value="${project.packaging}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project.packaging}", required = true, readonly = true ) protected String packaging; /** * The POM file of the project. - * - * @parameter default-value="${project.file}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project.file}", required = true, readonly = true ) protected File pomFile; /** * The local repository. - * - * @parameter default-value="${localRepository}" - * @readonly - * @required */ + @Parameter( defaultValue = "${localRepository}", required = true, readonly = true ) protected ArtifactRepository localRepository; protected boolean isPomArtifact() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AttachMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AttachMojo.java index 6e18632bf9..3a27f8a3c3 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AttachMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AttachMojo.java @@ -22,6 +22,10 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectHelper; @@ -30,53 +34,45 @@ import java.io.File; /** * Attaches a secondary artifact to the current project. This mimics source/javadoc attachments or other assemblies. * - * @goal attach - * @phase package - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "attach", defaultPhase = LifecyclePhase.PACKAGE ) public class AttachMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @readonly - * @required */ + @Parameter( defaultValue = "${project}", readonly = true, required = true ) private MavenProject project; /** * The Maven project helper. * - * @component */ + @Component private MavenProjectHelper helper; /** * The path to the file to attach, relative to the project base directory. The plugin will not validate this path. - * - * @parameter property="artifact.attachedFile" - * @required */ + @Parameter( property = "artifact.attachedFile", required = true ) private String attachedFile; /** * The type of the artifact to attach. - * - * @parameter property="artifact.artifactType" */ + @Parameter( property = "artifact.artifactType" ) private String artifactType; /** * The classifier for the attached artifact. If unspecified, the default classifier for the specified artifact type * is used. - * - * @parameter property="artifact.artifactClassifier" */ + @Parameter( property = "artifact.artifactClassifier" ) private String artifactClassifier; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AttachPomMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AttachPomMojo.java index 58b92b5848..c16aa21e43 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AttachPomMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AttachPomMojo.java @@ -23,6 +23,9 @@ import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import org.apache.maven.project.artifact.ProjectArtifactMetadata; @@ -31,32 +34,26 @@ import java.io.File; /** * Attaches a POM to the main artifact. * - * @goal attach-pom - * @phase package - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "attach-pom", defaultPhase = LifecyclePhase.PACKAGE ) public class AttachPomMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @readonly - * @required */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the POM file to attach to the main artifact, relative to the project base directory. The plugin will * not validate this path. - * - * @parameter property="artifact.pomFile" default-value="${project.file.path}" - * @required */ + @Parameter( property = "artifact.pomFile", defaultValue = "${project.file.path}", required = true ) private String pomFile; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/CollectMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/CollectMojo.java index 54d3315eaa..4570c6d5f7 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/CollectMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/CollectMojo.java @@ -28,6 +28,9 @@ import org.apache.maven.model.Dependency; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.util.Collections; import java.util.LinkedHashSet; @@ -39,56 +42,50 @@ import java.util.Set; * * @author Benjamin Bentmann * - * @goal collect - */ + */ +@Mojo( name = "collect" ) public class CollectMojo extends AbstractMojo { /** * The local repository. - * - * @parameter default-value="${localRepository}" - * @readonly - * @required */ + @Parameter( defaultValue = "${localRepository}", readonly = true, required = true ) private ArtifactRepository localRepository; /** * The remote repositories of the current Maven project. - * - * @parameter default-value="${project.remoteArtifactRepositories}" - * @readonly - * @required */ + @Parameter( defaultValue = "${project.remoteArtifactRepositories}", readonly = true, required = true ) private List remoteRepositories; /** * The artifact collector. * - * @component */ + @Component private ArtifactCollector collector; /** * The artifact factory. * - * @component */ + @Component private ArtifactFactory factory; /** * The metadata source. * - * @component */ + @Component private ArtifactMetadataSource metadataSource; /** * The dependencies to resolve. * - * @parameter */ + @Parameter private Dependency[] dependencies; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/CustomRepositoryLayout.java b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/CustomRepositoryLayout.java index a5197413ad..b7db2475b0 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/CustomRepositoryLayout.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/CustomRepositoryLayout.java @@ -31,6 +31,11 @@ import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; public class CustomRepositoryLayout implements ArtifactRepositoryLayout { + @Override + public String getId() + { + return "id"; + } public String pathOf( Artifact artifact ) { diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/DeployFileMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/DeployFileMojo.java index df1d064608..075e7f9497 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/DeployFileMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/DeployFileMojo.java @@ -28,99 +28,90 @@ import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; /** * Deploys a user-supplied file to some repository. This mimics part of the Maven Deploy Plugin. * - * @goal deploy-file - * @requiresProject false - * * @author Benjamin Bentmann * */ +@Mojo( name = "deploy-file", requiresProject = false ) public class DeployFileMojo extends AbstractMojo { /** * The file of the artifact to deploy. - * - * @parameter property="file" */ + @Parameter( property = "file" ) private File file; /** * The group id of the artifact. - * - * @parameter property="groupId" */ + @Parameter( property = "groupId" ) private String groupId; /** * The artifact id of the artifact. - * - * @parameter property="artifactId" */ + @Parameter( property = "artifactId" ) private String artifactId; /** * The version of the artifact. - * - * @parameter property="version" */ + @Parameter( property = "version" ) private String version; /** * The URL of the repository to deploy to. - * - * @parameter property="repositoryUrl" */ + @Parameter( property = "repositoryUrl" ) private String repositoryUrl; /** * The ID of the repository to deploy to. - * - * @parameter property="repositoryId" */ + @Parameter( property = "repositoryId" ) private String repositoryId; /** * The repository factory. * - * @component */ + @Component private ArtifactRepositoryFactory repositoryFactory; /** * The repository layout. - * - * @component roleHint="default" */ + @Component( hint = "default" ) private ArtifactRepositoryLayout repositoryLayout; /** * The artifact factory. * - * @component */ + @Component private ArtifactFactory artifactFactory; /** * The artifact deployer. * - * @component */ + @Component private ArtifactDeployer deployer; /** * The local repository. - * - * @parameter default-value="${localRepository}" - * @readonly - * @required */ + @Parameter( defaultValue = "${localRepository}", readonly = true, required = true ) private ArtifactRepository localRepository; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/DeployMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/DeployMojo.java index 44b24a40bf..43c50b21f6 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/DeployMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/DeployMojo.java @@ -23,33 +23,33 @@ import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.deployer.ArtifactDeployer; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** * Deploys the project artifacts to the distribution repository. This is the essence of the Maven Deploy Plugin. * * @author Benjamin Bentmann * - * @goal deploy - * @phase deploy - */ + */ +@Mojo( name = "deploy", defaultPhase = LifecyclePhase.DEPLOY ) public class DeployMojo extends AbstractRepoMojo { /** * The distribution repository. - * - * @parameter default-value="${project.distributionManagementArtifactRepository}" - * @readonly - * @required */ + @Parameter( defaultValue = "${project.distributionManagementArtifactRepository}", readonly = true, required = true ) private ArtifactRepository deploymentRepository; /** * The artifact deployer. * - * @component */ + @Component private ArtifactDeployer deployer; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/InstallArtifactsMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/InstallArtifactsMojo.java index 1f079105b5..117d480315 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/InstallArtifactsMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/InstallArtifactsMojo.java @@ -30,50 +30,50 @@ import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; import java.io.File; import java.util.List; /** * @author Olivier Lamy - * @goal install-artifacts - * @requiresDependencyResolution runtime - * @phase package */ +@Mojo( name = "install-artifacts", requiresDependencyResolution = ResolutionScope.RUNTIME, + defaultPhase = LifecyclePhase.PACKAGE ) public class InstallArtifactsMojo extends AbstractMojo { /** - * @readonly - * @parameter default-value="${project.runtimeArtifacts}" */ - private List artifacts; + @Parameter( defaultValue = "${project.runtimeArtifacts}", readonly = true ) + private List artifacts; /** - * @component */ + @Component private ArtifactInstaller artifactInstaller; /** - * @component */ + @Component private ArtifactRepositoryFactory artifactRepositoryFactory; /** * The directory that will be used to assemble the artifacts in * and place the bin scripts. - * - * @required - * @parameter property="assembleDirectory" default-value="${project.build.directory}/appassembler" */ + @Parameter( property = "assembleDirectory", defaultValue = "${project.build.directory}/appassembler" ) private File assembleDirectory; /** * Path (relative to assembleDirectory) of the desired output repository. - * - * @parameter default-value="repo" */ + @Parameter( defaultValue = "repo" ) private String repositoryName; public void execute() @@ -86,10 +86,8 @@ public class InstallArtifactsMojo ArtifactRepository artifactRepository = artifactRepositoryFactory.createDeploymentArtifactRepository( "appassembler", "file://" + assembleDirectory.getAbsolutePath() + "/" + repositoryName, artifactRepositoryLayout, false ); - for ( Object artifact1 : artifacts ) + for ( Artifact artifact : artifacts ) { - Artifact artifact = (Artifact) artifact1; - installArtifact( artifactRepository, artifact ); } } @@ -123,6 +121,12 @@ public class InstallArtifactsMojo private static final char GROUP_SEPARATOR = '.'; + @Override + public String getId() + { + return "id"; + } + public String pathOf( Artifact artifact ) { ArtifactHandler artifactHandler = artifact.getArtifactHandler(); diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/InstallCustomMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/InstallCustomMojo.java index 26791977ed..6993bdaf9d 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/InstallCustomMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/InstallCustomMojo.java @@ -23,29 +23,31 @@ import java.io.File; import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** * Installs the project artifacts into a local repository with a custom base directory and a custom layout. * - * @goal install-custom * * @author Benjamin Bentmann * */ +@Mojo( name = "install-custom" ) public class InstallCustomMojo extends InstallMojo { /** - * @component */ + @Component private ArtifactRepositoryFactory repositoryFactory; /** * The base directory of the local repository to install to. - * - * @parameter property="install.localRepoDir" */ + @Parameter( property = "install.localRepoDir" ) private File localRepoDir; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/InstallMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/InstallMojo.java index 150d2c3002..fe13b8f323 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/InstallMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/InstallMojo.java @@ -22,24 +22,25 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.installer.ArtifactInstaller; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; /** * Installs the project artifacts into the local repository. This is the essence of the Maven Install Plugin. * * @author Benjamin Bentmann * - * @goal install - * @phase install - */ + */ +@Mojo( name = "install", defaultPhase = LifecyclePhase.INSTALL ) public class InstallMojo extends AbstractRepoMojo { /** * The artifact installer. - * - * @component */ + @Component private ArtifactInstaller installer; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/LatestMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/LatestMojo.java index dfdcc07547..8ae85b96ce 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/LatestMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/LatestMojo.java @@ -24,26 +24,25 @@ import org.apache.maven.artifact.repository.metadata.ArtifactRepositoryMetadata; import org.apache.maven.artifact.repository.metadata.Versioning; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** * Marks the project's artifact as the latest version. * - * @goal latest - * @phase package - * + * * @author Benjamin Bentmann */ +@Mojo( name = "latest", defaultPhase = LifecyclePhase.PACKAGE ) public class LatestMojo extends AbstractMojo { /** * The main project artifact. - * - * @parameter default-value="${project.artifact}" - * @readonly - * @required */ + @Parameter( defaultValue = "${project.artifact}", readonly = true, required = true ) private Artifact projectArtifact; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/ReleaseMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/ReleaseMojo.java index b0545b7d8e..041f8c9e86 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/ReleaseMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/ReleaseMojo.java @@ -23,28 +23,27 @@ import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; /** * Marks the project's artifact as a release. * - * @goal release - * @phase package - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "release", defaultPhase = LifecyclePhase.PACKAGE ) public class ReleaseMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @readonly - * @required */ + @Parameter( defaultValue = "${project}", readonly = true, required = true ) private MavenProject project; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/ResolveMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/ResolveMojo.java index 30ce809826..1118fb18ed 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/ResolveMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/ResolveMojo.java @@ -26,6 +26,9 @@ import org.apache.maven.artifact.resolver.ArtifactResolver; import org.apache.maven.model.Dependency; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.FileOutputStream; @@ -38,56 +41,50 @@ import java.util.Properties; * * @author Benjamin Bentmann * - * @goal resolve - */ + */ +@Mojo( name = "resolve" ) public class ResolveMojo extends AbstractMojo { /** * The local repository. - * - * @parameter default-value="${localRepository}" - * @readonly - * @required */ + @Parameter( defaultValue = "${localRepository}", readonly = true, required = true ) private ArtifactRepository localRepository; /** * The remote repositories of the current Maven project. - * - * @parameter default-value="${project.remoteArtifactRepositories}" - * @readonly - * @required */ + @Parameter( defaultValue = "${project.remoteArtifactRepositories}", readonly = true, required = true ) private List remoteRepositories; /** * The artifact resolver. * - * @component */ + @Component private ArtifactResolver resolver; /** * The artifact factory. * - * @component */ + @Component private ArtifactFactory factory; /** * The dependencies to resolve. * - * @parameter */ + @Parameter private Dependency[] dependencies; /** * The path to a properties file to store the resolved artifact paths in. * - * @parameter */ + @Parameter private File propertiesFile; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/ResolveTransitiveMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/ResolveTransitiveMojo.java index dd1b1d11d2..06a61f512d 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/ResolveTransitiveMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/ResolveTransitiveMojo.java @@ -27,6 +27,9 @@ import org.apache.maven.artifact.resolver.ArtifactResolver; import org.apache.maven.model.Dependency; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.FileOutputStream; @@ -41,63 +44,57 @@ import java.util.Set; * to test access to any shared session state. * * @author Benjamin Bentmann - * @goal resolve-transitive - */ + */ +@Mojo( name = "resolve-transitive" ) public class ResolveTransitiveMojo extends AbstractMojo { /** * The local repository. - * - * @parameter default-value="${localRepository}" - * @readonly - * @required */ + @Parameter( defaultValue = "${localRepository}", readonly = true, required = true ) private ArtifactRepository localRepository; /** * The remote repositories of the current Maven project. - * - * @parameter default-value="${project.remoteArtifactRepositories}" - * @readonly - * @required */ + @Parameter( defaultValue = "${project.remoteArtifactRepositories}", readonly = true, required = true ) private List remoteRepositories; /** * The artifact resolver. * - * @component */ + @Component private ArtifactResolver resolver; /** * The artifact factory. * - * @component */ + @Component private ArtifactFactory factory; /** * The metadata source. * - * @component */ + @Component private ArtifactMetadataSource metadataSource; /** * The dependencies to resolve. * - * @parameter */ + @Parameter private Dependency[] dependencies; /** * The path to a properties file to store the resolved artifact paths in. * - * @parameter */ + @Parameter private File propertiesFile; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/SetMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/SetMojo.java index c166f0c3b8..f44de09e64 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/SetMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/SetMojo.java @@ -23,6 +23,9 @@ import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -31,32 +34,26 @@ import java.io.File; * Sets the main artifact's file. This is the essence of the Maven JAR Plugin and all the other packaging plugins. * Creating the actual file for the main artifact is a specific plugin job and not related to the Maven core. * - * @goal set - * @phase package - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "set", defaultPhase = LifecyclePhase.PACKAGE ) public class SetMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @readonly - * @required */ + @Parameter( defaultValue = "${project}", readonly = true, required = true ) private MavenProject project; /** * The path to the file to set as the main artifact, relative to the project base directory. The plugin will not * validate this path. - * - * @parameter property="artifact.mainFile" - * @required */ + @Parameter( property = "artifact.mainFile", required = true ) private String mainFile; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/pom.xml index 1a1db0c62b..ed6c2c4317 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/pom.xml @@ -22,14 +22,19 @@ under the License. 4.0.0 - - org.apache.maven.its.plugins - maven-it-plugins - 2.1-SNAPSHOT - ../../pom.xml - + + + + + + + + + org.apache.maven.its.plugins maven-it-plugin-class-loader + 2.1-SNAPSHOT maven-plugin Maven IT Plugin :: Class Loader @@ -43,12 +48,19 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + 3.8.6 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations + 3.6.4 provided org.junit.jupiter junit-jupiter + 5.8.0 test @@ -66,4 +78,18 @@ under the License. true + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.10.1 + + 1.8 + 1.8 + + + + diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/AbstractLoadMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/AbstractLoadMojo.java index 7d0d5c608a..ee3a0ee0c6 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/AbstractLoadMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/AbstractLoadMojo.java @@ -21,6 +21,7 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.IOException; @@ -49,9 +50,8 @@ public abstract class AbstractLoadMojo * key will be the hash code of the requested class. In addition, a key named QCN.methods holds the * comma separated list of all public methods declared directly in that class, in alphabetic order and possibly with * duplicates to account for overloaded methods. - * - * @parameter property="clsldr.classNames" */ + @Parameter( property = "clsldr.classNames" ) protected String classNames; /** @@ -59,9 +59,8 @@ public abstract class AbstractLoadMojo * successfully loaded, the generated properties files will contain a key named ARP whose value gives * the URL to the resource. In addition, the keys ARP.count, ARP.0, ARP.1 * etc. will enumerate all URLs matching the resource name. - * - * @parameter property="clsldr.resourcePaths" */ + @Parameter( property = "clsldr.resourcePaths" ) protected String resourcePaths; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/AssignmentCompatibleMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/AssignmentCompatibleMojo.java index c11f18b385..cdf85eb44a 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/AssignmentCompatibleMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/AssignmentCompatibleMojo.java @@ -22,6 +22,8 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.Mojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.util.Properties; @@ -31,25 +33,23 @@ import java.util.Properties; * class loader. In other words, checks that types shared with the core realm are imported into the plugin realm. * * @author Benjamin Bentmann - * @goal assignment-compatible - * @phase initialize - */ + */ +@org.apache.maven.plugins.annotations.Mojo( name = "assignment-compatible", defaultPhase = LifecyclePhase.INITIALIZE ) public class AssignmentCompatibleMojo extends AbstractMojo { /** * The path to the properties file used to track the results of the assignment compatibility tests. - * - * @parameter property="clsldr.assigncompatPropertiesFile" */ + @Parameter( property = "clsldr.assigncompatPropertiesFile" ) private File assigncompatPropertiesFile; /** * The qualified names of the types to check. * - * @parameter */ + @Parameter private String[] classNames; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/InstanceofMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/InstanceofMojo.java index 08748537cc..3900bb6633 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/InstanceofMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/InstanceofMojo.java @@ -22,6 +22,10 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.util.HashMap; @@ -35,48 +39,41 @@ import java.util.Properties; * * @author Benjamin Bentmann * - * @goal instanceof - * @phase initialize - */ + */ +@Mojo( name = "instanceof", defaultPhase = LifecyclePhase.INITIALIZE ) public class InstanceofMojo extends AbstractMojo { /** * The path to the properties file used to track the results of the instanceof tests. - * - * @parameter property="clsldr.instanceofPropertiesFile" */ + @Parameter( property = "clsldr.instanceofPropertiesFile" ) private File instanceofPropertiesFile; /** * The qualified name of the type to which the objects should be assignment-compatible. This type will be loaded * from the plugin class loader, just like as if it was imported in the plugin source code. - * - * @parameter property="clsldr.className" */ + @Parameter( property = "clsldr.className" ) private String className; /** * A list of expressions that denote the object instances that should be type-checked. - * - * @parameter */ + @Parameter private String[] objectExpressions; /** * A list of injected component instances that should be type-checked. - * - * @component role="org.apache.maven.plugin.coreit.Component" */ - private List components; + @Component + private List components; /** * The current Maven project against which expressions are evaluated. - * - * @parameter default-value="${project}" - * @readonly */ + @Parameter( defaultValue = "${project}", readonly = true ) private Object project; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/LoadDependenciesMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/LoadDependenciesMojo.java index f15620e728..4b33443a22 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/LoadDependenciesMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/LoadDependenciesMojo.java @@ -20,6 +20,10 @@ package org.apache.maven.plugin.coreit; */ import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; import java.io.File; import java.net.MalformedURLException; @@ -31,31 +35,26 @@ import java.util.List; * Loads classes and/or resources from a custom class loader that holds the project dependencies and records the results * in a properties file. * - * @goal load-dependencies - * @phase initialize - * @requiresDependencyResolution compile - * * @author Benjamin Bentmann * */ +@Mojo( name = "load-dependencies", defaultPhase = LifecyclePhase.INITIALIZE, + requiresDependencyResolution = ResolutionScope.COMPILE ) public class LoadDependenciesMojo extends AbstractLoadMojo { /** * The project's class path to load classes/resources from. - * - * @parameter default-value="${project.compileClasspathElements}" - * @readonly */ + @Parameter( defaultValue = "${project.compileClasspathElements}", readonly = true ) private List classPath; /** * The path to the properties file used to track the results of the class/resource loading via the project class * loader. - * - * @parameter property="clsldr.projectClassLoaderOutput" */ + @Parameter( property = "clsldr.projectClassLoaderOutput" ) private File projectClassLoaderOutput; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/LoadMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/LoadMojo.java index 7702a1c436..2db404714a 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/LoadMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/LoadMojo.java @@ -20,18 +20,20 @@ package org.apache.maven.plugin.coreit; */ import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; /** * Loads classes and/or resources from the plugin class path and records the results in a properties file. * - * @goal load - * @phase initialize - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "load", defaultPhase = LifecyclePhase.INITIALIZE ) public class LoadMojo extends AbstractLoadMojo { @@ -39,17 +41,15 @@ public class LoadMojo /** * The path to the properties file used to track the results of the class/resource loading via the plugin class * loader. - * - * @parameter property="clsldr.pluginClassLoaderOutput" */ + @Parameter( property = "clsldr.pluginClassLoaderOutput" ) private File pluginClassLoaderOutput; /** * The path to the properties file used to track the results of the class/resource loading via the thread's context * class loader. - * - * @parameter property="clsldr.contextClassLoaderOutput" */ + @Parameter( property = "clsldr.contextClassLoaderOutput" ) private File contextClassLoaderOutput; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/Component.java b/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/TestComponent.java similarity index 96% rename from its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/Component.java rename to its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/TestComponent.java index 70f69048b9..6adc9a4c2c 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-active-collection/src/main/java/org/apache/maven/plugin/coreit/Component.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/TestComponent.java @@ -24,7 +24,7 @@ package org.apache.maven.plugin.coreit; * * @author Benjamin Bentmann */ -public interface Component +public interface TestComponent { } diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/pom.xml index 3a929ba074..455295a128 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/pom.xml @@ -42,7 +42,6 @@ under the License. org.apache.maven maven-plugin-api - 2.0 provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/AppendConfigMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/AppendConfigMojo.java index 5754dd43c6..7e1873b422 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/AppendConfigMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/AppendConfigMojo.java @@ -27,98 +27,94 @@ import java.util.Set; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** * Appends this mojo's configuration into a properties file. * - * @goal append-config - * @phase validate - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "append-config", defaultPhase = LifecyclePhase.VALIDATE ) public class AppendConfigMojo extends AbstractMojo { /** * The current project's base directory, used for path alignment. - * - * @parameter default-value="${basedir}" - * @readonly */ + @Parameter( defaultValue = "${basedir}", readonly = true ) private File basedir; /** * The path to the properties file into which to save the mojo configuration. Note: This intentionally uses * another parameter name for the output file than {@link ConfigMojo}. - * - * @parameter property="config.outputFile" */ + @Parameter( property = "config.outputFile" ) private File outputFile; /** * A parameter with a constant default value. Note: This has intentionally a different default value than * the equally named parameter from {@link ConfigMojo}. - * - * @parameter default-value="test" */ + @Parameter( defaultValue = "test" ) private String defaultParam; /** * A simple parameter of type {@link java.lang.String}. - * - * @parameter property="config.stringParam" */ + @Parameter( property = "config.stringParam" ) private String stringParam; /** * A simple parameter of type {@link java.io.File}. - * - * @parameter property="config.fileParam" */ + @Parameter( property = "config.fileParam" ) private File fileParam; /** * An array parameter of component type {@link java.lang.String}. * - * @parameter */ + @Parameter private String[] stringParams; /** * An array parameter of component type {@link java.io.File}. * - * @parameter */ + @Parameter private File[] fileParams; /** * A collection parameter of type {@link java.util.List}. * - * @parameter */ - private List listParam; + @Parameter + private List listParam; /** * A collection parameter of type {@link java.util.Set}. * - * @parameter */ - private Set setParam; + @Parameter + private Set setParam; /** * A collection parameter of type {@link java.util.Map}. * - * @parameter */ - private Map mapParam; + @Parameter + private Map mapParam; /** * A collection parameter of type {@link java.util.Properties}. * - * @parameter */ + @Parameter private Properties propertiesParam; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/CliConfigMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/CliConfigMojo.java index 614f79b3d2..807f017bb7 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/CliConfigMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/CliConfigMojo.java @@ -26,75 +26,68 @@ import java.util.Set; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** * Dumps this mojo's configuration into a properties file. * - * @goal cli-config - * @phase validate - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "cli-config", defaultPhase = LifecyclePhase.VALIDATE ) public class CliConfigMojo extends AbstractMojo { /** * The current project's base directory, used for path alignment. - * - * @parameter default-value="${basedir}" - * @readonly */ + @Parameter( defaultValue = "${basedir}", readonly = true ) private File basedir; /** * The path to the properties file into which to save the mojo configuration. - * - * @parameter property="config.propertiesFile" */ + @Parameter( property = "config.propertiesFile" ) private File propertiesFile; /** * A simple parameter of type {@link java.lang.String}. - * - * @parameter property="config.stringParam" */ + @Parameter( property = "config.stringParam" ) private String stringParam; /** * A simple parameter of type {@link java.io.File}. - * - * @parameter property="config.fileParam" */ + @Parameter( property = "config.fileParam" ) private File fileParam; /** * An array parameter of component type {@link java.lang.String}. - * - * @parameter property="config.stringParams" */ + @Parameter( property = "config.stringParams" ) private String[] stringParams; /** * An array parameter of component type {@link java.io.File}. - * - * @parameter property="config.fileParams" */ + @Parameter( property = "config.fileParams" ) private File[] fileParams; /** * A collection parameter of type {@link java.util.List}. - * - * @parameter property="config.listParam" */ + @Parameter( property = "config.listParam" ) private List listParam; /** * A collection parameter of type {@link java.util.Set}. - * - * @parameter property="config.setParam" */ + @Parameter( property = "config.setParam" ) private Set setParam; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/ConfigMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/ConfigMojo.java index 01f9d933ee..1d7ba48bae 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/ConfigMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/ConfigMojo.java @@ -21,6 +21,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.codehaus.plexus.configuration.PlexusConfiguration; import java.io.File; @@ -37,222 +40,199 @@ import java.util.Set; * * @author Benjamin Bentmann * - * @goal config - * @phase validate - */ + */ +@Mojo( name = "config", defaultPhase = LifecyclePhase.VALIDATE ) public class ConfigMojo extends AbstractMojo { /** * The current project's base directory, used for path alignment. - * - * @parameter default-value="${basedir}" - * @readonly */ + @Parameter( defaultValue = "${basedir}", readonly = true ) private File basedir; /** * The path to the properties file into which to save the mojo configuration. - * - * @parameter property="config.propertiesFile" */ + @Parameter( property = "config.propertiesFile" ) private File propertiesFile; /** * A parameter with an alias. - * - * @parameter alias="aliasParamLegacy" */ + @Parameter( alias = "aliasParamLegacy" ) private String aliasParam; /** * A parameter with a constant default value. - * - * @parameter default-value="maven-core-it" */ + @Parameter( defaultValue = "maven-core-it" ) private String defaultParam; /** * A parameter with a default value using multiple expressions. - * - * @parameter default-value="${project.groupId}:${project.artifactId}:${project.version}" */ + @Parameter( defaultValue = "${project.groupId}:${project.artifactId}:${project.version}" ) private String defaultParamWithExpression; /** * A parameter that combines all of the annotations. - * - * @parameter alias="fullyAnnotatedParam" property="config.aliasDefaultExpressionParam" default-value="test" */ + @Parameter( alias = "fullyAnnotatedParam", property = "config.aliasDefaultExpressionParam", defaultValue = "test" ) private String aliasDefaultExpressionParam; /** * A simple parameter of type {@link java.lang.Boolean}. - * - * @parameter property="config.booleanParam" */ + @Parameter( property = "config.booleanParam" ) private Boolean booleanParam; /** * A simple parameter of type {@link java.lang.Boolean#TYPE}. - * - * @parameter property="config.primitiveBooleanParam" */ + @Parameter( property = "config.primitiveBooleanParam" ) private boolean primitiveBooleanParam; /** * A simple parameter of type {@link java.lang.Byte}. - * - * @parameter property="config.byteParam" */ + @Parameter( property = "config.byteParam" ) private Byte byteParam; /** * A simple parameter of type {@link java.lang.Short}. - * - * @parameter property="config.shortParam" */ + @Parameter( property = "config.shortParam" ) private Short shortParam; /** * A simple parameter of type {@link java.lang.Integer}. - * - * @parameter property="config.integerParam" */ + @Parameter( property = "config.integerParam" ) private Integer integerParam; /** * A simple parameter of type {@link java.lang.Integer#TYPE}. - * - * @parameter property="config.primitiveIntegerParam" */ + @Parameter( property = "config.primitiveIntegerParam" ) private int primitiveIntegerParam; /** * A simple parameter of type {@link java.lang.Long}. - * - * @parameter property="config.longParam" */ + @Parameter( property = "config.longParam" ) private Long longParam; /** * A simple parameter of type {@link java.lang.Float}. - * - * @parameter property="config.floatParam" */ + @Parameter( property = "config.floatParam" ) private Float floatParam; /** * A simple parameter of type {@link java.lang.Double}. - * - * @parameter property="config.doubleParam" */ + @Parameter( property = "config.doubleParam" ) private Double doubleParam; /** * A simple parameter of type {@link java.lang.Character}. - * - * @parameter property="config.characterParam" */ + @Parameter( property = "config.characterParam" ) private Character characterParam; /** * A simple parameter of type {@link java.lang.String}. - * - * @parameter property="config.stringParam" */ + @Parameter( property = "config.stringParam" ) private String stringParam; /** * A simple parameter of type {@link java.io.File}. - * - * @parameter property="config.fileParam" */ + @Parameter( property = "config.fileParam" ) private File fileParam; /** * A simple parameter of type {@link java.util.Date}. - * - * @parameter property="config.dateParam" */ + @Parameter( property = "config.dateParam" ) private Date dateParam; /** * A simple parameter of type {@link java.net.URL}. - * - * @parameter property="config.urlParam" */ + @Parameter( property = "config.urlParam" ) private URL urlParam; /** * A simple parameter of type {@link java.net.URI} (requires Maven 3.x). * - * @parameter */ + @Parameter private URI uriParam; /** * An array parameter of component type {@link java.lang.String}. * - * @parameter */ + @Parameter private String[] stringParams; /** * An array parameter of component type {@link java.io.File}. * - * @parameter */ + @Parameter private File[] fileParams; /** * A collection parameter of type {@link java.util.List}. * - * @parameter */ + @Parameter private List listParam; /** * A collection parameter of type {@link java.util.Set}. * - * @parameter */ + @Parameter private Set setParam; /** * A collection parameter of type {@link java.util.Map}. * - * @parameter */ + @Parameter private Map mapParam; /** * A collection parameter of type {@link java.util.Properties}. * - * @parameter */ + @Parameter private Properties propertiesParam; /** * A complex parameter with an alias. - * - * @parameter alias="aliasStringParamsLegacy" */ + @Parameter( alias = "aliasStringParamsLegacy" ) private String[] aliasStringParams; /** * A complex parameter of type {@link org.apache.maven.plugin.coreit.Bean}. * - * @parameter */ + @Parameter private Bean beanParam; /** * A raw DOM snippet. * - * @parameter */ + @Parameter private PlexusConfiguration domParam; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/CustomComponentConfigurator.java b/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/CustomComponentConfigurator.java index 1d5a0e45b8..e4336586b8 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/CustomComponentConfigurator.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/CustomComponentConfigurator.java @@ -19,7 +19,7 @@ package org.apache.maven.plugin.coreit; * under the License. */ -import org.codehaus.classworlds.ClassRealm; +import org.codehaus.plexus.classworlds.realm.ClassRealm; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.configurator.AbstractComponentConfigurator; import org.codehaus.plexus.component.configurator.ComponentConfigurationException; @@ -47,7 +47,7 @@ public class CustomComponentConfigurator { ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter(); - converter.processConfiguration( converterLookup, component, containerRealm.getClassLoader(), configuration, + converter.processConfiguration( converterLookup, component, containerRealm, configuration, expressionEvaluator, listener ); if ( component instanceof CustomConfigMojo ) diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/CustomConfigMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/CustomConfigMojo.java index bbff02fd26..82c1e8218f 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/CustomConfigMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/CustomConfigMojo.java @@ -27,105 +27,98 @@ import java.util.Set; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** * Dumps this mojo's configuration into a properties file. Note that this mojo uses a custom component configurator. * - * @goal custom-config - * @phase validate - * @configurator coreit - * * @author Benjamin Bentmann * */ +@Mojo( name = "custom-config", defaultPhase = LifecyclePhase.VALIDATE, configurator = "coreit" ) public class CustomConfigMojo extends AbstractMojo { /** * The current project's base directory, used for path alignment. - * - * @parameter default-value="${basedir}" - * @readonly */ + @Parameter( defaultValue = "${basedir}", readonly = true ) private File basedir; /** * The path to the properties file into which to save the mojo configuration. - * - * @parameter property="config.propertiesFile" */ + @Parameter( property = "config.propertiesFile" ) private File propertiesFile; /** * A parameter being set only by the custom configurator as a proof of its execution. - * - * @parameter */ + @Parameter String customParam; /** * A parameter with a constant default value. Note: This has intentionally a different default value than * the equally named parameter from {@link ConfigMojo}. - * - * @parameter default-value="test" */ + @Parameter( defaultValue = "test" ) private String defaultParam; /** * A simple parameter of type {@link java.lang.String}. - * - * @parameter property="config.stringParam" */ + @Parameter( property = "config.stringParam" ) private String stringParam; /** * A simple parameter of type {@link java.io.File}. - * - * @parameter property="config.fileParam" */ + @Parameter( property = "config.fileParam" ) private File fileParam; /** * An array parameter of component type {@link java.lang.String}. * - * @parameter */ + @Parameter private String[] stringParams; /** * An array parameter of component type {@link java.io.File}. * - * @parameter */ + @Parameter private File[] fileParams; /** * A collection parameter of type {@link java.util.List}. * - * @parameter */ + @Parameter private List listParam; /** * A collection parameter of type {@link java.util.Set}. * - * @parameter */ + @Parameter private Set setParam; /** * A collection parameter of type {@link java.util.Map}. * - * @parameter */ + @Parameter private Map mapParam; /** * A collection parameter of type {@link java.util.Properties}. * - * @parameter */ + @Parameter private Properties propertiesParam; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/RequiredConfigMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/RequiredConfigMojo.java index 75ae9d63dd..5e48e1432e 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/RequiredConfigMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/RequiredConfigMojo.java @@ -24,48 +24,43 @@ import java.util.Properties; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** * Dumps this mojo's configuration into a properties file. * - * @goal required-config - * @phase validate - * + * * @author Benjamin Bentmann */ +@Mojo( name = "required-config", defaultPhase = LifecyclePhase.VALIDATE ) public class RequiredConfigMojo extends AbstractMojo { /** * The current project's base directory, used for path alignment. - * - * @parameter default-value="${basedir}" - * @readonly */ + @Parameter( defaultValue = "${basedir}", readonly = true ) private File basedir; /** * The path to the properties file into which to save the mojo configuration. - * - * @parameter property="config.propertiesFile" */ + @Parameter( property = "config.propertiesFile" ) private File propertiesFile; /** * A required parameter to be set via plugin configuration in POM or system property from CLI. - * - * @parameter property="config.requiredParam" - * @required */ + @Parameter( property = "config.requiredParam", required = true ) private String requiredParam; /** * A required parameter that defaults to a non-mandatory value from the POM. - * - * @parameter default-value="${project.url}" - * @required */ + @Parameter( defaultValue = "${project.url}", required = true ) private String requiredParamWithDefault; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-context-passing/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-context-passing/pom.xml index 33c2921b54..f90f53a67e 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-context-passing/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-context-passing/pom.xml @@ -42,7 +42,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-context-passing/src/main/java/org/apache/maven/plugin/coreit/CatchMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-context-passing/src/main/java/org/apache/maven/plugin/coreit/CatchMojo.java index 930873c2fc..b1817b83e5 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-context-passing/src/main/java/org/apache/maven/plugin/coreit/CatchMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-context-passing/src/main/java/org/apache/maven/plugin/coreit/CatchMojo.java @@ -21,6 +21,8 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.FileWriter; @@ -31,17 +33,15 @@ import java.io.Writer; * "Catch" a parameter "thrown" by the ThrowMojo through the plugin context, and * write a file based on it's value to the build output directory. * - * @goal catch */ +@Mojo( name = "catch" ) public class CatchMojo extends AbstractMojo { /** - * @parameter default-value="${project.build.directory}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project.build.directory}", readonly = true, required = true ) private File outDir; public File getOutDir() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-context-passing/src/main/java/org/apache/maven/plugin/coreit/ThrowMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-context-passing/src/main/java/org/apache/maven/plugin/coreit/ThrowMojo.java index 9b4ee8d848..4ef764a210 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-context-passing/src/main/java/org/apache/maven/plugin/coreit/ThrowMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-context-passing/src/main/java/org/apache/maven/plugin/coreit/ThrowMojo.java @@ -21,13 +21,15 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** * "Throw" a parameter into the plugin context, for the "catch" mojo to * pick up and process. * - * @goal throw */ +@Mojo( name = "throw" ) public class ThrowMojo extends AbstractMojo { @@ -35,8 +37,8 @@ public class ThrowMojo public static final String THROWN_PARAMETER = "throw-parameter"; /** - * @parameter property="value" default-value="thrown" */ + @Parameter( property = "value", defaultValue = "thrown" ) private String value; public void setValue( String value ) diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-clean-plugin/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-clean-plugin/pom.xml index 459c49fd45..f73697dc26 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-clean-plugin/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-clean-plugin/pom.xml @@ -48,13 +48,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-clean-plugin/src/main/java/org/apache/maven/plugin/coreit/CleanMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-clean-plugin/src/main/java/org/apache/maven/plugin/coreit/CleanMojo.java index 5bb83f5b9a..aaf2d3e0fc 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-clean-plugin/src/main/java/org/apache/maven/plugin/coreit/CleanMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-clean-plugin/src/main/java/org/apache/maven/plugin/coreit/CleanMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal clean - * @phase clean - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "clean", defaultPhase = LifecyclePhase.CLEAN ) public class CleanMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/clean-clean.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-compiler-plugin/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-compiler-plugin/pom.xml index f4d5408818..98a9a00090 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-compiler-plugin/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-compiler-plugin/pom.xml @@ -48,13 +48,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/coreit/CompileMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/coreit/CompileMojo.java index 31d78fbfc2..79e8e63a75 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/coreit/CompileMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/coreit/CompileMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal compile - * @phase compile - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "compile", defaultPhase = LifecyclePhase.COMPILE ) public class CompileMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/compiler-compile.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/coreit/TestCompileMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/coreit/TestCompileMojo.java index c560a15968..700322a14c 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/coreit/TestCompileMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/coreit/TestCompileMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal testCompile - * @phase test-compile - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "testCompile", defaultPhase = LifecyclePhase.TEST_COMPILE ) public class TestCompileMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/compiler-test-compile.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-deploy-plugin/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-deploy-plugin/pom.xml index f41efebbd1..5210978ba8 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-deploy-plugin/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-deploy-plugin/pom.xml @@ -48,13 +48,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/coreit/DeployMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/coreit/DeployMojo.java index cedf3fcde8..6061ff2f18 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/coreit/DeployMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/coreit/DeployMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal deploy - * @phase deploy - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "deploy", defaultPhase = LifecyclePhase.DEPLOY ) public class DeployMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/deploy-deploy.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ear-plugin/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ear-plugin/pom.xml index 5d7f6a425c..2def80657a 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ear-plugin/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ear-plugin/pom.xml @@ -48,13 +48,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ear-plugin/src/main/java/org/apache/maven/plugin/coreit/EarMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ear-plugin/src/main/java/org/apache/maven/plugin/coreit/EarMojo.java index 27f947e215..e23658f83e 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ear-plugin/src/main/java/org/apache/maven/plugin/coreit/EarMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ear-plugin/src/main/java/org/apache/maven/plugin/coreit/EarMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal ear - * @phase package - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "ear", defaultPhase = LifecyclePhase.PACKAGE ) public class EarMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/ear-ear.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ear-plugin/src/main/java/org/apache/maven/plugin/coreit/GenerateApplicationXmlMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ear-plugin/src/main/java/org/apache/maven/plugin/coreit/GenerateApplicationXmlMojo.java index c8c0576326..7916a99bab 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ear-plugin/src/main/java/org/apache/maven/plugin/coreit/GenerateApplicationXmlMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ear-plugin/src/main/java/org/apache/maven/plugin/coreit/GenerateApplicationXmlMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal generate-application-xml - * @phase generate-resources - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "generate-application-xml", defaultPhase = LifecyclePhase.GENERATE_RESOURCES ) public class GenerateApplicationXmlMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/ear-generate-application-xml.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ejb-plugin/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ejb-plugin/pom.xml index cfeae4deab..b51e9abf34 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ejb-plugin/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ejb-plugin/pom.xml @@ -48,13 +48,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/coreit/EjbMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/coreit/EjbMojo.java index fbef01013e..b7de2aac4c 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/coreit/EjbMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/coreit/EjbMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal ejb - * @phase package - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "ejb", defaultPhase = LifecyclePhase.PACKAGE ) public class EjbMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/ejb-ejb.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-install-plugin/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-install-plugin/pom.xml index d1d88eaa38..17c11084dc 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-install-plugin/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-install-plugin/pom.xml @@ -48,13 +48,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-install-plugin/src/main/java/org/apache/maven/plugin/coreit/InstallMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-install-plugin/src/main/java/org/apache/maven/plugin/coreit/InstallMojo.java index d56f7e1b7e..5207da8c70 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-install-plugin/src/main/java/org/apache/maven/plugin/coreit/InstallMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-install-plugin/src/main/java/org/apache/maven/plugin/coreit/InstallMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal install - * @phase install - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "install", defaultPhase = LifecyclePhase.INSTALL ) public class InstallMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/install-install.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-jar-plugin/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-jar-plugin/pom.xml index 917698c07f..3d74ea1b4a 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-jar-plugin/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-jar-plugin/pom.xml @@ -48,13 +48,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-jar-plugin/src/main/java/org/apache/maven/plugin/coreit/JarMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-jar-plugin/src/main/java/org/apache/maven/plugin/coreit/JarMojo.java index 1f6a931f4a..e61c2a7fc5 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-jar-plugin/src/main/java/org/apache/maven/plugin/coreit/JarMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-jar-plugin/src/main/java/org/apache/maven/plugin/coreit/JarMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal jar - * @phase package - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "jar", defaultPhase = LifecyclePhase.PACKAGE ) public class JarMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/jar-jar.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-javadoc-plugin/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-javadoc-plugin/pom.xml index a45501c7ef..9e5477a636 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-javadoc-plugin/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-javadoc-plugin/pom.xml @@ -48,13 +48,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/coreit/JarMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/coreit/JarMojo.java index 322d49ef83..409466fb6c 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/coreit/JarMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/coreit/JarMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal jar - * @phase package - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "jar", defaultPhase = LifecyclePhase.PACKAGE ) public class JarMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/javadoc-jar.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-plugin-plugin/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-plugin-plugin/pom.xml index 1ca0946e21..609d1309e7 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-plugin-plugin/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-plugin-plugin/pom.xml @@ -48,13 +48,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/coreit/AddPluginArtifactMetadataMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/coreit/AddPluginArtifactMetadataMojo.java index e06cd6a0d2..ac260b3fef 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/coreit/AddPluginArtifactMetadataMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/coreit/AddPluginArtifactMetadataMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal addPluginArtifactMetadata - * @phase package - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "addPluginArtifactMetadata", defaultPhase = LifecyclePhase.PACKAGE ) public class AddPluginArtifactMetadataMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/plugin-add-plugin-artifact-metadata.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/coreit/DescriptorMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/coreit/DescriptorMojo.java index 12abda820d..b4a54fccc1 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/coreit/DescriptorMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/coreit/DescriptorMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal descriptor - * @phase generate-resources - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "descriptor", defaultPhase = LifecyclePhase.GENERATE_RESOURCES ) public class DescriptorMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/plugin-descriptor.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/coreit/UpdateRegistryMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/coreit/UpdateRegistryMojo.java index 002ea33de2..942876500a 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/coreit/UpdateRegistryMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/coreit/UpdateRegistryMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal updateRegistry - * @phase install - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "updateRegistry", defaultPhase = LifecyclePhase.INSTALL ) public class UpdateRegistryMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/plugin-update-registry.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-rar-plugin/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-rar-plugin/pom.xml index be49bab4fd..1f0c263064 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-rar-plugin/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-rar-plugin/pom.xml @@ -48,13 +48,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-rar-plugin/src/main/java/org/apache/maven/plugin/coreit/RarMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-rar-plugin/src/main/java/org/apache/maven/plugin/coreit/RarMojo.java index 9a1aaf88af..d1bda7ccfd 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-rar-plugin/src/main/java/org/apache/maven/plugin/coreit/RarMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-rar-plugin/src/main/java/org/apache/maven/plugin/coreit/RarMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal rar - * @phase package - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "rar", defaultPhase = LifecyclePhase.PACKAGE ) public class RarMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/rar-rar.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-resources-plugin/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-resources-plugin/pom.xml index 7267091786..06cdea155a 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-resources-plugin/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-resources-plugin/pom.xml @@ -48,13 +48,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-resources-plugin/src/main/java/org/apache/maven/plugin/coreit/ResourcesMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-resources-plugin/src/main/java/org/apache/maven/plugin/coreit/ResourcesMojo.java index 9060a47d7c..956d68e513 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-resources-plugin/src/main/java/org/apache/maven/plugin/coreit/ResourcesMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-resources-plugin/src/main/java/org/apache/maven/plugin/coreit/ResourcesMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -34,35 +37,31 @@ import java.io.OutputStreamWriter; * * @author Benjamin Bentmann * - * @goal resources - * @phase process-resources - */ + */ +@Mojo( name = "resources", defaultPhase = LifecyclePhase.PROCESS_RESOURCES ) public class ResourcesMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/resources-resources.txt"; /** * An optional message line to write to the output file (using UTF-8 encoding). If given, the output file will be * opened in append mode. * - * @parameter */ + @Parameter private String message; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-resources-plugin/src/main/java/org/apache/maven/plugin/coreit/TestResourcesMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-resources-plugin/src/main/java/org/apache/maven/plugin/coreit/TestResourcesMojo.java index f687393a13..e258111b85 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-resources-plugin/src/main/java/org/apache/maven/plugin/coreit/TestResourcesMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-resources-plugin/src/main/java/org/apache/maven/plugin/coreit/TestResourcesMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal testResources - * @phase process-test-resources - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "testResources", defaultPhase = LifecyclePhase.PROCESS_TEST_RESOURCES ) public class TestResourcesMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/resources-test-resources.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-site-plugin/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-site-plugin/pom.xml index bb404e8c05..f5030b9c82 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-site-plugin/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-site-plugin/pom.xml @@ -48,13 +48,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-site-plugin/src/main/java/org/apache/maven/plugin/coreit/AttachDescriptorMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-site-plugin/src/main/java/org/apache/maven/plugin/coreit/AttachDescriptorMojo.java index 91ae5b3d29..a2af26a33b 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-site-plugin/src/main/java/org/apache/maven/plugin/coreit/AttachDescriptorMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-site-plugin/src/main/java/org/apache/maven/plugin/coreit/AttachDescriptorMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal attach-descriptor - * @phase package - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "attach-descriptor", defaultPhase = LifecyclePhase.PACKAGE ) public class AttachDescriptorMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/site-attach-descriptor.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-site-plugin/src/main/java/org/apache/maven/plugin/coreit/DeployMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-site-plugin/src/main/java/org/apache/maven/plugin/coreit/DeployMojo.java index 650d0cb6c0..4667e7080c 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-site-plugin/src/main/java/org/apache/maven/plugin/coreit/DeployMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-site-plugin/src/main/java/org/apache/maven/plugin/coreit/DeployMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal deploy - * @phase site-deploy - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "deploy", defaultPhase = LifecyclePhase.SITE_DEPLOY ) public class DeployMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/site-deploy.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-site-plugin/src/main/java/org/apache/maven/plugin/coreit/SiteMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-site-plugin/src/main/java/org/apache/maven/plugin/coreit/SiteMojo.java index 6f71afa83f..24bdff840c 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-site-plugin/src/main/java/org/apache/maven/plugin/coreit/SiteMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-site-plugin/src/main/java/org/apache/maven/plugin/coreit/SiteMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal site - * @phase site - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "site", defaultPhase = LifecyclePhase.SITE ) public class SiteMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/site-site.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-source-plugin/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-source-plugin/pom.xml index 6527764b13..78b44f987c 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-source-plugin/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-source-plugin/pom.xml @@ -48,13 +48,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-source-plugin/src/main/java/org/apache/maven/plugin/coreit/JarMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-source-plugin/src/main/java/org/apache/maven/plugin/coreit/JarMojo.java index e56bec9f3d..87f0f79a93 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-source-plugin/src/main/java/org/apache/maven/plugin/coreit/JarMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-source-plugin/src/main/java/org/apache/maven/plugin/coreit/JarMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal jar - * @phase package - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "jar", defaultPhase = LifecyclePhase.PACKAGE ) public class JarMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/source-jar.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-source-plugin/src/main/java/org/apache/maven/plugin/coreit/JarNoFork.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-source-plugin/src/main/java/org/apache/maven/plugin/coreit/JarNoFork.java index e406e5ba0c..e80864b172 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-source-plugin/src/main/java/org/apache/maven/plugin/coreit/JarNoFork.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-source-plugin/src/main/java/org/apache/maven/plugin/coreit/JarNoFork.java @@ -19,12 +19,14 @@ package org.apache.maven.plugin.coreit; * under the License. */ +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; + /** * Creates a text file in the project base directory. * - * @goal jar-no-fork - * @phase package - */ + */ +@Mojo( name = "jar-no-fork", defaultPhase = LifecyclePhase.PACKAGE ) public class JarNoFork extends JarMojo { } diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-surefire-plugin/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-surefire-plugin/pom.xml index 5fede8fdab..6f8f707eba 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-surefire-plugin/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-surefire-plugin/pom.xml @@ -48,13 +48,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/coreit/TestMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/coreit/TestMojo.java index 725798f067..da82018570 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/coreit/TestMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/coreit/TestMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal test - * @phase test - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "test", defaultPhase = LifecyclePhase.TEST ) public class TestMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/surefire-test.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-war-plugin/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-war-plugin/pom.xml index 17eb490072..3f6732ac20 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-war-plugin/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-war-plugin/pom.xml @@ -48,13 +48,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-war-plugin/src/main/java/org/apache/maven/plugin/coreit/WarMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-war-plugin/src/main/java/org/apache/maven/plugin/coreit/WarMojo.java index ab906e1410..c984afea15 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-war-plugin/src/main/java/org/apache/maven/plugin/coreit/WarMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-core-stubs/maven-war-plugin/src/main/java/org/apache/maven/plugin/coreit/WarMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,30 +33,26 @@ import java.io.IOException; /** * Creates a text file in the project base directory. * - * @goal war - * @phase package - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "war", defaultPhase = LifecyclePhase.PACKAGE ) public class WarMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) private MavenProject project; /** * The path to the output file, relative to the project base directory. * - * @parameter */ + @Parameter private String pathname = "target/war-war.txt"; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/pom.xml index 78999236ca..74da6292c1 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/pom.xml @@ -46,19 +46,21 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-core provided org.apache.maven maven-artifact - 2.0 provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/AbstractDependencyMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/AbstractDependencyMojo.java index 2e4124c838..bd33f40f08 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/AbstractDependencyMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/AbstractDependencyMojo.java @@ -22,6 +22,7 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.BufferedWriter; @@ -43,11 +44,8 @@ public abstract class AbstractDependencyMojo /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) protected MavenProject project; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/AggregateTestMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/AggregateTestMojo.java index e570d1e515..b5d58637d9 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/AggregateTestMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/AggregateTestMojo.java @@ -21,6 +21,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; import org.apache.maven.project.MavenProject; import java.util.List; @@ -31,11 +34,8 @@ import java.util.List; * dependencies are dumped. * * @author Benjamin Bentmann - * - * @goal aggregate-test - * @requiresDependencyCollection test - * @aggregator true */ +@Mojo( name = "aggregate-test", requiresDependencyCollection = ResolutionScope.TEST, aggregator = true ) public class AggregateTestMojo extends AbstractDependencyMojo { @@ -45,18 +45,15 @@ public class AggregateTestMojo * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. Unlike the test artifacts, the collection of project artifacts additionally contains those artifacts that * do not contribute to the class path. - * - * @parameter property="depres.projectArtifacts" */ + @Parameter( property = "depres.projectArtifacts" ) private String projectArtifacts; /** * The Maven projects in the reactor. - * - * @parameter default-value="${reactorProjects}" - * @readonly */ - private List reactorProjects; + @Parameter( defaultValue = "${reactorProjects}", readonly = true ) + private List reactorProjects; /** * Runs this mojo. @@ -68,10 +65,8 @@ public class AggregateTestMojo { try { - for ( Object reactorProject : reactorProjects ) + for ( MavenProject project : reactorProjects ) { - MavenProject project = (MavenProject) reactorProject; - writeArtifacts( filter( projectArtifacts, project ), project.getArtifacts() ); // NOTE: We can't make any assumptions about the class path but as a minimum it must not cause an diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/CompileMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/CompileMojo.java index 13d42c014a..a39d921bb9 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/CompileMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/CompileMojo.java @@ -21,16 +21,17 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; /** * Creates text files that list the dependencies with scope compile in the order returned from the Maven core. * - * @goal compile - * @requiresDependencyCollection compile - * * @author Benjamin Bentmann * */ +@Mojo( name = "compile", requiresDependencyCollection = ResolutionScope.COMPILE ) public class CompileMojo extends AbstractDependencyMojo { @@ -40,18 +41,16 @@ public class CompileMojo * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. Unlike the compile artifacts, the collection of project artifacts additionally contains those artifacts * that do not contribute to the class path. - * - * @parameter property="depres.projectArtifacts" */ + @Parameter( property = "depres.projectArtifacts" ) private String projectArtifacts; /** * The path to the output file for the compile artifacts, relative to the project base directory. Each line of this * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. - * - * @parameter property="depres.compileArtifacts" */ + @Parameter( property = "depres.compileArtifacts" ) private String compileArtifacts; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/RuntimeMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/RuntimeMojo.java index 08a1042e5b..b1892f016f 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/RuntimeMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/RuntimeMojo.java @@ -21,16 +21,17 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; /** * Creates text files that list the dependencies with scope runtime in the order returned from the Maven core. * - * @goal runtime - * @requiresDependencyCollection runtime - * * @author Benjamin Bentmann * */ +@Mojo( name = "runtime", requiresDependencyCollection = ResolutionScope.RUNTIME ) public class RuntimeMojo extends AbstractDependencyMojo { @@ -40,18 +41,16 @@ public class RuntimeMojo * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. Unlike the runtime artifacts, the collection of project artifacts additionally contains those artifacts * that do not contribute to the class path. - * - * @parameter property="depres.projectArtifacts" */ + @Parameter( property = "depres.projectArtifacts" ) private String projectArtifacts; /** * The path to the output file for the runtime artifacts, relative to the project base directory. Each line of this * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. - * - * @parameter property="depres.runtimeArtifacts" */ + @Parameter( property = "depres.runtimeArtifacts" ) private String runtimeArtifacts; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/TestMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/TestMojo.java index adb3da05ab..cfd76cda63 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/TestMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-collection/src/main/java/org/apache/maven/plugin/coreit/TestMojo.java @@ -21,16 +21,17 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; /** * Creates text files that list the dependencies with scope test in the order returned from the Maven core. * - * @goal test - * @requiresDependencyCollection test - * * @author Benjamin Bentmann * */ +@Mojo( name = "test", requiresDependencyCollection = ResolutionScope.TEST ) public class TestMojo extends AbstractDependencyMojo { @@ -40,18 +41,16 @@ public class TestMojo * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. Unlike the test artifacts, the collection of project artifacts additionally contains those artifacts that * do not contribute to the class path. - * - * @parameter property="depres.projectArtifacts" */ + @Parameter( property = "depres.projectArtifacts" ) private String projectArtifacts; /** * The path to the output file for the test artifacts, relative to the project base directory. Each line of this * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. - * - * @parameter property="depres.testArtifacts" */ + @Parameter( property = "depres.testArtifacts" ) private String testArtifacts; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/pom.xml index ab3f1f97d3..897056c133 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/pom.xml @@ -46,25 +46,26 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.1.0 + maven-core provided - + org.apache.maven - maven-core - 2.1.0 + maven-compat provided org.apache.maven maven-artifact - 2.0 provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/AbstractDependencyMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/AbstractDependencyMojo.java index 0bbd86ba28..fc082634c8 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/AbstractDependencyMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/AbstractDependencyMojo.java @@ -22,6 +22,7 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.BufferedWriter; @@ -48,11 +49,8 @@ public abstract class AbstractDependencyMojo /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", required = true, readonly = true ) protected MavenProject project; /** @@ -61,9 +59,8 @@ public abstract class AbstractDependencyMojo * this parameter to 1 to keep only the simple file name. The trimmed down paths will always use the forward slash * as directory separator. For non-positive values, the full/absolute path is returned, using the platform-specific * separator. - * - * @parameter property="depres.significantPathLevels" */ + @Parameter( property = "depres.significantPathLevels" ) private int significantPathLevels; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/AggregateTestMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/AggregateTestMojo.java index f52bee98cf..ade5bf0394 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/AggregateTestMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/AggregateTestMojo.java @@ -21,6 +21,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; import org.apache.maven.project.MavenProject; import java.util.List; @@ -31,11 +34,8 @@ import java.util.List; * dependencies are dumped. * * @author Benjamin Bentmann - * - * @goal aggregate-test - * @requiresDependencyResolution test - * @aggregator true */ +@Mojo( name = "aggregate-test", requiresDependencyResolution = ResolutionScope.TEST, aggregator = true ) public class AggregateTestMojo extends AbstractDependencyMojo { @@ -45,36 +45,31 @@ public class AggregateTestMojo * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. Unlike the test artifacts, the collection of project artifacts additionally contains those artifacts that * do not contribute to the class path. - * - * @parameter property="depres.projectArtifacts" */ + @Parameter( property = "depres.projectArtifacts" ) private String projectArtifacts; /** * The path to the output file for the test class path, relative to the project base directory. Each line of * this UTF-8 encoded file specifies the absolute path to a class path element. If not specified, the class path * will not be written to disk. - * - * @parameter property="depres.testClassPath" */ + @Parameter( property = "depres.testClassPath" ) private String testClassPath; /** * The path to the properties file for the checksums of the test class path elements, relative to the project base * directory. The (trimmed) path to a JAR is used as the property key, the property value is the SHA-1 hash of the * JAR. If not specified, the class path checksums will not be calculated. - * - * @parameter property="depres.testClassPathChecksums" */ + @Parameter( property = "depres.testClassPathChecksums" ) private String testClassPathChecksums; /** * The Maven projects in the reactor. - * - * @parameter default-value="${reactorProjects}" - * @readonly */ - private List reactorProjects; + @Parameter( defaultValue = "${reactorProjects}", readonly = true ) + private List reactorProjects; /** * Runs this mojo. @@ -86,10 +81,8 @@ public class AggregateTestMojo { try { - for ( Object reactorProject : reactorProjects ) + for ( MavenProject project : reactorProjects ) { - MavenProject project = (MavenProject) reactorProject; - writeArtifacts( filter( projectArtifacts, project ), project.getArtifacts() ); writeClassPath( filter( testClassPath, project ), project.getTestClasspathElements() ); writeClassPathChecksums( filter( testClassPathChecksums, project ), diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/CompileMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/CompileMojo.java index d50042dafc..cca2c25880 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/CompileMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/CompileMojo.java @@ -21,18 +21,19 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; /** * Creates text files that list the dependencies with scope compile in the order returned from the Maven core. The path * parameters of this mojo support the token @idx@ to dynamically insert a running index in order * to distinguish multiple executions of the same mojo. * - * @goal compile - * @requiresDependencyResolution compile - * * @author Benjamin Bentmann * */ +@Mojo( name = "compile", requiresDependencyResolution = ResolutionScope.COMPILE ) public class CompileMojo extends AbstractDependencyMojo { @@ -42,36 +43,32 @@ public class CompileMojo * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. Unlike the compile artifacts, the collection of project artifacts additionally contains those artifacts * that do not contribute to the class path. - * - * @parameter property="depres.projectArtifacts" */ + @Parameter( property = "depres.projectArtifacts" ) private String projectArtifacts; /** * The path to the output file for the compile artifacts, relative to the project base directory. Each line of this * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. - * - * @parameter property="depres.compileArtifacts" */ + @Parameter( property = "depres.compileArtifacts" ) private String compileArtifacts; /** * The path to the output file for the compile class path, relative to the project base directory. Each line of * this UTF-8 encoded file specifies the absolute path to a class path element. If not specified, the class path * will not be written to disk. - * - * @parameter property="depres.compileClassPath" */ + @Parameter( property = "depres.compileClassPath" ) private String compileClassPath; /** * The path to the properties file for the checksums of the compile class path elements, relative to the project * base directory. The (trimmed) path to a JAR is used as the property key, the property value is the SHA-1 hash of * the JAR. If not specified, the class path checksums will not be calculated. - * - * @parameter property="depres.compileClassPathChecksums" */ + @Parameter( property = "depres.compileClassPathChecksums" ) private String compileClassPathChecksums; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/CompileRuntimeMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/CompileRuntimeMojo.java index 13f2d78f6a..367e15341d 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/CompileRuntimeMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/CompileRuntimeMojo.java @@ -21,18 +21,19 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; /** * Creates text files that list the dependencies with scope compile and runtime in the order returned from the Maven * core. The path parameters of this mojo support the token @idx@ to dynamically insert a running * index in order to distinguish multiple executions of the same mojo. * - * @goal compile-runtime - * @requiresDependencyResolution compile+runtime - * * @author Benjamin Bentmann * */ +@Mojo( name = "compile-runtime", requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME ) public class CompileRuntimeMojo extends AbstractDependencyMojo { @@ -42,63 +43,56 @@ public class CompileRuntimeMojo * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. Unlike the compile artifacts, the collection of project artifacts additionally contains those artifacts * that do not contribute to the class path. - * - * @parameter property="depres.projectArtifacts" */ + @Parameter( property = "depres.projectArtifacts" ) private String projectArtifacts; /** * The path to the output file for the compile artifacts, relative to the project base directory. Each line of this * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. - * - * @parameter property="depres.compileArtifacts" */ + @Parameter( property = "depres.compileArtifacts" ) private String compileArtifacts; /** * The path to the output file for the compile class path, relative to the project base directory. Each line of * this UTF-8 encoded file specifies the absolute path to a class path element. If not specified, the class path * will not be written to disk. - * - * @parameter property="depres.compileClassPath" */ + @Parameter( property = "depres.compileClassPath" ) private String compileClassPath; /** * The path to the properties file for the checksums of the compile class path elements, relative to the project * base directory. The (trimmed) path to a JAR is used as the property key, the property value is the SHA-1 hash of * the JAR. If not specified, the class path checksums will not be calculated. - * - * @parameter property="depres.compileClassPathChecksums" */ + @Parameter( property = "depres.compileClassPathChecksums" ) private String compileClassPathChecksums; /** * The path to the output file for the runtime artifacts, relative to the project base directory. Each line of this * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. - * - * @parameter property="depres.runtimeArtifacts" */ + @Parameter( property = "depres.runtimeArtifacts" ) private String runtimeArtifacts; /** * The path to the output file for the runtime class path, relative to the project base directory. Each line of * this UTF-8 encoded file specifies the absolute path to a class path element. If not specified, the class path * will not be written to disk. - * - * @parameter property="depres.runtimeClassPath" */ + @Parameter( property = "depres.runtimeClassPath" ) private String runtimeClassPath; /** * The path to the properties file for the checksums of the runtime class path elements, relative to the project * base directory. The (trimmed) path to a JAR is used as the property key, the property value is the SHA-1 hash of * the JAR. If not specified, the class path checksums will not be calculated. - * - * @parameter property="depres.runtimeClassPathChecksums" */ + @Parameter( property = "depres.runtimeClassPathChecksums" ) private String runtimeClassPathChecksums; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/ForkTestMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/ForkTestMojo.java index ec2d1eab9b..189bfea434 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/ForkTestMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/ForkTestMojo.java @@ -21,16 +21,17 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Execute; +import org.apache.maven.plugins.annotations.Mojo; /** * Forks the "test" mojo to check interplay of forking and dependency resolution. * - * @goal fork-test - * @execute goal="test" - * * @author Benjamin Bentmann * */ +@Mojo( name = "fork-test" ) +@Execute( goal = "test" ) public class ForkTestMojo extends AbstractMojo { diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/InjectMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/InjectMojo.java index 56841ce9f0..e7a8328e19 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/InjectMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/InjectMojo.java @@ -23,6 +23,9 @@ import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.util.Arrays; @@ -35,8 +38,8 @@ import java.util.Set; * * @author Benjamin Bentmann * - * @goal inject */ +@Mojo( name = "inject" ) public class InjectMojo extends AbstractMojo { @@ -44,31 +47,25 @@ public class InjectMojo /** * The version-less keys in the form groupId:artifactId of the plugin artifacts to inject into * dependency artifacts of the project. - * - * @parameter */ + @Parameter private String[] artifacts; /** - * @parameter default-value="${plugin.artifacts}" - * @readonly */ + @Parameter( defaultValue = "${plugin.artifacts}", readonly = true ) private Collection pluginArtifacts; /** * The current Maven project. - * - * @parameter default-value="${project}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project}", readonly = true, required = true ) private MavenProject project; /** * The artifact factory. - * - * @component */ + @Component private ArtifactFactory factory; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/ResolveOneDependencyMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/ResolveOneDependencyMojo.java index b99b9e7a4f..87f32760ef 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/ResolveOneDependencyMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/ResolveOneDependencyMojo.java @@ -29,6 +29,10 @@ import org.apache.maven.artifact.resolver.ArtifactResolver; import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter; import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; import org.apache.maven.project.MavenProject; import java.io.File; @@ -39,93 +43,73 @@ import java.util.Set; * Attempts to resolve a single artifact from dependencies, and logs the results for the Verifier to look at. * * @author bimargulies - * - * @goal resolve-one-dependency - * @requiresDependencyResolution runtime */ +@Mojo( name = "resolve-one-dependency", requiresDependencyResolution = ResolutionScope.RUNTIME ) public class ResolveOneDependencyMojo extends AbstractDependencyMojo { /** * Group ID of the artifact to resolve. - * - * @parameter - * @required */ + @Parameter( required = true ) private String groupId; /** * Artifact ID of the artifact to resolve. - * - * @parameter - * @required */ + @Parameter( required = true ) private String artifactId; /** * Version of the artifact to resolve. - * - * @parameter - * @required */ + @Parameter( required = true ) private String version; /** * Type of the artifact to resolve. - * - * @parameter - * @required */ + @Parameter( required = true ) private String type; /** * Classifier of the artifact to resolve. - * - * @parameter */ + @Parameter private String classifier; /** * The scope to resolve for. - * - * @parameter - * @required */ + @Parameter( required = true ) private String scope; /** - * @parameter default-value="${project}" - * @required */ + @Parameter( defaultValue = "${project}", required = true ) MavenProject project; /** - * @component */ + @Component private ArtifactResolver resolver; /** - * @component - * @readonly - * @required */ + @Component private ArtifactFactory artifactFactory; /** * The Maven session. - * - * @parameter default-value="${session}" - * @readonly - * @required */ + @Parameter( defaultValue = "${session}", required = true, readonly = true ) private MavenSession session; /** * Metadata source object. - * - * @component */ + @Component private ArtifactMetadataSource metadataSource; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/RuntimeMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/RuntimeMojo.java index 0d8be7f8f4..f4ee93087c 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/RuntimeMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/RuntimeMojo.java @@ -21,18 +21,19 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; /** * Creates text files that list the dependencies with scope runtime in the order returned from the Maven core. The path * parameters of this mojo support the token @idx@ to dynamically insert a running index in order * to distinguish multiple executions of the same mojo. * - * @goal runtime - * @requiresDependencyResolution runtime - * * @author Benjamin Bentmann * */ +@Mojo( name = "runtime", requiresDependencyResolution = ResolutionScope.RUNTIME ) public class RuntimeMojo extends AbstractDependencyMojo { @@ -42,36 +43,32 @@ public class RuntimeMojo * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. Unlike the runtime artifacts, the collection of project artifacts additionally contains those artifacts * that do not contribute to the class path. - * - * @parameter property="depres.projectArtifacts" */ + @Parameter( property = "depres.projectArtifacts" ) private String projectArtifacts; /** * The path to the output file for the runtime artifacts, relative to the project base directory. Each line of this * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. - * - * @parameter property="depres.runtimeArtifacts" */ + @Parameter( property = "depres.runtimeArtifacts" ) private String runtimeArtifacts; /** * The path to the output file for the runtime class path, relative to the project base directory. Each line of * this UTF-8 encoded file specifies the absolute path to a class path element. If not specified, the class path * will not be written to disk. - * - * @parameter property="depres.runtimeClassPath" */ + @Parameter( property = "depres.runtimeClassPath" ) private String runtimeClassPath; /** * The path to the properties file for the checksums of the runtime class path elements, relative to the project * base directory. The (trimmed) path to a JAR is used as the property key, the property value is the SHA-1 hash of * the JAR. If not specified, the class path checksums will not be calculated. - * - * @parameter property="depres.runtimeClassPathChecksums" */ + @Parameter( property = "depres.runtimeClassPathChecksums" ) private String runtimeClassPathChecksums; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/TestMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/TestMojo.java index 85e9ebe6fa..60ba7b98f9 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/TestMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-dependency-resolution/src/main/java/org/apache/maven/plugin/coreit/TestMojo.java @@ -21,18 +21,19 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; /** * Creates text files that list the dependencies with scope test in the order returned from the Maven core. The path * parameters of this mojo support the token @idx@ to dynamically insert a running index in order * to distinguish multiple executions of the same mojo. * - * @goal test - * @requiresDependencyResolution test - * * @author Benjamin Bentmann * */ +@Mojo( name = "test", requiresDependencyResolution = ResolutionScope.TEST ) public class TestMojo extends AbstractDependencyMojo { @@ -42,9 +43,8 @@ public class TestMojo * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. Unlike the test artifacts, the collection of project artifacts additionally contains those artifacts that * do not contribute to the class path. - * - * @parameter property="depres.projectArtifacts" */ + @Parameter( property = "depres.projectArtifacts" ) private String projectArtifacts; /** @@ -52,36 +52,32 @@ public class TestMojo * of this UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be * written to disk. Unlike the test artifacts, the collection of direct project artifacts additionally contains * those artifacts that do not contribute to the class path. - * - * @parameter property="depres.dependencyArtifacts" */ + @Parameter( property = "depres.dependencyArtifacts" ) private String dependencyArtifacts; /** * The path to the output file for the test artifacts, relative to the project base directory. Each line of this * UTF-8 encoded file specifies an artifact identifier. If not specified, the artifact list will not be written to * disk. - * - * @parameter property="depres.testArtifacts" */ + @Parameter( property = "depres.testArtifacts" ) private String testArtifacts; /** * The path to the output file for the test class path, relative to the project base directory. Each line of * this UTF-8 encoded file specifies the absolute path to a class path element. If not specified, the class path * will not be written to disk. - * - * @parameter property="depres.testClassPath" */ + @Parameter( property = "depres.testClassPath" ) private String testClassPath; /** * The path to the properties file for the checksums of the test class path elements, relative to the project base * directory. The (trimmed) path to a JAR is used as the property key, the property value is the SHA-1 hash of the * JAR. If not specified, the class path checksums will not be calculated. - * - * @parameter property="depres.testClassPathChecksums" */ + @Parameter( property = "depres.testClassPathChecksums" ) private String testClassPathChecksums; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-error/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-error/pom.xml index ed94ba1c66..7928ff40d3 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-error/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-error/pom.xml @@ -46,7 +46,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided @@ -61,7 +65,6 @@ under the License. maven-jar-plugin - 2.2 **/org/apache/maven/plugin/coreit/MojoComponentLookupExceptionMojo* diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/MojoComponentLookupExceptionMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/MojoComponentLookupExceptionMojo.java index d824061487..6b23f0e504 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/MojoComponentLookupExceptionMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/MojoComponentLookupExceptionMojo.java @@ -22,11 +22,11 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Mojo; /** - * @goal mojo-component-lookup-exception - * @requiresProject false */ +@Mojo( name = "mojo-component-lookup-exception", requiresProject = false ) public class MojoComponentLookupExceptionMojo extends AbstractMojo { diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/MojoExecutionExceptionMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/MojoExecutionExceptionMojo.java index e0014f4f00..abb9e257a9 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/MojoExecutionExceptionMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/MojoExecutionExceptionMojo.java @@ -21,18 +21,16 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** - * @goal mojo-execution-exception - * @requiresProject false */ +@Mojo( name = "mojo-execution-exception", requiresProject = false ) public class MojoExecutionExceptionMojo extends AbstractMojo { - /** - * @parameter property="error.message" default-value="Planned MojoExecutionException." - * @required - */ + @Parameter( property = "error.message", defaultValue = "Planned MojoExecutionException.", required = true ) private String message; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/MojoFailureExceptionMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/MojoFailureExceptionMojo.java index 4810153eb8..b86a8308d1 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/MojoFailureExceptionMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/MojoFailureExceptionMojo.java @@ -21,11 +21,12 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** - * @goal mojo-failure-exception - * @requiresProject false */ +@Mojo( name = "mojo-failure-exception", requiresProject = false ) public class MojoFailureExceptionMojo extends AbstractMojo { @@ -33,23 +34,19 @@ public class MojoFailureExceptionMojo * Message used in {@link MojoFailureException#MojoFailureException(String)}, unless longMessage * is supplied; then, this becomes the short message in * {@link MojoFailureException#MojoFailureException(Object, String, String)}. - * - * @parameter property="error.message" default-value="Planned MojoExecutionException." - * @required */ + @Parameter( property = "error.message", defaultValue = "Planned MojoExecutionException.", required = true ) private String message; /** * If supplied, The form {@link MojoFailureException#MojoFailureException(Object, String, String)} will be used. - * - * @parameter property="error.longMessage" - * @required */ + @Parameter( property = "error.longMessage", required = true ) private String longMessage; /** - * @parameter property="error.source" */ + @Parameter( property = "error.source" ) private String source; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/NoClassDefFoundErrorComponentMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/NoClassDefFoundErrorComponentMojo.java index d220ffae93..cc0b4610cd 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/NoClassDefFoundErrorComponentMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/NoClassDefFoundErrorComponentMojo.java @@ -19,26 +19,26 @@ package org.apache.maven.plugin.coreit; * under the License. */ +import junit.framework.TestCase; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; -import junit.framework.TestCase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** * Takes a parameter with a class from a provided-scope dependency, so that the mojo class itself won't be * loadable when that dependency is missing (in the runtime environment). - * - * @goal no-class-def-found-error-param - * @requiresProject false */ +@Mojo( name = "no-class-def-found-error-param", requiresProject = false ) public class NoClassDefFoundErrorComponentMojo extends AbstractMojo { /** - * @parameter default-value="foo" */ + @Parameter( defaultValue = "foo" ) private TestCase value; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/NoClassDefFoundErrorInterfaceMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/NoClassDefFoundErrorInterfaceMojo.java index 6f88645e90..08f9254112 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/NoClassDefFoundErrorInterfaceMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/NoClassDefFoundErrorInterfaceMojo.java @@ -19,23 +19,21 @@ package org.apache.maven.plugin.coreit; * under the License. */ -import org.apache.maven.plugin.Mojo; +import junit.framework.TestCase; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugin.logging.Log; -import junit.framework.TestCase; +import org.apache.maven.plugins.annotations.Mojo; /** * Implements a class from a provided-scope dependency, so that the mojo class itself won't be * loadable when that dependency is missing (in the runtime environment). - * - * @goal no-class-def-found-error-mojo - * @requiresProject false */ +@Mojo( name = "no-class-def-found-error-mojo", requiresProject = false ) public class NoClassDefFoundErrorInterfaceMojo - extends TestCase - implements Mojo + extends TestCase + implements org.apache.maven.plugin.Mojo { private Log log; diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/RequirementComponentLookupExceptionMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/RequirementComponentLookupExceptionMojo.java index d1a7722fa3..bcc73d5a7f 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/RequirementComponentLookupExceptionMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-error/src/main/java/org/apache/maven/plugin/coreit/RequirementComponentLookupExceptionMojo.java @@ -19,23 +19,24 @@ package org.apache.maven.plugin.coreit; * under the License. */ +import junit.framework.TestCase; import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.Mojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.Mojo; /** - * @goal requirement-component-lookup-exception - * @requiresProject false */ +@Mojo( name = "requirement-component-lookup-exception", requiresProject = false ) public class RequirementComponentLookupExceptionMojo extends AbstractMojo { /** - * @component role="missing-component" roleHint="triggers-error" */ - private Mojo dependency; + @Component( role = TestCase.class, hint = "triggers-error" ) + private org.apache.maven.plugin.Mojo dependency; public void execute() throws MojoExecutionException, MojoFailureException diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-expression/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-expression/pom.xml index ae7c86cc9f..5776889650 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-expression/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-expression/pom.xml @@ -42,7 +42,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-expression/src/main/java/org/apache/maven/plugin/coreit/EvalMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-expression/src/main/java/org/apache/maven/plugin/coreit/EvalMojo.java index 5be9f80f4e..3c161cc3b9 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-expression/src/main/java/org/apache/maven/plugin/coreit/EvalMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-expression/src/main/java/org/apache/maven/plugin/coreit/EvalMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.IOException; @@ -55,82 +58,66 @@ import java.util.Properties; * * @author Benjamin Bentmann * - * @goal eval - * @phase initialize - */ + */ +@Mojo( name = "eval", defaultPhase = LifecyclePhase.INITIALIZE ) public class EvalMojo extends AbstractMojo { /** * The project's base directory, used for manual path translation. - * - * @parameter default-value="${basedir}" - * @readonly */ + @Parameter( defaultValue = "${basedir", readonly = true ) private File basedir; /** * The path to the output file for the properties with the expression values. For each expression given by the * parameter {@link #expressions}, a similar named properties key will be used to save the expression value. If an * expression evaluated to null, there will be no corresponding key in the properties file. - * - * @parameter property="expression.outputFile" */ + @Parameter( property = "expression.outputFile" ) private File outputFile; /** * The set of expressions to evaluate. - * - * @parameter */ + @Parameter private String[] expressions; /** * The comma separated set of expressions to evaluate. - * - * @parameter property="expression.expressions" */ + @Parameter( property = "expression.expressions" ) private String expressionList; /** * The current Maven project against which expressions are evaluated. - * - * @parameter default-value="${project}" - * @readonly */ + @Parameter( defaultValue = "${project}", readonly = true ) private Object project; /** * The forked Maven project against which expressions are evaluated. - * - * @parameter default-value="${executedProject}" - * @readonly */ + @Parameter( defaultValue = "${executedProject}", readonly = true ) private Object executedProject; /** * The merged user/global settings of the current build against which expressions are evaluated. - * - * @parameter default-value="${settings}" - * @readonly */ + @Parameter( defaultValue = "${settings}", readonly = true ) private Object settings; /** * The session context of the current build against which expressions are evaluated. - * - * @parameter default-value="${session}" - * @readonly */ + @Parameter( defaultValue = "${session}", readonly = true ) private Object session; /** * The local repository of the current build against which expressions are evaluated. - * - * @parameter default-value="${localRepository}" - * @readonly */ + @Parameter( defaultValue = "${localRepository}", readonly = true ) private Object localRepository; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-extension-consumer/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-extension-consumer/pom.xml index 4ec411794e..98ecae61f5 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-extension-consumer/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-extension-consumer/pom.xml @@ -45,7 +45,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-extension-consumer/src/main/java/org/apache/maven/plugin/coreit/UpdateSingletonMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-extension-consumer/src/main/java/org/apache/maven/plugin/coreit/UpdateSingletonMojo.java index 5e204a874a..40a11f7aa3 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-extension-consumer/src/main/java/org/apache/maven/plugin/coreit/UpdateSingletonMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-extension-consumer/src/main/java/org/apache/maven/plugin/coreit/UpdateSingletonMojo.java @@ -25,37 +25,40 @@ import java.io.IOException; import org.apache.maven.coreit.component.StatefulSingleton; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** * Updates the state of the singleton component and optionally dumps the updated state to a properties file. * - * @goal update-singleton - * @phase initialize - * + * * @author Benjamin Bentmann */ +@Mojo( name = "update-singleton", defaultPhase = LifecyclePhase.INITIALIZE ) public class UpdateSingletonMojo extends AbstractMojo { /** - * @parameter default-value="consumer" */ + @Parameter( defaultValue = "consumer" ) private String key; /** - * @parameter default-value="passed" */ + @Parameter( defaultValue = "passed" ) private String value; /** - * @parameter */ + @Parameter private File propertiesFile; /** - * @component */ + @Component private StatefulSingleton singleton; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-extension-provider/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-extension-provider/pom.xml index 368dc863a8..97d0895d89 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-extension-provider/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-extension-provider/pom.xml @@ -46,7 +46,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-extension-provider/src/main/java/org/apache/maven/plugin/coreit/UpdateSingletonMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-extension-provider/src/main/java/org/apache/maven/plugin/coreit/UpdateSingletonMojo.java index 76ba4b926e..c2ac3871db 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-extension-provider/src/main/java/org/apache/maven/plugin/coreit/UpdateSingletonMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-extension-provider/src/main/java/org/apache/maven/plugin/coreit/UpdateSingletonMojo.java @@ -25,37 +25,40 @@ import java.io.IOException; import org.apache.maven.coreit.component.StatefulSingleton; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** * Updates the state of the singleton component and optionally dumps the updated state to a properties file. * - * @goal update-singleton - * @phase initialize - * + * * @author Benjamin Bentmann */ +@Mojo( name = "update-singleton", defaultPhase = LifecyclePhase.INITIALIZE ) public class UpdateSingletonMojo extends AbstractMojo { /** - * @parameter default-value="provider" */ + @Parameter( defaultValue = "provider" ) private String key; /** - * @parameter default-value="passed" */ + @Parameter( defaultValue = "passed" ) private String value; /** - * @parameter */ + @Parameter private File propertiesFile; /** - * @component */ + @Component private StatefulSingleton singleton; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-extension1/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-extension1/pom.xml index 6fed5a2e1e..8e43200a65 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-extension1/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-extension1/pom.xml @@ -44,7 +44,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-extension1/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-extension1/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java index 2fc102afad..4522ece5d4 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-extension1/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-extension1/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java @@ -20,10 +20,11 @@ package org.apache.maven.plugin.coreit; */ import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugins.annotations.Mojo; /** - * @goal dummy - */ + */ +@Mojo( name = "dummy" ) public class CoreItMojo extends AbstractMojo { diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-extension2/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-extension2/pom.xml index f3990883b5..168ca5364a 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-extension2/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-extension2/pom.xml @@ -45,7 +45,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-extension2/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-extension2/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java index 2fc102afad..4522ece5d4 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-extension2/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-extension2/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java @@ -20,10 +20,11 @@ package org.apache.maven.plugin.coreit; */ import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugins.annotations.Mojo; /** - * @goal dummy - */ + */ +@Mojo( name = "dummy" ) public class CoreItMojo extends AbstractMojo { diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-fork/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-fork/pom.xml index da2b6e0b0d..77b7d6a8da 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-fork/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-fork/pom.xml @@ -42,13 +42,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkGoalAggregatorMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkGoalAggregatorMojo.java index 2b8a7a40d8..f4300056f1 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkGoalAggregatorMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkGoalAggregatorMojo.java @@ -21,34 +21,36 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Execute; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.util.List; /** - * @goal fork-goal-aggregator - * @aggregator true - * @execute goal="touch" */ +@Mojo( name = "fork-goal-aggregator", aggregator = true ) +@Execute( goal = "touch" ) public class ForkGoalAggregatorMojo extends AbstractMojo { /** - * @parameter default-value="${project}" */ + @Parameter( defaultValue = "${project}" ) private MavenProject project; /** - * @parameter default-value="${reactorProjects}" */ - private List reactorProjects; + @Parameter( defaultValue = "${reactorProjects}" ) + private List reactorProjects; public void execute() throws MojoExecutionException { - for ( Object reactorProject : reactorProjects ) + for ( MavenProject reactorProject : reactorProjects ) { - MavenProject executedProject = ( (MavenProject) reactorProject ).getExecutionProject(); + MavenProject executedProject = reactorProject.getExecutionProject(); if ( !executedProject.getBuild().getFinalName().equals( TouchMojo.FINAL_NAME ) ) { diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkGoalMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkGoalMojo.java index 2af4cc2a2a..cc9a5ac6da 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkGoalMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkGoalMojo.java @@ -21,24 +21,22 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Execute; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; /** - * @goal fork-goal - * - * @execute goal="touch" */ +@Mojo( name = "fork-goal" ) +@Execute( goal = "touch" ) public class ForkGoalMojo extends AbstractMojo { - /** - * @parameter default-value="${project}" - */ + @Parameter( defaultValue = "${project}" ) private MavenProject project; - /** - * @parameter default-value="${executedProject}" - */ + @Parameter( defaultValue = "${executedProject}" ) private MavenProject executedProject; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkLifecycleAggregatorMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkLifecycleAggregatorMojo.java index 038170d52a..75e57208fe 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkLifecycleAggregatorMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkLifecycleAggregatorMojo.java @@ -21,27 +21,26 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Execute; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.util.List; /** - * @goal fork-lifecycle-aggregator - * @aggregator true - * @execute phase="generate-sources" lifecycle="foo" */ +@Mojo( name = "fork-lifecycle-aggregator", aggregator = true ) +@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "foo" ) public class ForkLifecycleAggregatorMojo extends AbstractMojo { - /** - * @parameter default-value="${project}" - */ + @Parameter( defaultValue = "${project}" ) private MavenProject project; - /** - * @parameter default-value="${reactorProjects}" - */ + @Parameter( defaultValue = "${reactorProjects}" ) private List reactorProjects; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkLifecycleMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkLifecycleMojo.java index 217da54f30..c813cc4639 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkLifecycleMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkLifecycleMojo.java @@ -21,31 +21,28 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Execute; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; /** - * @goal fork - * - * @execute phase="generate-sources" lifecycle="foo" */ +@Mojo( name = "fork" ) +@Execute( phase = LifecyclePhase.GENERATE_RESOURCES, lifecycle = "foo" ) public class ForkLifecycleMojo extends AbstractMojo { - /** - * @parameter default-value="${project}" - */ + @Parameter( defaultValue = "${project}" ) private MavenProject project; - /** - * @parameter default-value="${executedProject}" - */ + @Parameter( defaultValue = "${executedProject}" ) private MavenProject executedProject; - /** - * @parameter default-value="${project.build.directory}" - */ + @Parameter( defaultValue = "${project.build.directory}" ) private File touchDirectory; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkLifecycleNoProjectMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkLifecycleNoProjectMojo.java index 112b14ce8d..473c11dbea 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkLifecycleNoProjectMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/ForkLifecycleNoProjectMojo.java @@ -21,27 +21,25 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Execute; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; /** - * @goal fork-lifecycle-no-project - * @requiresProject false - * - * @execute phase="generate-sources" lifecycle="foo" */ +@Mojo( name = "fork-lifecycle-no-project", requiresProject = false ) +@Execute( phase = LifecyclePhase.GENERATE_RESOURCES, lifecycle = "foo" ) public class ForkLifecycleNoProjectMojo extends AbstractMojo { - /** - * @parameter default-value="${project.build.finalName}" - */ + @Parameter( defaultValue = "${project.build.finalName}" ) private String finalName; - /** - * @parameter default-value="target" - */ + @Parameter( defaultValue = "target" ) private File touchDirectory; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/TouchMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/TouchMojo.java index 3c7f4b857d..0b71e12402 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/TouchMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-fork/src/main/java/org/apache/maven/plugin/coreit/TouchMojo.java @@ -21,6 +21,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -29,25 +32,18 @@ import java.io.OutputStreamWriter; import java.io.IOException; /** - * @goal touch - * - * @phase process-sources */ +@Mojo( name = "touch", defaultPhase = LifecyclePhase.PROCESS_RESOURCES ) public class TouchMojo extends AbstractMojo { static final String FINAL_NAME = "coreitified"; - /** - * @parameter default-value="${project}" - */ + @Parameter( defaultValue = "${project}" ) private MavenProject project; - /** - * @parameter default-value="${project.build.directory}" - * @required - */ + @Parameter( defaultValue = "${project.build.directory}", required = true ) private File outputDirectory; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-invalid-descriptor/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-invalid-descriptor/pom.xml index 9e27f3ac37..e8f7f84d62 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-invalid-descriptor/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-invalid-descriptor/pom.xml @@ -37,14 +37,12 @@ under the License. org.apache.maven maven-plugin-api - 2.0 provided - junit - junit - 3.8.1 - test + org.apache.maven.plugin-tools + maven-plugin-annotations + provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-invalid-descriptor/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-invalid-descriptor/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java index 82e88ffda1..c28ceba2e8 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-invalid-descriptor/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-invalid-descriptor/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java @@ -21,12 +21,13 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; /** - * @goal test * * @phase process-sources */ +@Mojo( name = "test" ) public class CoreItMojo extends AbstractMojo { diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/pom.xml index 58bd6ecb16..44f0a7bc34 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/pom.xml @@ -46,7 +46,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/src/main/java/org/apache/maven/plugin/coreit/AbstractLogMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/src/main/java/org/apache/maven/plugin/coreit/AbstractLogMojo.java index 7a5239683a..4c55c6b95b 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/src/main/java/org/apache/maven/plugin/coreit/AbstractLogMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/src/main/java/org/apache/maven/plugin/coreit/AbstractLogMojo.java @@ -21,6 +21,7 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Parameter; import java.io.BufferedWriter; import java.io.File; @@ -41,17 +42,14 @@ public abstract class AbstractLogMojo /** * The project's base directory, used for manual path translation. - * - * @parameter default-value="${basedir}" - * @readonly */ + @Parameter( defaultValue = "${basedir}", readonly = true ) private File basedir; /** * The path to the output file, relative to the project's base directory. - * - * @parameter property="log.logFile" */ + @Parameter( property = "log.logFile" ) private File logFile; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/src/main/java/org/apache/maven/plugin/coreit/LogSeparatorMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/src/main/java/org/apache/maven/plugin/coreit/LogSeparatorMojo.java index 684d4f74fc..55f590d186 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/src/main/java/org/apache/maven/plugin/coreit/LogSeparatorMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/src/main/java/org/apache/maven/plugin/coreit/LogSeparatorMojo.java @@ -20,24 +20,25 @@ package org.apache.maven.plugin.coreit; */ import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** * Appends a separator line to the log file. * * @author Benjamin Bentmann * - * @goal log-separator - * @phase initialize - */ + */ +@Mojo( name = "log-separator", defaultPhase = LifecyclePhase.INITIALIZE ) public class LogSeparatorMojo extends AbstractLogMojo { /** * The length of the separator line. - * - * @parameter property="log.length" default-value="80" */ + @Parameter( property = "log.length", defaultValue = "80" ) private int length; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/src/main/java/org/apache/maven/plugin/coreit/LogStringMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/src/main/java/org/apache/maven/plugin/coreit/LogStringMojo.java index 1cbca475e8..936077451b 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/src/main/java/org/apache/maven/plugin/coreit/LogStringMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/src/main/java/org/apache/maven/plugin/coreit/LogStringMojo.java @@ -20,25 +20,26 @@ package org.apache.maven.plugin.coreit; */ import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** * Appends a string to the log file. * - * @goal log-string - * @phase initialize - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "log-string", defaultPhase = LifecyclePhase.INITIALIZE ) public class LogStringMojo extends AbstractLogMojo { /** * The string to append to the log file. - * - * @parameter property="log.string" */ + @Parameter( property = "log.string" ) private String string; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/src/main/java/org/apache/maven/plugin/coreit/ResetMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/src/main/java/org/apache/maven/plugin/coreit/ResetMojo.java index 3c2a32e252..97e43cc183 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/src/main/java/org/apache/maven/plugin/coreit/ResetMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-log-file/src/main/java/org/apache/maven/plugin/coreit/ResetMojo.java @@ -20,16 +20,17 @@ package org.apache.maven.plugin.coreit; */ import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; /** * Clears the contents of the log file by creating a new empty log file. * - * @goal reset - * @phase initialize - * + * * @author Benjamin Bentmann * */ +@Mojo( name = "reset", defaultPhase = LifecyclePhase.INITIALIZE ) public class ResetMojo extends AbstractLogMojo { diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-log4j/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-log4j/pom.xml index 22bd59abb3..816d44c32f 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-log4j/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-log4j/pom.xml @@ -46,13 +46,21 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven maven-artifact - 2.0 + provided + + + org.apache.maven + maven-compat provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-log4j/src/main/java/org/apache/maven/plugin/coreit/ItMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-log4j/src/main/java/org/apache/maven/plugin/coreit/ItMojo.java index 0b0e532ada..9073ded940 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-log4j/src/main/java/org/apache/maven/plugin/coreit/ItMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-log4j/src/main/java/org/apache/maven/plugin/coreit/ItMojo.java @@ -29,56 +29,45 @@ import org.apache.maven.artifact.resolver.ArtifactResolver; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** * Resolves an artifact and has an (unused) dependency on log4j. * - * @goal it * * @author Benjamin Bentmann * */ +@Mojo( name = "it" ) public class ItMojo extends AbstractMojo { /** - * @component */ + @Component private ArtifactFactory artifactFactory; /** - * @component */ + @Component private ArtifactResolver artifactResolver; - /** - * @parameter default-value="${localRepository}" - * @required - * @readonly - */ + @Parameter( defaultValue = "${localRepository}", required = true, readonly = true ) private ArtifactRepository localRepository; - /** - * @parameter default-value="${project.remoteArtifactRepositories}" - * @required - * @readonly - */ + @Parameter( defaultValue = "${project.remoteArtifactRepositories}", required = true, readonly = true ) private List remoteRepositories; - /** - * @parameter default-value="test" - */ + @Parameter( defaultValue = "test" ) private String groupId; - /** - * @parameter default-value="test" - */ + @Parameter( defaultValue = "test" ) private String artifactId; - /** - * @parameter default-value="1.0" - */ + @Parameter( defaultValue = "1.0" ) private String version; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-model-interpolation/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-model-interpolation/pom.xml index ed393266bc..b59645d9dc 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-model-interpolation/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-model-interpolation/pom.xml @@ -38,13 +38,21 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.1.0 + maven-core + provided + + + org.apache.maven + maven-compat provided @@ -57,10 +65,6 @@ under the License. org.apache.maven.shared maven-verifier - - org.apache.maven - maven-artifact - junit junit diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-model-interpolation/src/main/java/org/apache/maven/plugin/coreit/PathInterpolationMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-model-interpolation/src/main/java/org/apache/maven/plugin/coreit/PathInterpolationMojo.java index fdca914236..5016de7d00 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-model-interpolation/src/main/java/org/apache/maven/plugin/coreit/PathInterpolationMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-model-interpolation/src/main/java/org/apache/maven/plugin/coreit/PathInterpolationMojo.java @@ -21,6 +21,10 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.DefaultProjectBuilderConfiguration; import org.apache.maven.project.MavenProject; import org.apache.maven.project.interpolation.ModelInterpolationException; @@ -29,23 +33,21 @@ import org.apache.maven.project.interpolation.ModelInterpolator; import java.util.Properties; /** - * @goal path-interpolation - * @phase validate - */ + */ +@Mojo( name = "path-interpolation", defaultPhase = LifecyclePhase.VALIDATE ) public class PathInterpolationMojo extends AbstractMojo { /** * The model interpolator - * @component */ + @Component private ModelInterpolator modelInterpolator; /** * The current Maven project. - * - * @parameter default-value="${project}" */ + @Parameter( defaultValue = "${project}" ) private MavenProject project; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/pom.xml index 762d6e11f5..7fe0dbaf77 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/pom.xml @@ -46,7 +46,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/java/org/apache/maven/plugin/coreit/ConcreteComponent.java b/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/java/org/apache/maven/plugin/coreit/ConcreteTestComponent.java similarity index 86% rename from its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/java/org/apache/maven/plugin/coreit/ConcreteComponent.java rename to its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/java/org/apache/maven/plugin/coreit/ConcreteTestComponent.java index 4e2f75615f..e9aa665a85 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/java/org/apache/maven/plugin/coreit/ConcreteComponent.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/java/org/apache/maven/plugin/coreit/ConcreteTestComponent.java @@ -26,9 +26,9 @@ import org.codehaus.plexus.component.annotations.Component; * * @author Benjamin Bentmann */ -@Component ( role = org.apache.maven.plugin.coreit.Component.class, hint = "concrete" ) -public class ConcreteComponent - implements org.apache.maven.plugin.coreit.Component +@Component ( role = TestComponent.class, hint = "concrete" ) +public class ConcreteTestComponent + implements TestComponent { public String getId() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/java/org/apache/maven/plugin/coreit/ItMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/java/org/apache/maven/plugin/coreit/ItMojo.java index 01f0555f21..7c8a3ad549 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/java/org/apache/maven/plugin/coreit/ItMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/java/org/apache/maven/plugin/coreit/ItMojo.java @@ -21,6 +21,10 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.FileOutputStream; @@ -32,26 +36,24 @@ import java.util.Properties; * * @author Benjamin Bentmann * - * @goal it - * @phase initialize - */ + */ +@Mojo( name = "it", defaultPhase = LifecyclePhase.INITIALIZE ) public class ItMojo extends AbstractMojo { /** * The path to the output file. - * - * @parameter property="touch.outputFile" default-value="target/comp.properties" */ + @Parameter( property = "touch.outputFile", defaultValue = "target/comp.properties" ) private File outputFile; /** * NOTE: We don't specify a role hint here! * - * @component */ - private Component component; + @Component + private TestComponent component; /** * Runs this mojo. diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/java/org/apache/maven/plugin/coreit/Component.java b/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/java/org/apache/maven/plugin/coreit/TestComponent.java similarity index 96% rename from its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/java/org/apache/maven/plugin/coreit/Component.java rename to its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/java/org/apache/maven/plugin/coreit/TestComponent.java index 3e4af15b8f..de3256fad5 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/java/org/apache/maven/plugin/coreit/Component.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/java/org/apache/maven/plugin/coreit/TestComponent.java @@ -24,7 +24,7 @@ package org.apache.maven.plugin.coreit; * * @author Benjamin Bentmann */ -public interface Component +public interface TestComponent { String getId(); diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/resources/META-INF/plexus/components.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/resources/META-INF/plexus/components.xml index 6c292e22d9..10b0935472 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/resources/META-INF/plexus/components.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/resources/META-INF/plexus/components.xml @@ -20,10 +20,10 @@ under the License. - org.apache.maven.plugin.coreit.Component + org.apache.maven.plugin.coreit.TestComponent concrete - org.apache.maven.plugin.coreit.ConcreteComponent + org.apache.maven.plugin.coreit.ConcreteTestComponent singleton diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-no-project/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-no-project/pom.xml index bff50cfe89..176d0464c5 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-no-project/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-no-project/pom.xml @@ -42,7 +42,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-no-project/src/main/java/org/apache/maven/plugin/coreit/NoProjectMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-no-project/src/main/java/org/apache/maven/plugin/coreit/NoProjectMojo.java index 65757a740c..cee2e79990 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-no-project/src/main/java/org/apache/maven/plugin/coreit/NoProjectMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-no-project/src/main/java/org/apache/maven/plugin/coreit/NoProjectMojo.java @@ -21,6 +21,8 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.FileWriter; @@ -28,23 +30,19 @@ import java.io.IOException; /** * Mojo which touches a file without requiring a project. - * - * @goal light-touch - * @requiresProject false - * */ +@Mojo( name = "light-touch", requiresProject = false ) public class NoProjectMojo extends AbstractMojo { /** - * @parameter default-value="${project.build.directory}" - * @required */ + @Parameter( defaultValue = "${project.build.directory}", required = true ) private String outputDirectory; /** - * @parameter default-value="target/test-basedir-alignment" */ + @Parameter( defaultValue = "target/test-basedir-alignment" ) private File basedirAlignmentDirectory; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-online/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-online/pom.xml index 001e1f98e7..5a90c034d0 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-online/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-online/pom.xml @@ -45,7 +45,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-online/src/main/java/org/apache/maven/plugin/coreit/TouchMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-online/src/main/java/org/apache/maven/plugin/coreit/TouchMojo.java index 2b4b3ef0d9..4b79f0d8b6 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-online/src/main/java/org/apache/maven/plugin/coreit/TouchMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-online/src/main/java/org/apache/maven/plugin/coreit/TouchMojo.java @@ -21,6 +21,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.IOException; @@ -28,21 +31,17 @@ import java.io.IOException; /** * Creates an empty file with a user-specified name. NOTE: This mojo requires online mode. * - * @goal touch - * @phase validate - * @requiresOnline true - * * @author Benjamin Bentmann */ +@Mojo( name = "touch", defaultPhase = LifecyclePhase.VALIDATE, requiresOnline = true ) public class TouchMojo extends AbstractMojo { /** * The path to the output file. - * - * @parameter property="touch.outputFile" default-value="target/touch.txt" */ + @Parameter( property = "touch.outputFile", defaultValue = "target/touch.txt" ) private File outputFile; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-optional-mojos/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-optional-mojos/pom.xml index 13efb547bc..a4d8fd55e2 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-optional-mojos/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-optional-mojos/pom.xml @@ -45,7 +45,6 @@ under the License. org.apache.maven maven-plugin-api - 3.0 provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-packaging/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-packaging/pom.xml index 40971dc17b..60044e05af 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-packaging/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-packaging/pom.xml @@ -45,7 +45,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-packaging/src/main/java/org/apache/maven/plugin/coreit/AppendMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-packaging/src/main/java/org/apache/maven/plugin/coreit/AppendMojo.java index 870a2df265..a82e85972b 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-packaging/src/main/java/org/apache/maven/plugin/coreit/AppendMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-packaging/src/main/java/org/apache/maven/plugin/coreit/AppendMojo.java @@ -21,6 +21,8 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.FileOutputStream; @@ -31,20 +33,20 @@ import java.io.OutputStreamWriter; * Appends a message to a UTF-8 encoded plain text file. * * @author Benjamin Bentmann - * @goal append - */ + */ +@Mojo( name = "append" ) public class AppendMojo extends AbstractMojo { /** - * @parameter property="append.message" */ + @Parameter( property = "append.message" ) private String message; /** - * @parameter default-value="${project.build.directory}/log.txt" */ + @Parameter( defaultValue = "${project.build.directory}/log.txt" ) private File outputFile; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-packaging/src/main/java/org/apache/maven/plugin/coreit/PackagingMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-packaging/src/main/java/org/apache/maven/plugin/coreit/PackagingMojo.java index 59ffa0b8bd..dea39210bd 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-packaging/src/main/java/org/apache/maven/plugin/coreit/PackagingMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-packaging/src/main/java/org/apache/maven/plugin/coreit/PackagingMojo.java @@ -21,6 +21,8 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.IOException; @@ -30,23 +32,20 @@ import java.io.IOException; * * @author Brett Porter * - * @goal package - */ + */ +@Mojo( name = "package" ) public class PackagingMojo extends AbstractMojo { /** - * @parameter default-value="${project.build.finalName}" - * @required */ + @Parameter( defaultValue = "${project.build.finalName}", required = true ) private String finalName; /** - * @parameter default-value="${project.build.directory}" - * @required - * @readonly */ + @Parameter( defaultValue = "${project.build.directory}", required = true, readonly = true ) private File outputDirectory; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-parameter-implementation/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-parameter-implementation/pom.xml deleted file mode 100644 index 5fc723cb01..0000000000 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-parameter-implementation/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - 4.0.0 - - - maven-it-plugins - org.apache.maven.its.plugins - 2.1-SNAPSHOT - - - maven-it-plugin-parameter-implementation - maven-plugin - - Maven IT Plugin :: Parameter Implementation - 2006 - - - true - - - - - org.apache.maven - maven-plugin-api - 2.0 - provided - - - diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-parameter-implementation/src/main/java/org/apache/maven/plugin/coreit/AnInterface.java b/its/core-it-support/core-it-plugins/maven-it-plugin-parameter-implementation/src/main/java/org/apache/maven/plugin/coreit/AnInterface.java deleted file mode 100644 index ba45370c26..0000000000 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-parameter-implementation/src/main/java/org/apache/maven/plugin/coreit/AnInterface.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.apache.maven.plugin.coreit; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - */ -public interface AnInterface -{ -} diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-parameter-implementation/src/main/java/org/apache/maven/plugin/coreit/ParameterImplementationMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-parameter-implementation/src/main/java/org/apache/maven/plugin/coreit/ParameterImplementationMojo.java deleted file mode 100644 index 75fb15f028..0000000000 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-parameter-implementation/src/main/java/org/apache/maven/plugin/coreit/ParameterImplementationMojo.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.apache.maven.plugin.coreit; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.Properties; - -/** - * Check that we correctly use the implementation parameter. - * - * @goal param-implementation - */ -public class ParameterImplementationMojo - extends AbstractMojo -{ - - /** - * The path to the properties file for the parameter information. - * - * @parameter - */ - private File outputFile; - - /** - * A parameter whose type is an interface but with a default implementation class. - * - * @parameter implementation="org.apache.maven.plugin.coreit.sub.AnImplementation" - */ - private AnInterface theParameter; - - public void execute() - throws MojoExecutionException - { - Properties props = new Properties(); - - if ( theParameter != null ) - { - getLog().info( "[MAVEN-CORE-IT-LOG] theParameter = " + theParameter ); - - props.setProperty( "theParameter.class", theParameter.getClass().getName() ); - props.setProperty( "theParameter.string", theParameter.toString() ); - } - - getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file " + outputFile ); - - try - { - outputFile.getParentFile().mkdirs(); - - try ( FileOutputStream os = new FileOutputStream( outputFile ) ) - { - props.store( os, "[MAVEN-CORE-IT-LOG]" ); - } - } - catch ( IOException e ) - { - throw new MojoExecutionException( "Failed to create output file " + outputFile + ": " + e.getMessage(), e ); - } - - getLog().info( "[MAVEN-CORE-IT-LOG] Created output file " + outputFile ); - } - -} diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-parameter-implementation/src/main/java/org/apache/maven/plugin/coreit/sub/AnImplementation.java b/its/core-it-support/core-it-plugins/maven-it-plugin-parameter-implementation/src/main/java/org/apache/maven/plugin/coreit/sub/AnImplementation.java deleted file mode 100644 index 378d777926..0000000000 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-parameter-implementation/src/main/java/org/apache/maven/plugin/coreit/sub/AnImplementation.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.apache.maven.plugin.coreit.sub; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import org.apache.maven.plugin.coreit.AnInterface; - -/** - */ -public class AnImplementation - implements AnInterface -{ - private String field; - - public String getField() - { - return field; - } - - public void setField( String field ) - { - this.field = field; - } - - public String toString() - { - return getClass().getName() + "-" + field; - } -} diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-parameter-implementation/src/site/site.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-parameter-implementation/src/site/site.xml deleted file mode 100644 index 18f84c5769..0000000000 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-parameter-implementation/src/site/site.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-component-api/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-component-api/pom.xml index 780ec3e7a3..bcd9ab53fc 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-component-api/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-component-api/pom.xml @@ -43,7 +43,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-component-api/src/main/java/org/apache/maven/its/plugins/VelocityMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-component-api/src/main/java/org/apache/maven/its/plugins/VelocityMojo.java index fa1b403d91..2644bc65f7 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-component-api/src/main/java/org/apache/maven/its/plugins/VelocityMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-component-api/src/main/java/org/apache/maven/its/plugins/VelocityMojo.java @@ -22,18 +22,20 @@ package org.apache.maven.its.plugins; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; import org.codehaus.plexus.velocity.VelocityComponent; /** - * @goal velocity - * @phase validate - */ + */ +@Mojo( name = "velocity", defaultPhase = LifecyclePhase.VALIDATE ) public class VelocityMojo extends AbstractMojo { /** - * @component */ + @Component protected VelocityComponent velocityComponent; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-lifecycle/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-lifecycle/pom.xml index bbb3970538..04d11b7ccd 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-lifecycle/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-lifecycle/pom.xml @@ -38,7 +38,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-lifecycle/src/main/java/org/apache/maven/its/plugins/plexuslifecycle/MojoWithPlexusLifecycle.java b/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-lifecycle/src/main/java/org/apache/maven/its/plugins/plexuslifecycle/MojoWithPlexusLifecycle.java index b9f319562a..73e5a85f6b 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-lifecycle/src/main/java/org/apache/maven/its/plugins/plexuslifecycle/MojoWithPlexusLifecycle.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-lifecycle/src/main/java/org/apache/maven/its/plugins/plexuslifecycle/MojoWithPlexusLifecycle.java @@ -22,6 +22,9 @@ package org.apache.maven.its.plugins.plexuslifecycle; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; import org.codehaus.plexus.context.Context; import org.codehaus.plexus.context.ContextException; import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; @@ -29,18 +32,15 @@ import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable; /** * @author Olivier Lamy - * @goal do-nothing - * @phase validate */ +@Mojo( name = "do-nothing", defaultPhase = LifecyclePhase.VALIDATE ) public class MojoWithPlexusLifecycle extends AbstractMojo implements Contextualizable, Disposable { /** - * @component - * @throws MojoExecutionException - * @throws MojoFailureException */ + @Component private FakeComponent fakeComponent; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-11/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-11/pom.xml index bda3d07815..cb0317b31f 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-11/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-11/pom.xml @@ -42,14 +42,12 @@ under the License. org.apache.maven maven-plugin-api - 2.0 provided - junit - junit - 3.8.1 - test + org.apache.maven.plugin-tools + maven-plugin-annotations + provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-11/src/main/java/org/apache/maven/its/plugins/SerializeMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-11/src/main/java/org/apache/maven/its/plugins/SerializeMojo.java index ffb5d6c1eb..10170c8f77 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-11/src/main/java/org/apache/maven/its/plugins/SerializeMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-11/src/main/java/org/apache/maven/its/plugins/SerializeMojo.java @@ -28,22 +28,24 @@ import java.io.Writer; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.xml.Xpp3Dom; import org.codehaus.plexus.util.xml.pull.MXSerializer; import org.codehaus.plexus.util.xml.pull.XmlSerializer; /** - * @goal serialize - * @phase validate - */ + */ +@Mojo( name = "serialize", defaultPhase = LifecyclePhase.VALIDATE ) public class SerializeMojo extends AbstractMojo { /** - * @parameter default-value="${project.build.directory}/serialized.xml" */ + @Parameter( defaultValue = "${project.build.directory}/serialized.xml" ) private File file; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-new/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-new/pom.xml index 0ba366af4a..85e0a8ebd6 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-new/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-new/pom.xml @@ -42,7 +42,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-new/src/main/java/org/apache/maven/its/plugins/SerializeMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-new/src/main/java/org/apache/maven/its/plugins/SerializeMojo.java index 7627e1f2c1..dcb483688d 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-new/src/main/java/org/apache/maven/its/plugins/SerializeMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-new/src/main/java/org/apache/maven/its/plugins/SerializeMojo.java @@ -29,21 +29,21 @@ import org.apache.commons.io.IOUtils; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.codehaus.plexus.util.xml.Xpp3Dom; import org.codehaus.plexus.util.xml.pull.MXSerializer; import org.codehaus.plexus.util.xml.pull.XmlSerializer; /** - * @goal serialize - * @phase validate - */ + */ +@Mojo( name = "serialize", defaultPhase = LifecyclePhase.VALIDATE ) public class SerializeMojo extends AbstractMojo { - /** - * @parameter default-value="${project.build.directory}/serialized.xml" - */ + @Parameter( defaultValue = "${project.build.directory}/serialized.xml" ) private File file; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/pom.xml index 6e90c89aff..5c64ef5bf3 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/pom.xml @@ -42,7 +42,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/src/main/java/org/apache/maven/plugin/coreit/DerivedItMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/src/main/java/org/apache/maven/plugin/coreit/DerivedItMojo.java index c7af358789..8b348035f5 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/src/main/java/org/apache/maven/plugin/coreit/DerivedItMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/src/main/java/org/apache/maven/plugin/coreit/DerivedItMojo.java @@ -21,13 +21,15 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; /** - * @goal test - * @phase process-sources - */ + */ +@Mojo( name = "test", defaultPhase = LifecyclePhase.PROCESS_SOURCES ) public class DerivedItMojo extends EvalMojo { @@ -35,9 +37,8 @@ public class DerivedItMojo * The path to the output file for the properties with the expression values. For each expression given by the * parameter {@link #expressions}, a similar named properties key will be used to save the expression value. If an * expression evaluated to null, there will be no corresponding key in the properties file. - * - * @parameter */ + @Parameter private File file; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-project-interpolation/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-project-interpolation/pom.xml index c98341cb34..735e8ce80b 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-project-interpolation/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-project-interpolation/pom.xml @@ -38,13 +38,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided @@ -57,10 +60,6 @@ under the License. org.apache.maven.shared maven-verifier - - org.apache.maven - maven-artifact - junit junit diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-project-interpolation/src/main/java/org/apache/maven/plugin/coreit/PluginParamInterpolationMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-project-interpolation/src/main/java/org/apache/maven/plugin/coreit/PluginParamInterpolationMojo.java index 7e4c4ebfc6..baef8095c6 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-project-interpolation/src/main/java/org/apache/maven/plugin/coreit/PluginParamInterpolationMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-project-interpolation/src/main/java/org/apache/maven/plugin/coreit/PluginParamInterpolationMojo.java @@ -23,28 +23,28 @@ import java.io.File; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; /** - * @goal check-plugin * - * @phase validate */ +@Mojo( name = "check-plugin", defaultPhase = LifecyclePhase.VALIDATE ) public class PluginParamInterpolationMojo extends AbstractMojo { /** * myDirectory - * - * @parameter */ + @Parameter private String myDirectory; /** * The current Maven project. - * - * @parameter default-value="${project}" */ + @Parameter( defaultValue = "${project}" ) private MavenProject project; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-project-interpolation/src/main/java/org/apache/maven/plugin/coreit/PropertyInterpolationMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-project-interpolation/src/main/java/org/apache/maven/plugin/coreit/PropertyInterpolationMojo.java index 3177fbf4df..071820dd12 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-project-interpolation/src/main/java/org/apache/maven/plugin/coreit/PropertyInterpolationMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-project-interpolation/src/main/java/org/apache/maven/plugin/coreit/PropertyInterpolationMojo.java @@ -23,22 +23,23 @@ import java.io.File; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; /** - * @goal check-property * * @phase validate */ +@Mojo( name = "check-property" ) public class PropertyInterpolationMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" */ + @Parameter( defaultValue = "${project}" ) private MavenProject project; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-project-interpolation/src/main/java/org/apache/maven/plugin/coreit/PropertyInterpolationVerifierMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-project-interpolation/src/main/java/org/apache/maven/plugin/coreit/PropertyInterpolationVerifierMojo.java index 5de48c06e3..5f69edce41 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-project-interpolation/src/main/java/org/apache/maven/plugin/coreit/PropertyInterpolationVerifierMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-project-interpolation/src/main/java/org/apache/maven/plugin/coreit/PropertyInterpolationVerifierMojo.java @@ -23,31 +23,31 @@ import org.apache.maven.model.Model; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.util.Enumeration; import java.util.Properties; /** - * @goal verify-property - * @phase validate - */ + */ +@Mojo( name = "verify-property", defaultPhase = LifecyclePhase.VALIDATE ) public class PropertyInterpolationVerifierMojo extends AbstractMojo { /** * The current Maven project. - * - * @parameter default-value="${project}" */ + @Parameter( defaultValue = "${project}" ) private MavenProject project; /** * The properties. - * - * @parameter property="properties" */ + @Parameter( property = "clsldr.pluginClassLoaderOutput" ) private Properties properties; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-project/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-project/pom.xml index a99105c384..8d5fdefad0 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-project/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-project/pom.xml @@ -45,25 +45,31 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-core + provided + + + org.apache.maven + maven-compat provided org.apache.maven maven-model - 2.0 provided org.apache.maven maven-artifact - 2.0 provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-project/src/main/java/org/apache/maven/plugin/coreit/AbstractPomMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-project/src/main/java/org/apache/maven/plugin/coreit/AbstractPomMojo.java index ec5cf66bc8..1b0ad340ed 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-project/src/main/java/org/apache/maven/plugin/coreit/AbstractPomMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-project/src/main/java/org/apache/maven/plugin/coreit/AbstractPomMojo.java @@ -21,6 +21,7 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectBuilder; @@ -38,9 +39,8 @@ public abstract class AbstractPomMojo /** * The project builder. - * - * @component */ + @Component protected MavenProjectBuilder builder; protected void dump( Properties props, String key, MavenProject project ) diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-project/src/main/java/org/apache/maven/plugin/coreit/BuildLocalPomMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-project/src/main/java/org/apache/maven/plugin/coreit/BuildLocalPomMojo.java index 7f3ee92ed3..2aac41caca 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-project/src/main/java/org/apache/maven/plugin/coreit/BuildLocalPomMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-project/src/main/java/org/apache/maven/plugin/coreit/BuildLocalPomMojo.java @@ -21,6 +21,8 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -30,33 +32,29 @@ import java.util.Properties; * Builds the local POMs. * * @author Benjamin Bentmann - * @goal local-pom - */ + */ +@Mojo( name = "local-pom" ) public class BuildLocalPomMojo extends AbstractPomMojo { /** * The properties file to dump the POM info to. - * - * @parameter default-value="target/pom.properties" */ + @Parameter( defaultValue = "target/pom.properties" ) private File propertiesFile; /** * The local repository. - * - * @parameter default-value="${localRepository}" - * @readonly - * @required */ + @Parameter( defaultValue = "${localRepository}", readonly = true, required = true ) private ArtifactRepository localRepository; /** * The POM files to build. * - * @parameter */ + @Parameter private File[] files; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-project/src/main/java/org/apache/maven/plugin/coreit/BuildRemotePomMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-project/src/main/java/org/apache/maven/plugin/coreit/BuildRemotePomMojo.java index d2a455e8b1..a7da046b1f 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-project/src/main/java/org/apache/maven/plugin/coreit/BuildRemotePomMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-project/src/main/java/org/apache/maven/plugin/coreit/BuildRemotePomMojo.java @@ -24,6 +24,9 @@ import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.model.Dependency; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -35,49 +38,42 @@ import java.util.Properties; * * @author Benjamin Bentmann * - * @goal remote-pom - */ + */ +@Mojo( name = "remote-pom" ) public class BuildRemotePomMojo extends AbstractPomMojo { /** * The properties file to dump the POM info to. - * - * @parameter default-value="target/pom.properties" */ + @Parameter( defaultValue = "target/pom.properties" ) private File propertiesFile; /** * The local repository. - * - * @parameter default-value="${localRepository}" - * @readonly - * @required */ + @Parameter( defaultValue = "${localRepository}", readonly = true, required = true ) private ArtifactRepository localRepository; /** * The remote repositories of the current Maven project. - * - * @parameter default-value="${project.remoteArtifactRepositories}" - * @readonly - * @required */ - private List remoteRepositories; + @Parameter( defaultValue = "${project.remoteArtifactRepositories}", readonly = true, required = true ) + private List remoteRepositories; /** * The artifact factory. * - * @component */ + @Component private ArtifactFactory factory; /** * The dependencies to resolve. * - * @parameter */ + @Parameter private Dependency[] dependencies; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-setter/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-setter/pom.xml index 8897ce8c84..97f7fa31ba 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-setter/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-setter/pom.xml @@ -44,7 +44,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-setter/src/main/java/org/apache/maven/plugin/coreit/CoreItMojoWithSetters.java b/its/core-it-support/core-it-plugins/maven-it-plugin-setter/src/main/java/org/apache/maven/plugin/coreit/CoreItMojoWithSetters.java index 5c6c9dde7b..48f14aaca8 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-setter/src/main/java/org/apache/maven/plugin/coreit/CoreItMojoWithSetters.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-setter/src/main/java/org/apache/maven/plugin/coreit/CoreItMojoWithSetters.java @@ -21,6 +21,8 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.FileWriter; @@ -28,25 +30,22 @@ import java.io.IOException; /** * Mojo to check that attribute injection through setter method (instead of direct parameter injection) works. - * @goal setter-touch */ +@Mojo( name = "setter-touch" ) public class CoreItMojoWithSetters extends AbstractMojo { - /** - * @parameter default-value="${project.build.directory}" - * @required - */ + @Parameter( defaultValue = "${project.build.directory}", required = true ) private String outputDirectoryValue; /** - * @parameter name="foo" */ + @Parameter( name = "foo" ) private String fooValue; /** - * @parameter */ + @Parameter private String bar; // ---------------------------------------------------------------------- diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-settings/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-settings/pom.xml index 666b513fea..18b0a4492d 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-settings/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-settings/pom.xml @@ -41,15 +41,22 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven maven-settings - 2.0 provided + + org.codehaus.plexus + plexus-utils + diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-settings/src/main/java/org/apache/maven/plugin/coreit/SettingsReadItMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-settings/src/main/java/org/apache/maven/plugin/coreit/SettingsReadItMojo.java index 041eebec60..5f55e70dd7 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-settings/src/main/java/org/apache/maven/plugin/coreit/SettingsReadItMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-settings/src/main/java/org/apache/maven/plugin/coreit/SettingsReadItMojo.java @@ -21,6 +21,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.settings.Settings; import org.apache.maven.settings.io.xpp3.SettingsXpp3Writer; @@ -31,23 +34,15 @@ import java.io.IOException; /** * Goal which read settings and dump it to a file * - * @goal settings-read - * @phase validate - */ + */ +@Mojo( name = "settings-read", defaultPhase = LifecyclePhase.VALIDATE ) public class SettingsReadItMojo extends AbstractMojo { - /** - * @parameter default-value="${settings}" - * @required - * @readonly - */ + @Parameter( defaultValue = "${settings}", required = true, readonly = true ) private Settings settings; - /** - * @parameter default-value="target/settings-dump.xml" - * @required - */ + @Parameter( defaultValue = "target/settings-dump.xml", required = true ) private File dumpFile; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/pom.xml index 0f2f89c429..0c79f3a243 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/pom.xml @@ -45,7 +45,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/java/org/apache/maven/plugin/coreit/DefaultComponent.java b/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/java/org/apache/maven/plugin/coreit/DefaultComponent.java index da9387fd28..1b790ff335 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/java/org/apache/maven/plugin/coreit/DefaultComponent.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/java/org/apache/maven/plugin/coreit/DefaultComponent.java @@ -26,9 +26,9 @@ import org.codehaus.plexus.component.annotations.Component; * * @author Benjamin Bentmann */ -@Component ( role = org.apache.maven.plugin.coreit.Component.class ) +@Component ( role = TestComponent.class ) public class DefaultComponent - implements org.apache.maven.plugin.coreit.Component + implements TestComponent { private final String id; diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/java/org/apache/maven/plugin/coreit/ItMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/java/org/apache/maven/plugin/coreit/ItMojo.java index e58c2d12cb..95832f9d60 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/java/org/apache/maven/plugin/coreit/ItMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/java/org/apache/maven/plugin/coreit/ItMojo.java @@ -21,6 +21,10 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.FileOutputStream; @@ -34,47 +38,42 @@ import java.util.Properties; * * @author Benjamin Bentmann * - * @goal it - * @phase initialize - */ + */ +@Mojo( name = "it", defaultPhase = LifecyclePhase.INITIALIZE ) public class ItMojo extends AbstractMojo { /** * The path to the output file. - * - * @parameter property="touch.outputFile" default-value="target/comp.properties" */ + @Parameter( property = "touch.outputFile", defaultValue = "target/comp.properties" ) private File outputFile; /** * Component lookup without role hint. * - * @component */ - private Component componentWithoutRoleHint; + @Component + private TestComponent componentWithoutRoleHint; /** * Component lookup with explicit role hint. - * - * @component roleHint="default" */ - private Component componentWithRoleHint; + @Component( hint = "default" ) + private TestComponent componentWithRoleHint; /** * Component lookup via active map. - * - * @component role="org.apache.maven.plugin.coreit.Component" */ - private Map componentMap; + @Component + private Map componentMap; /** * Component lookup via active list. - * - * @component role="org.apache.maven.plugin.coreit.Component" */ - private List componentList; + @Component + private List componentList; /** * Runs this mojo. @@ -84,8 +83,8 @@ public class ItMojo public void execute() throws MojoExecutionException { - Component componentFromMap = (Component) componentMap.values().iterator().next(); - Component componentFromList = (Component) componentList.iterator().next(); + TestComponent componentFromMap = (TestComponent) componentMap.values().iterator().next(); + TestComponent componentFromList = (TestComponent) componentList.iterator().next(); getLog().info( "[MAVEN-CORE-IT-LOG] Using component: " + componentWithoutRoleHint ); getLog().info( "[MAVEN-CORE-IT-LOG] Using component: " + componentWithRoleHint ); diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/java/org/apache/maven/plugin/coreit/Component.java b/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/java/org/apache/maven/plugin/coreit/TestComponent.java similarity index 96% rename from its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/java/org/apache/maven/plugin/coreit/Component.java rename to its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/java/org/apache/maven/plugin/coreit/TestComponent.java index 3e4af15b8f..de3256fad5 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-no-default-comp/src/main/java/org/apache/maven/plugin/coreit/Component.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/java/org/apache/maven/plugin/coreit/TestComponent.java @@ -24,7 +24,7 @@ package org.apache.maven.plugin.coreit; * * @author Benjamin Bentmann */ -public interface Component +public interface TestComponent { String getId(); diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/resources/META-INF/plexus/components.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/resources/META-INF/plexus/components.xml index 5617ac7fa7..4d3ec4f31f 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/resources/META-INF/plexus/components.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/resources/META-INF/plexus/components.xml @@ -20,7 +20,7 @@ under the License. - org.apache.maven.plugin.coreit.Component + org.apache.maven.plugin.coreit.TestComponent default org.apache.maven.plugin.coreit.DefaultComponent singleton diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-site/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-site/pom.xml index 9f1eb97e10..110551ea36 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-site/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-site/pom.xml @@ -45,7 +45,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided @@ -68,12 +72,6 @@ under the License. org.apache.maven.reporting maven-reporting-exec 1.6.0 - - - org.apache.maven - * - - diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-site/src/main/java/org/apache/maven/plugin/coreit/GenerateMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-site/src/main/java/org/apache/maven/plugin/coreit/GenerateMojo.java index 39c2996952..25f6a56d2a 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-site/src/main/java/org/apache/maven/plugin/coreit/GenerateMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-site/src/main/java/org/apache/maven/plugin/coreit/GenerateMojo.java @@ -23,6 +23,9 @@ import org.apache.maven.doxia.sink.Sink; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.reporting.MavenReport; import java.io.File; @@ -36,43 +39,34 @@ import java.util.Locale; * Generates the available/configured reports. * * @author Benjamin Bentmann - * - * @goal generate - * @phase site - * @requiresReports true */ +@Mojo( name = "generate", defaultPhase = LifecyclePhase.SITE, requiresReports = true ) public class GenerateMojo extends AbstractMojo { /** * The path to the output directory of the site. - * - * @parameter default-value="${project.reporting.outputDirectory}" */ + @Parameter( defaultValue = "${project.reporting.outputDirectory}" ) private File outputDirectory; /** * The language for the reports. - * - * @parameter default-value="en" */ + @Parameter( defaultValue = "en" ) private String language = "en"; /** * A flag whether to ignore errors from reports and continue the generation. - * - * @parameter default-value="false" */ + @Parameter( defaultValue = "false" ) private boolean ignoreErrors; /** * The reports configured for the current build. - * - * @parameter default-value="${reports}" - * @required - * @readonly */ + @Parameter( defaultValue = "${reports}", required = true, readonly = true ) private List reports; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-site/src/main/java/org/apache/maven/plugin/coreit/InfoReport.java b/its/core-it-support/core-it-plugins/maven-it-plugin-site/src/main/java/org/apache/maven/plugin/coreit/InfoReport.java index fce5b9fea3..d6df5fb647 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-site/src/main/java/org/apache/maven/plugin/coreit/InfoReport.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-site/src/main/java/org/apache/maven/plugin/coreit/InfoReport.java @@ -23,6 +23,7 @@ import org.apache.maven.doxia.sink.Sink; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.reporting.MavenReport; import org.apache.maven.reporting.MavenReportException; @@ -48,27 +49,22 @@ public class InfoReport /** * The base directory of the current Maven project. - * - * @parameter default-value="${basedir}" - * @required - * @readonly */ + @Parameter( defaultValue = "${basedir}", required = true, readonly = true ) private File basedir; /** * The path to the properties file, relative to the output directory of the site. The keys * locale.language, locale.country and locale.variant indicate the report's * locale. - * - * @parameter default-value="info.properties" */ + @Parameter( defaultValue = "info.properties" ) private String infoFile = "info.properties"; /** * The path to the output directory of the site. - * - * @parameter default-value="${project.reporting.outputDirectory}" */ + @Parameter( defaultValue = "${project.reporting.outputDirectory}" ) private File outputDirectory; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-site/src/main/java/org/apache/maven/plugin/coreit/ListMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-site/src/main/java/org/apache/maven/plugin/coreit/ListMojo.java index 5554e7b724..13b7a0daa2 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-site/src/main/java/org/apache/maven/plugin/coreit/ListMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-site/src/main/java/org/apache/maven/plugin/coreit/ListMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.FileOutputStream; @@ -33,13 +36,10 @@ import java.util.Properties; /** * Lists the available/configured reports in a properties file. * - * @goal list - * @phase initialize - * @requiresReports true - * * @author Benjamin Bentmann * */ +@Mojo( name = "list", defaultPhase = LifecyclePhase.INITIALIZE, requiresReports = true ) public class ListMojo extends AbstractMojo { @@ -48,19 +48,15 @@ public class ListMojo * The path to the properties file used to list the available reports. The properties file will have a key named * reports that gives the total count of reports. The keys reports.0, * reports.1 etc. will be used to denote the qualified class names of the reports. - * - * @parameter property="site.properties" default-value="target/reports.properties" */ + @Parameter( property = "site.properties", defaultValue = "target/reports.properties" ) private File reportsFile; /** * The reports configured for the current build. - * - * @parameter default-value="${reports}" - * @required - * @readonly */ - private List reports; + @Parameter( defaultValue = "${reports}", required = true, readonly = true ) + private List reports; /** * Runs this mojo. diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-toolchain/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-toolchain/pom.xml index 38a1029e33..e30c06cf2b 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-toolchain/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-toolchain/pom.xml @@ -37,13 +37,16 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-toolchain - 2.0.10 + maven-core provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-toolchain/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-toolchain/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java index 7fa4452273..d5c7c3cc8f 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-toolchain/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-toolchain/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java @@ -22,6 +22,10 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.toolchain.ToolchainManagerPrivate; import org.apache.maven.toolchain.ToolchainPrivate; @@ -36,53 +40,45 @@ import java.util.Iterator; import java.util.Properties; /** - * @goal toolchain - * @phase validate - */ + */ +@Mojo( name = "toolchain", defaultPhase = LifecyclePhase.VALIDATE ) public class CoreItMojo extends AbstractMojo { /** - * @component */ + @Component private ToolchainManagerPrivate toolchainManager; /** * The current Maven session holding the selected toolchain. - * - * @parameter default-value="${session}" - * @required - * @readonly */ + @Parameter( defaultValue = "${session}", readonly = true, required = true ) private MavenSession session; /** * The path to the output file for the properties. - * - * @parameter property="toolchain.outputFile" default-value="${project.build.directory}/toolchains.properties" */ + @Parameter( property = "toolchain.outputFile", defaultValue = "${project.build.directory}/toolchains.properties" ) private File outputFile; /** * The type identifier of the toolchain, e.g. "jdk". - * - * @parameter property="toolchain.type" */ + @Parameter( property = "toolchain.type" ) private String type; /** * The name of the tool, e.g. "javac". - * - * @parameter property="toolchain.tool" */ + @Parameter( property = "toolchain.tool" ) private String tool; /** * The zero-based index of the toolchain to select and store in the build context. - * - * @parameter property="toolchain.selected" */ + @Parameter( property = "toolchain.selected" ) private int selected; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-toolchain/src/main/java/org/apache/maven/plugin/coreit/FindToolMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-toolchain/src/main/java/org/apache/maven/plugin/coreit/FindToolMojo.java index 651fec9f1a..d92615e20b 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-toolchain/src/main/java/org/apache/maven/plugin/coreit/FindToolMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-toolchain/src/main/java/org/apache/maven/plugin/coreit/FindToolMojo.java @@ -28,6 +28,10 @@ import java.util.Properties; import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.toolchain.Toolchain; import org.apache.maven.toolchain.ToolchainManager; @@ -35,46 +39,39 @@ import org.apache.maven.toolchain.ToolchainManager; * Finds a tool from a previously selected toolchain. This tests the public API just like toolchain-enabled plugins * would do. * - * @goal find-tool - * @phase validate - */ + */ +@Mojo( name = "find-tool", defaultPhase = LifecyclePhase.VALIDATE ) public class FindToolMojo extends AbstractMojo { /** - * @component */ + @Component private ToolchainManager toolchainManager; /** * The current Maven session holding the selected toolchain. - * - * @parameter default-value="${session}" - * @required - * @readonly */ + @Parameter( defaultValue = "${session}", required = true, readonly = true ) private MavenSession session; /** * The path to the output file for the properties. - * - * @parameter property="toolchain.outputFile" default-value="${project.build.directory}/tool.properties" */ + @Parameter( property = "toolchain.outputFile", defaultValue = "${project.build.directory}/tool.properties" ) private File outputFile; /** * The type identifier of the toolchain, e.g. "jdk". - * - * @parameter property="toolchain.type" */ + @Parameter( property = "toolchain.type" ) private String type; /** * The name of the tool, e.g. "javac". - * - * @parameter property="toolchain.tool" */ + @Parameter( property = "toolchain.tool" ) private String tool; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-touch/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-touch/pom.xml index 4457463502..d39cf33045 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-touch/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-touch/pom.xml @@ -39,25 +39,27 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-project - 2.0 + maven-compat provided org.apache.maven maven-artifact - 2.0 provided org.apache.maven maven-archiver - 2.0 + 3.6.0 diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-touch/src/main/java/org/apache/maven/plugin/coreit/CopyPomMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-touch/src/main/java/org/apache/maven/plugin/coreit/CopyPomMojo.java index eddef2bbd7..afc6eecf18 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-touch/src/main/java/org/apache/maven/plugin/coreit/CopyPomMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-touch/src/main/java/org/apache/maven/plugin/coreit/CopyPomMojo.java @@ -21,6 +21,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.FileInputStream; @@ -30,21 +33,19 @@ import java.io.IOException; /** * Mojo which makes a copy of the POM using MavenProject.getFile() to locate the file. * - * @goal copy-pom - * @phase generate-sources - */ + */ +@Mojo( name = "copy-pom", defaultPhase = LifecyclePhase.GENERATE_SOURCES ) public class CopyPomMojo extends AbstractMojo { /** - * @parameter default-value="${project.file}" */ + @Parameter( defaultValue = "${project.file}" ) private File pomFile; /** - * @parameter default-value="${project.build.directory}/pom-copy.xml" - * @required */ + @Parameter( defaultValue = "${project.build.directory}/pom-copy.xml", required = true ) private String outputFile; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-touch/src/main/java/org/apache/maven/plugin/coreit/CoreItTouchMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-touch/src/main/java/org/apache/maven/plugin/coreit/CoreItTouchMojo.java index 708685f70a..8ad9c76509 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-touch/src/main/java/org/apache/maven/plugin/coreit/CoreItTouchMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-touch/src/main/java/org/apache/maven/plugin/coreit/CoreItTouchMojo.java @@ -22,6 +22,9 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.File; @@ -33,64 +36,54 @@ import java.util.Map; * Mojo that creates one touch.txt or more files with configured filenames in target/ * directory, or cause failure if desired, and set build final name to 'coreitified' * - * @goal touch - * @phase process-sources - */ + */ +@Mojo( name = "touch", defaultPhase = LifecyclePhase.PROCESS_SOURCES ) public class CoreItTouchMojo extends AbstractMojo { - /** - * @parameter default-value="${project}" - */ + @Parameter( defaultValue = "${project}" ) private MavenProject project; /** * Output directory for touched files. - * - * @parameter default-value="${project.build.directory}" - * @required */ + @Parameter( defaultValue = "${project.build.directory}", required = true ) private String outputDirectory; /** * Test setting of plugin-artifacts on the PluginDescriptor instance. - * - * @parameter default-value="${plugin.artifactMap}" - * @required */ + @Parameter( defaultValue = "${plugin.artifactMap}", required = true ) private Map pluginArtifacts; /** * Parameter to check that File attribute is injected with absolute path, even if parameter * value is relative: a touch.txt file will be created in specified directory, to be able * to check that absolute value is at right place. - * - * @parameter default-value="target/test-basedir-alignment" */ + @Parameter( defaultValue = "target/test-basedir-alignment" ) private File basedirAlignmentDirectory; /** - * @parameter alias="pluginFile" */ + @Parameter( alias = "pluginFile" ) private String pluginItem = "foo"; /** - * @parameter */ + @Parameter private String goalItem = "bar"; /** * Touch a file named after artifact absolute file name, replacing '/' and ':' by '_' and adding ".txt". - * - * @parameter property="artifactToFile" */ + @Parameter( property = "artifactToFile" ) private String artifactToFile; /** * Should the goal cause a failure before doing anything else? - * - * @parameter property="fail" */ + @Parameter( property = "fail" ) private boolean fail = false; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-properties/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-properties/pom.xml index eeaca5b0a9..d1a13c1a9c 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-properties/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-properties/pom.xml @@ -42,7 +42,11 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-properties/src/main/java/org/apache/maven/plugin/coreit/UsesPropertiesMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-properties/src/main/java/org/apache/maven/plugin/coreit/UsesPropertiesMojo.java index 6b67aa023f..0bb5e13b24 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-properties/src/main/java/org/apache/maven/plugin/coreit/UsesPropertiesMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-properties/src/main/java/org/apache/maven/plugin/coreit/UsesPropertiesMojo.java @@ -21,26 +21,28 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.util.Properties; import java.io.FileOutputStream; import java.io.File; /** - * @goal generate-properties - * @phase validate */ +@Mojo( name = "generate-properties", defaultPhase = LifecyclePhase.VALIDATE ) public class UsesPropertiesMojo extends AbstractMojo { /** - * @parameter default-value="${basedir}" */ + @Parameter( defaultValue = "${basedir}" ) private File basedir; /** - * @parameter default-value="${project.properties}" */ + @Parameter( defaultValue = "${project.properties}" ) private Properties properties; public void execute() diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/pom.xml b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/pom.xml index c763923958..0f2240b3ed 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/pom.xml +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/pom.xml @@ -38,24 +38,17 @@ under the License. org.apache.maven maven-plugin-api - 2.0 + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven - maven-artifact-manager - 2.0.9 + maven-compat provided - - - org.codehaus.plexus - plexus-utils - - - junit - junit - - org.apache.maven.wagon diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/DumpAuthMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/DumpAuthMojo.java index eb829e2e03..d355556c5c 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/DumpAuthMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/DumpAuthMojo.java @@ -23,6 +23,10 @@ import org.apache.maven.artifact.manager.WagonManager; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.wagon.authentication.AuthenticationInfo; import java.io.File; @@ -35,41 +39,34 @@ import java.util.Properties; * Dumps the authentication info registered with the wagon manager for a server to a properties file. * * @author Benjamin Bentmann - * - * @goal dump-auth - * @phase validate */ +@Mojo( name = "dump-auth", defaultPhase = LifecyclePhase.VALIDATE ) public class DumpAuthMojo extends AbstractMojo { /** * Project base directory used for manual path alignment. - * - * @parameter default-value="${basedir}" - * @readonly */ + @Parameter( defaultValue = "${basedir}", readonly = true ) private File basedir; /** * The Wagon manager used to retrieve authentication infos. - * - * @component */ + @Component private WagonManager wagonManager; /** * The path to the properties file used to dump the auth infos. - * - * @parameter property="wagon.propertiesFile" */ + @Parameter( property = "wagon.propertiesFile" ) private File propertiesFile; /** * The set of server identifiers whose auth infos should be dumped. - * - * @parameter */ + @Parameter private String[] serverIds; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/DumpVersionMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/DumpVersionMojo.java index ebb83953e5..2270ea5b66 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/DumpVersionMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/DumpVersionMojo.java @@ -22,6 +22,10 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.manager.WagonManager; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import java.io.File; import java.io.FileOutputStream; @@ -33,56 +37,47 @@ import java.util.Properties; /** * Dumps the version info for a wagon provider to a properties file. * - * @goal dump-version - * @phase validate - * * @author Benjamin Bentmann */ +@Mojo( name = "dump-version", defaultPhase = LifecyclePhase.VALIDATE ) public class DumpVersionMojo extends AbstractMojo { /** * Project base directory used for manual path alignment. - * - * @parameter default-value="${basedir}" - * @readonly */ + @Parameter( defaultValue = "${basedir}", readonly = true ) private File basedir; /** * The Wagon manager used to look up the wagon of interest. - * - * @component */ + @Component private WagonManager wagonManager; /** * The path to the properties file used to dump the auth infos. - * - * @parameter property="wagon.propertiesFile" */ + @Parameter( property = "wagon.propertiesFile" ) private File propertiesFile; /** * The role hint for the provider of interest. - * - * @parameter property="wagon.providerHint" */ + @Parameter( property = "wagon.providerHint" ) private String providerHint; /** * The group id for the provider of interest. - * - * @parameter property="wagon.providerGroupId" */ + @Parameter( property = "wagon.providerGroupId" ) private String providerGroupId; /** * The artifact id for the provider of interest. - * - * @parameter property="wagon.providerArtifactId" */ + @Parameter( property = "wagon.providerArtifactId" ) private String providerArtifactId; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/LoadResourceMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/LoadResourceMojo.java index 4b140a33ce..96148d9153 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/LoadResourceMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/LoadResourceMojo.java @@ -23,6 +23,10 @@ import org.apache.maven.artifact.manager.WagonManager; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.wagon.repository.Repository; import java.io.File; @@ -39,41 +43,35 @@ import java.util.Properties; * class loader it came from which is otherwise not accessible to a plugin. * * @author Benjamin Bentmann - * - * @goal load-resource - * @phase validate */ +@Mojo( name = "load-resource", defaultPhase = LifecyclePhase.VALIDATE ) public class LoadResourceMojo extends AbstractMojo { /** * The Wagon manager used to retrieve wagon providers. - * - * @component */ + @Component private WagonManager wagonManager; /** * The path to the properties file used to track the results of the resource loading via the wagon's class loader. - * - * @parameter property="wagon.wagonClassLoaderOutput" */ + @Parameter( property = "wagon.wagonClassLoaderOutput" ) private File wagonClassLoaderOutput; /** * The role hint for the wagon provider to load. The class loader of this provider will be used to load the * resources. - * - * @parameter property="wagon.wagonProtocol" */ + @Parameter( property = "wagon.wagonProtocol" ) private String wagonProtocol; /** * The repository to load the wagon for, if applicable. - * - * @parameter property="wagon.repositoryId" */ + @Parameter( property = "wagon.repositoryId" ) private String repositoryId; /** @@ -81,9 +79,8 @@ public class LoadResourceMojo * loaded, the generated properties files will contain a key named ARP whose value gives the URL to the * resource. In addition, the keys ARP.count, ARP.0, ARP.1 etc. will * enumerate all URLs matching the resource name. - * - * @parameter */ + @Parameter private String[] resourcePaths; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/LookupWagonMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/LookupWagonMojo.java index 6cc3311c6f..0d1bd501d9 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/LookupWagonMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/LookupWagonMojo.java @@ -23,6 +23,10 @@ import org.apache.maven.artifact.manager.WagonManager; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.wagon.Wagon; import org.apache.maven.wagon.repository.Repository; @@ -36,35 +40,30 @@ import java.util.Properties; * Loads resources from a class loader used to load a wagon provider. The wagon is merely used to access the extension * class loader it came from which is otherwise not accessible to a plugin. * - * @goal lookup-wagon - * @phase validate - * * @author Benjamin Bentmann * */ +@Mojo( name = "lookup-wagon", defaultPhase = LifecyclePhase.VALIDATE ) public class LookupWagonMojo extends AbstractMojo { /** * The Wagon manager used to retrieve wagon providers. - * - * @component */ + @Component private WagonManager wagonManager; /** * The path to the properties file used to track the results of the wagon lookups. - * - * @parameter property="wagon.outputFile" */ + @Parameter( property = "wagon.outputFile" ) private File outputFile; /** * The URLs for which to look up wagons. - * - * @parameter */ + @Parameter private String[] urls; /** diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/UsesWagonMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/UsesWagonMojo.java index a4813225f9..064dacc423 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/UsesWagonMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-wagon/src/main/java/org/apache/maven/plugin/coreit/UsesWagonMojo.java @@ -22,21 +22,23 @@ package org.apache.maven.plugin.coreit; import org.apache.maven.artifact.manager.WagonManager; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.wagon.Wagon; import org.apache.maven.wagon.providers.file.FileWagon; import org.apache.maven.wagon.providers.ssh.jsch.ScpWagon; /** - * @goal use-wagon - * @phase validate */ +@Mojo( name = "use-wagon", defaultPhase = LifecyclePhase.VALIDATE ) public class UsesWagonMojo extends AbstractMojo { /** - * @component */ + @Component private WagonManager wagonManager; public void execute() diff --git a/its/core-it-support/core-it-plugins/mng5805-plugin/pom.xml b/its/core-it-support/core-it-plugins/mng5805-plugin/pom.xml index c24f9aab2a..cfe7bbccd8 100644 --- a/its/core-it-support/core-it-plugins/mng5805-plugin/pom.xml +++ b/its/core-it-support/core-it-plugins/mng5805-plugin/pom.xml @@ -32,23 +32,22 @@ under the License. mng-5805-pkg-type-mojo-configuration-plugin maven-plugin - - 3.0 - - Maven IT Plugin :: mng-5805 plugin org.apache.maven maven-plugin-api - ${maven-version} + provided + + + org.apache.maven.plugin-tools + maven-plugin-annotations provided org.apache.maven maven-model - ${maven-version} provided diff --git a/its/core-it-support/core-it-plugins/mng5805-plugin/src/main/java/org/apache/maven/its/mng5805/plugin/TestMojo.java b/its/core-it-support/core-it-plugins/mng5805-plugin/src/main/java/org/apache/maven/its/mng5805/plugin/TestMojo.java index a3a36eea95..c9f4b6b0a5 100644 --- a/its/core-it-support/core-it-plugins/mng5805-plugin/src/main/java/org/apache/maven/its/mng5805/plugin/TestMojo.java +++ b/its/core-it-support/core-it-plugins/mng5805-plugin/src/main/java/org/apache/maven/its/mng5805/plugin/TestMojo.java @@ -21,16 +21,18 @@ package org.apache.maven.its.mng5805.plugin; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; /** - * @goal test - */ + */ +@Mojo( name = "test" ) public class TestMojo extends AbstractMojo { /** - * @parameter default-value="org.apache.maven.its.mng5805.DoesNotExist" */ + @Parameter( defaultValue = "org.apache.maven.its.mng5805.DoesNotExist" ) private String className; public void execute() diff --git a/its/core-it-support/core-it-plugins/mng5958-extension/pom.xml b/its/core-it-support/core-it-plugins/mng5958-extension/pom.xml index 1bd85d291a..beec4cf569 100644 --- a/its/core-it-support/core-it-plugins/mng5958-extension/pom.xml +++ b/its/core-it-support/core-it-plugins/mng5958-extension/pom.xml @@ -38,7 +38,6 @@ under the License. org.apache.maven maven-core - 3.3.9 provided diff --git a/its/core-it-support/core-it-plugins/mng6759-plugin-resolves-project-dependencies/pom.xml b/its/core-it-support/core-it-plugins/mng6759-plugin-resolves-project-dependencies/pom.xml index 57e8b1183a..f6b0bb0d87 100644 --- a/its/core-it-support/core-it-plugins/mng6759-plugin-resolves-project-dependencies/pom.xml +++ b/its/core-it-support/core-it-plugins/mng6759-plugin-resolves-project-dependencies/pom.xml @@ -32,10 +32,6 @@ under the License. mng-6759-resolves-project-dependencies-plugin maven-plugin - - 3.0 - - Maven IT Plugin :: mng-6759 plugin @@ -47,7 +43,6 @@ under the License. org.apache.maven maven-plugin-api - ${maven-version} provided @@ -58,13 +53,11 @@ under the License. org.apache.maven maven-core - ${maven-version} provided org.apache.maven maven-model - ${maven-version} provided diff --git a/its/core-it-support/core-it-plugins/pom.xml b/its/core-it-support/core-it-plugins/pom.xml index 2bcf95a7ff..40ed164c92 100644 --- a/its/core-it-support/core-it-plugins/pom.xml +++ b/its/core-it-support/core-it-plugins/pom.xml @@ -58,7 +58,6 @@ under the License. maven-it-plugin-online maven-it-plugin-optional-mojos maven-it-plugin-packaging - maven-it-plugin-parameter-implementation maven-it-plugin-plugin-dependency maven-it-plugin-project maven-it-plugin-project-interpolation @@ -113,4 +112,5 @@ under the License. + diff --git a/its/core-it-support/core-it-support-artifacts/pom.xml b/its/core-it-support/core-it-support-artifacts/pom.xml index 17429a7515..1b9115ffb9 100644 --- a/its/core-it-support/core-it-support-artifacts/pom.xml +++ b/its/core-it-support/core-it-support-artifacts/pom.xml @@ -37,7 +37,7 @@ under the License. maven-assembly-plugin - 3.1.0 + 3.4.0 src/main/assembly/repo.xml diff --git a/its/core-it-support/core-it-toolchain/pom.xml b/its/core-it-support/core-it-toolchain/pom.xml index 30ba507bab..9b4cb7bd30 100644 --- a/its/core-it-support/core-it-toolchain/pom.xml +++ b/its/core-it-support/core-it-toolchain/pom.xml @@ -35,8 +35,7 @@ under the License. org.apache.maven - maven-toolchain - 2.0.10 + maven-core diff --git a/its/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java b/its/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java index 515330a657..5434e1acdf 100644 --- a/its/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java +++ b/its/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java @@ -608,16 +608,16 @@ public abstract class AbstractMavenIntegrationTestCase // Java9 requires at least 1.6 if ( VersionRange.createFromVersionSpec( "[9,12)" ).containsVersion( getJavaVersion() ) ) { - verifier.getSystemProperties().put( "maven.compiler.source", "1.7" ); - verifier.getSystemProperties().put( "maven.compiler.target", "1.7" ); - verifier.getSystemProperties().put( "maven.compiler.release", "7" ); + verifier.getSystemProperties().put( "maven.compiler.source", "1.8" ); + verifier.getSystemProperties().put( "maven.compiler.target", "1.8" ); + verifier.getSystemProperties().put( "maven.compiler.release", "8" ); } // Java12 requires at least 7 if ( VersionRange.createFromVersionSpec( "[12,)" ).containsVersion( getJavaVersion() ) ) { - verifier.getSystemProperties().put( "maven.compiler.source", "7" ); - verifier.getSystemProperties().put( "maven.compiler.target", "7" ); - verifier.getSystemProperties().put( "maven.compiler.release", "7" ); + verifier.getSystemProperties().put( "maven.compiler.source", "8" ); + verifier.getSystemProperties().put( "maven.compiler.target", "8" ); + verifier.getSystemProperties().put( "maven.compiler.release", "8" ); } } catch ( InvalidVersionSpecificationException e ) diff --git a/its/core-it-support/maven-it-plugin-bootstrap/pom.xml b/its/core-it-support/maven-it-plugin-bootstrap/pom.xml index 36e035c2ab..6f08db497c 100644 --- a/its/core-it-support/maven-it-plugin-bootstrap/pom.xml +++ b/its/core-it-support/maven-it-plugin-bootstrap/pom.xml @@ -33,7 +33,6 @@ under the License. Bootstrap plugin - 3.8.6 1.8.1 @@ -41,24 +40,27 @@ under the License. org.apache.maven maven-plugin-api - ${mavenVersion} provided org.apache.maven maven-core - ${mavenVersion} provided org.apache.maven.plugin-tools maven-plugin-annotations + provided org.apache.maven.resolver maven-resolver-impl ${mavenResolverVersion} + + org.codehaus.plexus + plexus-utils + diff --git a/its/pom.xml b/its/pom.xml index de8fc4ba48..f811a72d3d 100644 --- a/its/pom.xml +++ b/its/pom.xml @@ -25,7 +25,7 @@ under the License. org.apache.maven maven-parent - 34 + 36 ../pom/maven/pom.xml @@ -70,6 +70,9 @@ under the License. true 1.8 1.8 + + 3.8.6 + 3.6.4 @@ -79,6 +82,41 @@ under the License. + + org.apache.maven + maven-plugin-api + ${maven-version} + + + org.apache.maven + maven-artifact + ${maven-version} + + + org.apache.maven + maven-settings + ${maven-version} + + + org.apache.maven + maven-compat + ${maven-version} + + + org.apache.maven + maven-core + ${maven-version} + + + org.apache.maven + maven-model + ${maven-version} + + + org.apache.maven + maven-repository-metadata + ${maven-version} + org.apache.maven.shared maven-verifier @@ -89,6 +127,11 @@ under the License. junit-jupiter 5.8.0 + + org.apache.maven.plugin-tools + maven-plugin-tools-java + ${maven-plugin-tools-version} + @@ -207,7 +250,7 @@ under the License. org.apache.maven.plugins maven-plugin-plugin - 3.6.4 + ${maven-plugin-tools-version}