use of org.apache.maven.plugin.testing.MojoRule in project jib by google.
the class TestRepository method before.
@Override
protected void before() throws ComponentLookupException, URISyntaxException, MalformedURLException {
MojoRule testHarness = new MojoRule();
ArtifactRepositoryFactory artifactRepositoryFactory = testHarness.lookup(ArtifactRepositoryFactory.class);
artifactResolver = testHarness.lookup(ArtifactResolver.class);
jarHandler = testHarness.lookup(ArtifactHandlerManager.class).getArtifactHandler("jar");
testLocalRepo = artifactRepositoryFactory.createArtifactRepository("test", Resources.getResource(TEST_M2).toURI().toURL().toString(), new DefaultRepositoryLayout(), null, null);
}
use of org.apache.maven.plugin.testing.MojoRule in project jib by GoogleContainerTools.
the class TestRepository method before.
@Override
protected void before() throws ComponentLookupException, URISyntaxException, MalformedURLException {
MojoRule testHarness = new MojoRule();
ArtifactRepositoryFactory artifactRepositoryFactory = testHarness.lookup(ArtifactRepositoryFactory.class);
artifactResolver = testHarness.lookup(ArtifactResolver.class);
jarHandler = testHarness.lookup(ArtifactHandlerManager.class).getArtifactHandler("jar");
testLocalRepo = artifactRepositoryFactory.createArtifactRepository("test", Resources.getResource(TEST_M2).toURI().toURL().toString(), new DefaultRepositoryLayout(), null, null);
}
Aggregations