use of org.apache.maven.artifact.handler.DefaultArtifactHandler in project maven-plugins by apache.
the class RemoteResourcesMojoTest method testSimpleBundles.
public void testSimpleBundles() throws Exception {
final MavenProjectResourcesStub project = createTestProject("default-simplebundles");
final ProcessRemoteResourcesMojo mojo = lookupProcessMojoWithSettings(project, new String[] { "test:test:1.0" });
setupDefaultProject(project);
ArtifactRepository repo = (ArtifactRepository) getVariableValueFromObject(mojo, "localRepository");
String path = repo.pathOf(new DefaultArtifact("test", "test", VersionRange.createFromVersion("1.0"), null, "jar", "", new DefaultArtifactHandler()));
File file = new File(repo.getBasedir() + "/" + path + ".jar");
file.getParentFile().mkdirs();
buildResourceBundle("default-simplebundles-create", null, new String[] { "SIMPLE.txt" }, file);
mojo.execute();
file = (File) getVariableValueFromObject(mojo, "outputDirectory");
file = new File(file, "SIMPLE.txt");
assertTrue(file.exists());
}
Aggregations