Skip to content

Commit bc2c06b

Browse files
authored
Merge pull request #48 from avaje/fix-parent-pom-execution
Fix execution on parent poms
2 parents 44d4b45 + 62ee583 commit bc2c06b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/main/java/io/avaje/inject/mojo/ModuleSPIMojo.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ public class ModuleSPIMojo extends AbstractMojo {
2222
@Override
2323
public void execute() throws MojoExecutionException {
2424

25-
2625
if (Integer.getInteger("java.specification.version") < 24) {
27-
getLog()
28-
.error(
29-
"This version of the avaje-provides-plugin only works on JDK 24 and up");
26+
getLog().error("This version of the avaje-provides-plugin only works on JDK 24 and up");
3027
return;
3128
}
3229

@@ -50,7 +47,9 @@ private Set<String> compiledClasses() throws MojoExecutionException {
5047
}
5148
return targetClasses;
5249
} catch (final Exception e) {
53-
throw new MojoExecutionException("Failed to get compiled classes", e);
50+
getLog().warn("Failed to get compiled classes", e);
51+
52+
return Set.of();
5453
}
5554
}
5655
}

0 commit comments

Comments
 (0)