Skip to content

Commit f49e923

Browse files
[MPLUGINTESTING-90] Get rid of maven-compat
1 parent 9e404b5 commit f49e923

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

maven-plugin-testing-harness/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ under the License.
4444
<version>${mavenVersion}</version>
4545
<scope>provided</scope>
4646
</dependency>
47-
<dependency>
48-
<groupId>org.apache.maven</groupId>
49-
<artifactId>maven-compat</artifactId>
50-
<version>${mavenVersion}</version>
51-
<scope>provided</scope>
52-
</dependency>
5347
<dependency>
5448
<groupId>org.apache.maven</groupId>
5549
<artifactId>maven-model</artifactId>

maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737

3838
import com.google.inject.Module;
3939
import org.apache.maven.artifact.Artifact;
40+
import org.apache.maven.artifact.DefaultArtifact;
41+
import org.apache.maven.artifact.handler.DefaultArtifactHandler;
4042
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
4143
import org.apache.maven.execution.DefaultMavenExecutionRequest;
4244
import org.apache.maven.execution.DefaultMavenExecutionResult;
@@ -53,7 +55,6 @@
5355
import org.apache.maven.plugin.descriptor.PluginDescriptor;
5456
import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
5557
import org.apache.maven.project.MavenProject;
56-
import org.apache.maven.repository.RepositorySystem;
5758
import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
5859
import org.codehaus.plexus.ContainerConfiguration;
5960
import org.codehaus.plexus.DefaultContainerConfiguration;
@@ -140,12 +141,14 @@ protected void setUp() throws Exception {
140141

141142
PluginDescriptor pluginDescriptor = new PluginDescriptorBuilder().build(interpolationReader);
142143

143-
Artifact artifact = lookup(RepositorySystem.class)
144-
.createArtifact(
145-
pluginDescriptor.getGroupId(),
146-
pluginDescriptor.getArtifactId(),
147-
pluginDescriptor.getVersion(),
148-
".jar");
144+
Artifact artifact = new DefaultArtifact(
145+
pluginDescriptor.getGroupId(),
146+
pluginDescriptor.getArtifactId(),
147+
pluginDescriptor.getVersion(),
148+
null,
149+
"jar",
150+
null,
151+
new DefaultArtifactHandler("jar"));
149152

150153
artifact.setFile(getPluginArtifactFile());
151154
pluginDescriptor.setPluginArtifact(artifact);

0 commit comments

Comments
 (0)