in maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ArtifactStubFactory.java [145:166]
public Artifact createArtifact(
String groupId,
String artifactId,
VersionRange versionRange,
String scope,
String type,
String classifier,
boolean optional)
throws IOException {
ArtifactHandler ah = new DefaultArtifactHandlerStub(type, classifier);
Artifact artifact =
new DefaultArtifact(groupId, artifactId, versionRange, scope, type, classifier, ah, optional);
// i have no idea why this needs to be done manually when isSnapshot is able to figure it out.
artifact.setRelease(!artifact.isSnapshot());
if (createFiles) {
setArtifactFile(artifact, this.workingDir, this.srcFile, this.createUnpackableFile);
}
return artifact;
}