Java Code Examples for org.apache.maven.plugin.testing.stubs.ArtifactStub#setArtifactId()

The following examples show how to use org.apache.maven.plugin.testing.stubs.ArtifactStub#setArtifactId() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: A_ModuleGenerator.java    From deadcode4j with Apache License 2.0 6 votes vote down vote up
private MavenProject givenMavenProject(String projectId) {
    MavenProject mavenProject = new MavenProject();
    mavenProject.setGroupId("de.is24.junit");
    mavenProject.setArtifactId(projectId);
    mavenProject.setVersion("42");
    mavenProject.getProperties().setProperty("project.build.sourceEncoding", "UTF-8");
    ArtifactStub projectArtifact = new ArtifactStub();
    projectArtifact.setGroupId("de.is24.junit");
    projectArtifact.setArtifactId(projectId);
    projectArtifact.setVersion("42");
    mavenProject.setArtifact(projectArtifact);
    Build build = new Build();
    build.setOutputDirectory(tempFileRule.getTempFile().getParent());
    mavenProject.setBuild(build);
    return mavenProject;
}
 
Example 2
Source File: ProjectStub.java    From deadcode4j with Apache License 2.0 5 votes vote down vote up
public ProjectStub() {
    ArtifactStub artifact = new ArtifactStub();
    artifact.setGroupId("de.is24.junit");
    artifact.setArtifactId("project");
    artifact.setVersion("42");
    setArtifact(artifact);
    setGroupId(artifact.getGroupId());
    setArtifactId(artifact.getArtifactId());
    setVersion(artifact.getVersion());
    setPackaging("jar");

    setCompileSourceRoots(newArrayList("src/test/java/"));

    properties.setProperty("project.build.sourceEncoding", "UTF-8");
}