final File directory = new File(directoryName);
if (!directory.exists()) {
LOGGER.info("Directory '" + directory.getAbsolutePath() + "' does not exist, skipping scan.");
} else {
Store store = getStore();
store.beginTransaction();
try {
final ArtifactDirectoryDescriptor artifactDescriptor = resolveArtifact(artifact, testJar, ArtifactDirectoryDescriptor.class);
consume(scanner.scan(new ClassesDirectory(directory, artifactDescriptor), directoryName, CLASSPATH));
projectDescriptor.getCreatesArtifacts().add(artifactDescriptor);
return artifactDescriptor;