[MNG-7661] Use provided scope for Maven deps in IT plugins

This commit is contained in:
Petr Široký 2023-01-01 00:34:21 +01:00 committed by Slawomir Jaranowski
parent 1a78c89175
commit 9eb3ee980f
59 changed files with 113 additions and 15 deletions

View File

@ -46,11 +46,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -43,6 +43,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -48,26 +48,31 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-repository-metadata</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -44,6 +44,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>

View File

@ -43,6 +43,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>

View File

@ -43,6 +43,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -49,11 +49,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -49,11 +49,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -49,11 +49,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -49,11 +49,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -49,11 +49,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -49,11 +49,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -49,11 +49,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -49,11 +49,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -49,11 +49,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -49,11 +49,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -49,11 +49,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -49,11 +49,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -49,11 +49,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -49,11 +49,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -49,11 +49,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -47,16 +47,19 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -47,11 +47,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
@ -63,6 +65,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -47,6 +47,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>

View File

@ -43,6 +43,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>

View File

@ -46,6 +46,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.its</groupId>

View File

@ -47,6 +47,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.its</groupId>

View File

@ -45,6 +45,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -46,6 +46,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -43,11 +43,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>

View File

@ -38,6 +38,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>

View File

@ -47,6 +47,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -47,11 +47,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>

View File

@ -39,11 +39,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.1.0</version>
<scope>provided</scope>
</dependency>
<!-- Test the resolution of the version -->
<dependency>
@ -55,6 +57,10 @@ under the License.
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-verifier</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
</exclusion>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>

View File

@ -47,6 +47,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>

View File

@ -43,6 +43,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -46,6 +46,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -46,6 +46,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>

View File

@ -46,6 +46,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<!--

View File

@ -43,6 +43,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -44,6 +44,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>

View File

@ -39,6 +39,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<!-- plexus -->
<dependency>

View File

@ -43,6 +43,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>

View File

@ -43,6 +43,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>

View File

@ -43,6 +43,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>

View File

@ -39,11 +39,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<!-- Test the resolution of the version -->
<dependency>
@ -55,6 +57,10 @@ under the License.
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-verifier</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
</exclusion>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>

View File

@ -46,21 +46,25 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -45,6 +45,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -42,11 +42,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-settings</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>

View File

@ -23,7 +23,6 @@ import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.settings.Settings;
import org.apache.maven.settings.io.xpp3.SettingsXpp3Writer;
import org.codehaus.plexus.util.IOUtil;
import java.io.File;
import java.io.FileWriter;
@ -59,10 +58,8 @@ public class SettingsReadItMojo
dumpFile.delete();
}
dumpFile.getParentFile().mkdirs();
FileWriter fw = null;
try
try ( FileWriter fw = new FileWriter( dumpFile ) )
{
fw = new FileWriter( dumpFile );
SettingsXpp3Writer writer = new SettingsXpp3Writer();
writer.write( fw, settings );
}
@ -70,11 +67,5 @@ public class SettingsReadItMojo
{
throw new MojoExecutionException( e.getMessage(), e );
}
finally
{
IOUtil.close( fw );
}
}
}

View File

@ -46,6 +46,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>

View File

@ -46,6 +46,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
@ -67,6 +68,12 @@ under the License.
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-exec</artifactId>
<version>1.6.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.maven</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

View File

@ -38,11 +38,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-toolchain</artifactId>
<version>2.0.10</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -40,16 +40,19 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>

View File

@ -43,6 +43,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -39,11 +39,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
<version>2.0.9</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>

View File

@ -56,9 +56,10 @@ under the License.
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${maven-version}</version>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${maven-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>

View File

@ -42,11 +42,13 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>

View File

@ -37,7 +37,6 @@ 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.ProjectBuildingRequest;
import org.codehaus.plexus.util.StringUtils;
import org.eclipse.aether.RepositorySystem;
import org.eclipse.aether.RepositorySystemSession;
import org.eclipse.aether.artifact.ArtifactTypeRegistry;
@ -132,7 +131,7 @@ public class DownloadMojo
throws MojoFailureException
{
Dependency coordinate = new Dependency();
String[] tokens = StringUtils.split( artifact, ":" );
String[] tokens = artifact.split( ":" );
if ( tokens.length < 3 || tokens.length > 5 )
{
throw new MojoFailureException( "Invalid artifact, you must specify "