@Override
public Void run(Store store) throws MojoExecutionException {
Artifact artifact = project.getArtifact();
String type = testJar ? ARTIFACTTYPE_TEST_JAR : artifact.getType();
String id = createArtifactDescriptorId(artifact.getGroupId(), artifact.getArtifactId(), type, artifact.getClassifier(), artifact.getVersion());
ArtifactDescriptor descriptor = store.find(ArtifactDescriptor.class, id);
if (descriptor == null) {
descriptor = store.create(ArtifactDescriptor.class, id);
descriptor.setGroup(artifact.getGroupId());
descriptor.setName(artifact.getArtifactId());
descriptor.setVersion(artifact.getVersion());
descriptor.setClassifier(artifact.getClassifier());
descriptor.setType(type);
}
List<ArtifactScannerPlugin> scannerPlugins = new ArrayList<>();
scannerPlugins.add(new PackageScannerPlugin());
scannerPlugins.add(new ClassScannerPlugin());
ArtifactScanner scanner = new ArtifactScannerImpl(store, scannerPlugins);