Maven: don't scan target directories for annotations in multimodule project

#KT-7187 Fixed Maven K2JVM compiler scanning for annotations
This commit is contained in:
Sergey Mashkov
2015-05-15 18:12:17 +03:00
parent df6c20efa4
commit 0578f44fd0
@@ -185,7 +185,7 @@ public class K2JVMCompileMojo extends KotlinCompileMojoBase<K2JVMCompilerArgumen
Set<Artifact> artifacts = project.getArtifacts();
for (Artifact artifact : artifacts) {
File file = artifact.getFile();
if (containsAnnotations(file, log)) {
if (file.isFile() && containsAnnotations(file, log)) {
log.info("Discovered kotlin annotations in: " + file);
try {
annotations.add(file.getCanonicalPath());