Skip to content

Commit

Permalink
Fixed bug that would hide the failure of the nested jvm
Browse files Browse the repository at this point in the history
This should avoid maven ignoring a failure in the generate-sources phase
  • Loading branch information
DavyLandman committed Apr 17, 2024
1 parent 2c14a92 commit ab61bf9
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,14 @@ public void execute() throws MojoExecutionException {
ProcessBuilder builder = new ProcessBuilder(command);
builder.directory(project.getBasedir());
Process process = builder.inheritIO().start();
process.waitFor();
}
int result = process.waitFor();
if (result != 0) {
throw new MojoExecutionException("Generate sources failed to complete");
}
}
catch (IOException e) {
getLog().error(e);
}
}
catch (InterruptedException e) {
getLog().warn(e);
}
Expand Down

0 comments on commit ab61bf9

Please sign in to comment.