Skip to content

Commit 2f5dfc7

Browse files
committed
[MRELEASE-1096] migrate from Plexus to JSR-330/Sisu in tests/ITs
1 parent 281b680 commit 2f5dfc7

File tree

13 files changed

+75
-73
lines changed

13 files changed

+75
-73
lines changed

README.TXT

Lines changed: 0 additions & 11 deletions
This file was deleted.

maven-release-manager/src/test/resources/pomfinder/pom1.xml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -190,34 +190,6 @@
190190
</models>
191191
</configuration>
192192
</plugin>
193-
<plugin>
194-
<groupId>org.codehaus.plexus</groupId>
195-
<artifactId>plexus-maven-plugin</artifactId>
196-
<version>@plexusMavenPluginVersion@</version>
197-
<executions>
198-
<execution>
199-
<id>create-component-descriptor</id>
200-
<phase>generate-resources</phase>
201-
<goals>
202-
<goal>descriptor</goal>
203-
</goals>
204-
</execution>
205-
<execution>
206-
<id>merge</id>
207-
<configuration>
208-
<output>${project.build.outputDirectory}/META-INF/plexus/components.xml</output>
209-
<descriptors>
210-
<descriptor>${project.build.outputDirectory}/META-INF/plexus/components.xml</descriptor>
211-
<descriptor>src/main/components-fragment.xml</descriptor>
212-
</descriptors>
213-
</configuration>
214-
<phase>process-resources</phase>
215-
<goals>
216-
<goal>merge-descriptors</goal>
217-
</goals>
218-
</execution>
219-
</executions>
220-
</plugin>
221193
</plugins>
222194
</build>
223195
</project>

maven-release-plugin/src/it/setup/maven-project-naming-stub-policy/pom.xml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
<artifactId>maven-release-manager</artifactId>
3232
<version>@project.version@</version>
3333
</dependency>
34+
<dependency>
35+
<groupId>javax.inject</groupId>
36+
<artifactId>javax.inject</artifactId>
37+
<version>1</version>
38+
</dependency>
3439
</dependencies>
3540

3641
<build>
@@ -44,14 +49,14 @@
4449
</configuration>
4550
</plugin>
4651
<plugin>
47-
<groupId>org.codehaus.plexus</groupId>
48-
<artifactId>plexus-component-metadata</artifactId>
49-
<version>@plexusComponentMetadataVersion@</version>
52+
<groupId>org.eclipse.sisu</groupId>
53+
<artifactId>sisu-maven-plugin</artifactId>
54+
<version>@sisuVersion@</version>
5055
<executions>
5156
<execution>
52-
<id>process-classes</id>
57+
<id>index-project</id>
5358
<goals>
54-
<goal>generate-metadata</goal>
59+
<goal>main-index</goal>
5560
</goals>
5661
</execution>
5762
</executions>

maven-release-plugin/src/it/setup/maven-project-naming-stub-policy/src/main/java/org/apache/maven/shared/release/policy/stub/StubNamingPolicy.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@
1919
* under the License.
2020
*/
2121

22+
import javax.inject.Named;
23+
import javax.inject.Singleton;
24+
2225
import org.apache.maven.shared.release.policy.naming.NamingPolicy;
2326
import org.apache.maven.shared.release.policy.naming.NamingPolicyRequest;
2427
import org.apache.maven.shared.release.policy.naming.NamingPolicyResult;
2528

