setVariableValueToObject(mojo, "useEclipseDefaultExcludes",
Boolean.TRUE);
setVariableValueToObject(mojo, "addLicenseHeaders", "false");
final Build build = new Build();
build.setDirectory(buildDirectory.getPath());
final MavenProjectStub project = new MavenProjectStub() {
@Override
public Build getBuild() {
return build;
}
};
setVariableValueToObject(mojo, "project", project);
assertNotNull(
"Problem in test setup - you are missing a project in your mojo.",
project);
assertNotNull(
"The mojo is missing its MavenProject, which will result in an NPE during rat runs.",
mojo.getProject());
assertNotNull(
"No artifactRepos found, which will result in an NPE during rat runs.",
project.getRemoteArtifactRepositories());
if (mojo instanceof RatReportMojo) {
setVariableValueToObject(mojo, "localRepository",
newArtifactRepository(container));
setVariableValueToObject(mojo, "resolver", newArtifactResolver());