Improve error message with Maven build-image and war packaging
Fixes gh-24522
This commit is contained in:
@@ -180,7 +180,11 @@ public class BuildImageMojo extends AbstractPackagerMojo {
|
||||
name.append("-").append(this.classifier);
|
||||
}
|
||||
name.append(".jar");
|
||||
return new File(this.sourceDirectory, name.toString());
|
||||
File jarFile = new File(this.sourceDirectory, name.toString());
|
||||
if (!jarFile.exists()) {
|
||||
throw new IllegalStateException("Executable jar file required for building image");
|
||||
}
|
||||
return jarFile;
|
||||
}
|
||||
|
||||
private BuildRequest customize(BuildRequest request) {
|
||||
|
||||
Reference in New Issue
Block a user