26-
import org.codehaus.plexus.component.annotations.Component;
27-
28-
@Component( role = NamingPolicy.class, hint = "StubNamingPolicy" )
29+
@Singleton
30+
@Named( "StubNamingPolicy" )
2931
public final class StubNamingPolicy
3032
implements NamingPolicy
3133
{

maven-release-plugin/src/it/setup/maven-project-version-stub-policy/pom.xml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
<artifactId>maven-release-manager</artifactId>
3737
<version>@project.version@</version>
3838
</dependency>
39+
<dependency>
40+
<groupId>javax.inject</groupId>
41+
<artifactId>javax.inject</artifactId>
42+
<version>1</version>
43+
</dependency>
3944
</dependencies>
4045

4146
<build>
@@ -49,14 +54,14 @@
4954
</configuration>
5055
</plugin>
5156
<plugin>
52-
<groupId>org.codehaus.plexus</groupId>
53-
<artifactId>plexus-component-metadata</artifactId>
54-
<version>@plexusComponentMetadataVersion@</version>
57+
<groupId>org.eclipse.sisu</groupId>
58+
<artifactId>sisu-maven-plugin</artifactId>
59+
<version>@sisuVersion@</version>
5560
<executions>
5661
<execution>
57-
<id>process-classes</id>
62+
<id>index-project</id>
5863
<goals>
59-
<goal>generate-metadata</goal>
64+
<goal>main-index</goal>
6065
</goals>
6166
</execution>
6267
</executions>

maven-release-plugin/src/it/setup/maven-project-version-stub-policy/src/main/java/org/apache/maven/shared/release/policy/stub/StubVersionPolicy.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,18 @@
1919
* under the License.
2020
*/
2121

22+
import javax.inject.Named;
23+
import javax.inject.Singleton;
24+
2225
import org.apache.maven.shared.release.policy.version.VersionPolicy;
2326
import org.apache.maven.shared.release.policy.version.VersionPolicyRequest;
2427
import org.apache.maven.shared.release.policy.version.VersionPolicyResult;
25-
import org.codehaus.plexus.component.annotations.Component;
2628

2729
/**
2830
* A {@link VersionPolicy} implementation that switches continously between shapsnot and release version.
2931
*/
30-
@Component( role = VersionPolicy.class, hint = "StubVersionPolicy" )
32+
@Singleton
33+
@Named( "StubVersionPolicy" )
3134
public final class StubVersionPolicy
3235
implements VersionPolicy
3336
{

maven-release-plugin/src/it/setup/maven-scm-provider-dummy/pom.xml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
<artifactId>maven-scm-api</artifactId>
3535
<version>@scmVersion@</version>
3636
</dependency>
37+
<dependency>
38+
<groupId>javax.inject</groupId>
39+
<artifactId>javax.inject</artifactId>
40+
<version>1</version>
41+
</dependency>
3742
</dependencies>
3843

3944
<build>
@@ -47,13 +52,15 @@
4752
</configuration>
4853
</plugin>
4954
<plugin>
50-
<groupId>org.codehaus.plexus</groupId>
51-
<artifactId>plexus-maven-plugin</artifactId>
52-
<version>@plexusMavenPluginVersion@</version>
55+
<groupId>org.eclipse.sisu</groupId>
56+
<artifactId>sisu-maven-plugin</artifactId>
57+
<version>@sisuVersion@</version>
5358
<executions>
5459
<execution>
60+
<id>index-project</id>
5561
<goals>
56-
<goal>descriptor</goal>
62+
<goal>main-index</goal>
63+
<goal>test-index</goal>
5764
</goals>
5865
</execution>
5966
</executions>

maven-release-plugin/src/it/setup/maven-scm-provider-dummy/src/main/java/org/apache/maven/scm/provider/dummy/DummyScmProvider.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package org.apache.maven.scm.provider.dummy;
22

3+
import javax.inject.Named;
4+
import javax.inject.Singleton;
5+
36
/*
47
* Licensed to the Apache Software Foundation (ASF) under one
58
* or more contributor license agreements. See the NOTICE file
@@ -31,9 +34,10 @@
3134
* A dummy SCM provider used to bypass the {@code ScmCheckModificationsPhase} of the Release Plugin when doing a dry run
3235
* for integration testing.
3336
*
34-
* @plexus.component role="org.apache.maven.scm.provider.ScmProvider" role-hint="dummy"
3537
* @author Benjamin Bentmann
3638
*/
39+
@Singleton
40+
@Named( "dummy" )
3741
public class DummyScmProvider
3842
extends AbstractScmProvider
3943
{

maven-release-plugin/src/it/setup/maven-scm-provider-stub/pom.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
<artifactId>maven-scm-api</artifactId>
3737
<version>@scmVersion@</version>
3838
</dependency>
39+
<dependency>
40+
<groupId>javax.inject</groupId>
41+
<artifactId>javax.inject</artifactId>
42+
<version>1</version>
43+
</dependency>
3944
</dependencies>
4045

4146
<build>
@@ -49,13 +54,14 @@
4954
</configuration>
5055
</plugin>
5156
<plugin>
52-
<groupId>org.codehaus.plexus</groupId>
53-
<artifactId>plexus-maven-plugin</artifactId>
54-
<version>@plexusMavenPluginVersion@</version>
57+
<groupId>org.eclipse.sisu</groupId>
58+
<artifactId>sisu-maven-plugin</artifactId>
59+
<version>@sisuVersion@</version>
5560
<executions>
5661
<execution>
62+
<id>index-project</id>
5763
<goals>
58-
<goal>descriptor</goal>
64+
<goal>main-index</goal>
5965
</goals>
6066
</execution>
6167
</executions>

maven-release-plugin/src/it/setup/maven-scm-provider-stub/src/main/java/org/apache/maven/scm/provider/stub/StubScmProvider.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package org.apache.maven.scm.provider.stub;
22

3+
import javax.inject.Named;
4+
import javax.inject.Singleton;
5+
36
/*
47
* Licensed to the Apache Software Foundation (ASF) under one
58
* or more contributor license agreements. See the NOTICE file
@@ -36,9 +39,10 @@
3639
/**
3740
* A stub SCM provider used for the Maven Release Plugin when doing integration testing.
3841
*
39-
* @plexus.component role="org.apache.maven.scm.provider.ScmProvider" role-hint="stub"
4042
* @author Benjamin Bentmann
4143
*/
44+
@Singleton
45+
@Named( "stub" )
4246
public class StubScmProvider
4347
extends AbstractScmProvider
4448
{

0 commit comments

Comments
 (0)