use of org.apache.maven.artifact.factory.DefaultArtifactFactory in project maven-plugins by apache.
the class TestClassifierTypeTranslator method setUp.
protected void setUp() throws Exception {
super.setUp("classifiertype-translator", false);
artifactHandlerManager = new DefaultArtifactHandlerManager();
this.setVariableValueToObject(artifactHandlerManager, "artifactHandlers", new HashMap());
artifactFactory = new DefaultArtifactFactory();
this.setVariableValueToObject(artifactFactory, "artifactHandlerManager", artifactHandlerManager);
artifactRepository = new StubArtifactRepository(null);
DependencyArtifactStubFactory factory = new DependencyArtifactStubFactory(null, false);
artifacts = factory.getMixedArtifacts();
repoManager = lookup(RepositoryManager.class);
MavenSession session = newMavenSession(new MavenProjectStub());
buildingRequest = session.getProjectBuildingRequest();
DefaultRepositorySystemSession repoSession = (DefaultRepositorySystemSession) session.getRepositorySession();
repoSession.setLocalRepositoryManager(new SimpleLocalRepositoryManager(stubFactory.getWorkingDir()));
}
use of org.apache.maven.artifact.factory.DefaultArtifactFactory in project maven-plugins by apache.
the class DependencyTestUtils method getArtifactFactory.
public static ArtifactFactory getArtifactFactory() throws IllegalAccessException {
ArtifactFactory artifactFactory;
ArtifactHandlerManager manager = new DefaultArtifactHandlerManager();
setVariableValueToObject(manager, "artifactHandlers", new HashMap());
artifactFactory = new DefaultArtifactFactory();
setVariableValueToObject(artifactFactory, "artifactHandlerManager", manager);
return artifactFactory;
}
Aggregations