use of org.apache.maven.plugins.resources.ResourcesMojo in project maven-plugins by apache.
the class CopyResourcesMojoTest method testCopyWithoutFiltering.
public void testCopyWithoutFiltering() throws Exception {
File testPom = new File(getBasedir(), defaultPomFilePath);
ResourcesMojo mojo = (ResourcesMojo) lookupMojo("resources", testPom);
mojo.setOutputDirectory(outputDirectory);
Resource resource = new Resource();
resource.setDirectory(getBasedir() + "/src/test/unit-files/copy-resources-test/no-filter");
resource.setFiltering(false);
mojo.setResources(Collections.singletonList(resource));
MavenProjectResourcesStub project = new MavenProjectResourcesStub("CopyResourcesMojoTest");
File targetFile = new File(getBasedir(), "/target/copyResourcesTests");
project.setBaseDir(targetFile);
setVariableValueToObject(mojo, "project", project);
mojo.execute();
assertTrue(new File(targetFile, "config.properties").exists());
}
Aggregations