Skip to content

Commit 62ee583

Browse files
committed
fix execution on parent poms
currently it seems that the plugin fails to work when the compiled classes aren't available (such as parent poms)
1 parent 44d4b45 commit 62ee583

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)