-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
When create ArtifactResolver with custom local repository or custom remote repository mirror, it can't resolve the pom.
This issues can replay with below code:
@Test
public void testResolvePomWithCustomLocalRepo(){
String localRepo = "D:/Maven/.m2/repo";
String mavenCenterMirror = "http://mirrors.cloud.tencent.com/nexus/repository/maven-public/";
ArtifactResolver artifactResolver = new ArtifactResolver(localRepo, mavenCenterMirror);
File pomFile = new File("src/test/poms/maven-core-3.0.4.pom");
Assert.assertTrue(pomFile.canRead());
List<Artifact> artifacts = artifactResolver.resolvePom(pomFile);
Assert.assertNotNull(artifacts, "artifacts is null");
for (Artifact artifact : artifacts) {
Assert.assertNotNull(artifact.getFile(), "Artifact " + artifact + " is not resolved");
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels