Skip to content

Commit

Permalink
[MRELEASE-1096] migrate from Plexus to JSR-330/Sisu in tests/ITs
Browse files Browse the repository at this point in the history
  • Loading branch information
hboutemy committed Jun 4, 2022
1 parent 281b680 commit 2f5dfc7
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 73 deletions.
11 changes: 0 additions & 11 deletions README.TXT

This file was deleted.

28 changes: 0 additions & 28 deletions maven-release-manager/src/test/resources/pomfinder/pom1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,34 +190,6 @@
</models>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-maven-plugin</artifactId>
<version>@plexusMavenPluginVersion@</version>
<executions>
<execution>
<id>create-component-descriptor</id>
<phase>generate-resources</phase>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
<execution>
<id>merge</id>
<configuration>
<output>${project.build.outputDirectory}/META-INF/plexus/components.xml</output>
<descriptors>
<descriptor>${project.build.outputDirectory}/META-INF/plexus/components.xml</descriptor>
<descriptor>src/main/components-fragment.xml</descriptor>
</descriptors>
</configuration>
<phase>process-resources</phase>
<goals>
<goal>merge-descriptors</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
<artifactId>maven-release-manager</artifactId>
<version>@project.version@</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
</dependencies>

<build>
Expand All @@ -44,14 +49,14 @@
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-metadata</artifactId>
<version>@plexusComponentMetadataVersion@</version>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
<version>@sisuVersion@</version>
<executions>
<execution>
<id>process-classes</id>
<id>index-project</id>
<goals>
<goal>generate-metadata</goal>
<goal>main-index</goal>
</goals>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
* under the License.
*/

import javax.inject.Named;
import javax.inject.Singleton;

import org.apache.maven.shared.release.policy.naming.NamingPolicy;
import org.apache.maven.shared.release.policy.naming.NamingPolicyRequest;
import org.apache.maven.shared.release.policy.naming.NamingPolicyResult;

import org.codehaus.plexus.component.annotations.Component;

@Component( role = NamingPolicy.class, hint = "StubNamingPolicy" )
@Singleton
@Named( "StubNamingPolicy" )
public final class StubNamingPolicy
implements NamingPolicy
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
<artifactId>maven-release-manager</artifactId>
<version>@project.version@</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
</dependencies>

<build>
Expand All @@ -49,14 +54,14 @@
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-metadata</artifactId>
<version>@plexusComponentMetadataVersion@</version>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
<version>@sisuVersion@</version>
<executions>
<execution>
<id>process-classes</id>
<id>index-project</id>
<goals>
<goal>generate-metadata</goal>
<goal>main-index</goal>
</goals>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@
* under the License.
*/

import javax.inject.Named;
import javax.inject.Singleton;

import org.apache.maven.shared.release.policy.version.VersionPolicy;
import org.apache.maven.shared.release.policy.version.VersionPolicyRequest;
import org.apache.maven.shared.release.policy.version.VersionPolicyResult;
import org.codehaus.plexus.component.annotations.Component;

/**
* A {@link VersionPolicy} implementation that switches continously between shapsnot and release version.
*/
@Component( role = VersionPolicy.class, hint = "StubVersionPolicy" )
@Singleton
@Named( "StubVersionPolicy" )
public final class StubVersionPolicy
implements VersionPolicy
{
Expand Down
15 changes: 11 additions & 4 deletions maven-release-plugin/src/it/setup/maven-scm-provider-dummy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
<artifactId>maven-scm-api</artifactId>
<version>@scmVersion@</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
</dependencies>

<build>
Expand All @@ -47,13 +52,15 @@
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-maven-plugin</artifactId>
<version>@plexusMavenPluginVersion@</version>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
<version>@sisuVersion@</version>
<executions>
<execution>
<id>index-project</id>
<goals>
<goal>descriptor</goal>
<goal>main-index</goal>
<goal>test-index</goal>
</goals>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package org.apache.maven.scm.provider.dummy;

import javax.inject.Named;
import javax.inject.Singleton;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down Expand Up @@ -31,9 +34,10 @@
* A dummy SCM provider used to bypass the {@code ScmCheckModificationsPhase} of the Release Plugin when doing a dry run
* for integration testing.
*
* @plexus.component role="org.apache.maven.scm.provider.ScmProvider" role-hint="dummy"
* @author Benjamin Bentmann
*/
@Singleton
@Named( "dummy" )
public class DummyScmProvider
extends AbstractScmProvider
{
Expand Down
14 changes: 10 additions & 4 deletions maven-release-plugin/src/it/setup/maven-scm-provider-stub/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
<artifactId>maven-scm-api</artifactId>
<version>@scmVersion@</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
</dependencies>

<build>
Expand All @@ -49,13 +54,14 @@
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-maven-plugin</artifactId>
<version>@plexusMavenPluginVersion@</version>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
<version>@sisuVersion@</version>
<executions>
<execution>
<id>index-project</id>
<goals>
<goal>descriptor</goal>
<goal>main-index</goal>
</goals>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package org.apache.maven.scm.provider.stub;

import javax.inject.Named;
import javax.inject.Singleton;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down Expand Up @@ -36,9 +39,10 @@
/**
* A stub SCM provider used for the Maven Release Plugin when doing integration testing.
*
* @plexus.component role="org.apache.maven.scm.provider.ScmProvider" role-hint="stub"
* @author Benjamin Bentmann
*/
@Singleton
@Named( "stub" )
public class StubScmProvider
extends AbstractScmProvider
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
<artifactId>wagon-provider-api</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
</dependencies>

<build>
Expand All @@ -49,13 +54,15 @@
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-maven-plugin</artifactId>
<version>@plexusMavenPluginVersion@</version>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
<version>@sisuVersion@</version>
<executions>
<execution>
<id>index-project</id>
<goals>
<goal>descriptor</goal>
<goal>main-index</goal>
<goal>test-index</goal>
</goals>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import java.io.File;
import java.util.List;

import javax.inject.Named;

import org.apache.maven.wagon.ConnectionException;
import org.apache.maven.wagon.ResourceDoesNotExistException;
import org.apache.maven.wagon.TransferFailedException;
Expand All @@ -39,9 +41,8 @@
* DummyWagonProvider which does absolutely nothing
*
* @author Robert Scholte
*
* @plexus.component role="org.apache.maven.wagon.Wagon" role-hint="dummy" instantiation-strategy="per-lookup"
*/
@Named( "dummy" )
public class DummyWagonProvider implements Wagon
{

Expand Down
3 changes: 0 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@

<mavenCompilerPluginVersion>3.10.1</mavenCompilerPluginVersion>
<mavenInvokerPluginVersion>3.2.2</mavenInvokerPluginVersion>

<plexusComponentMetadataVersion>1.7.1</plexusComponentMetadataVersion>
<plexusMavenPluginVersion>1.3.8</plexusMavenPluginVersion>
</properties>

<build>
Expand Down

0 comments on commit 2f5dfc7

Please sign in to comment.