Skip to content

Commit 37bb7f9

Browse files
committed
U check if jrePath really points to a JRE
1 parent 62fa8dc commit 37bb7f9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>fvarrui.maven</groupId>
77
<artifactId>javapackager</artifactId>
8-
<version>0.8.8</version>
8+
<version>0.8.9</version>
99
<packaging>maven-plugin</packaging>
1010

1111
<name>JavaPackager Maven Plugin</name>

src/main/java/fvarrui/maven/plugin/javapackager/PackageMojo.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,9 @@ private boolean bundleJre(File jreFolder, File libsFolder) throws MojoExecutionE
739739

740740
// sets execution permissions on executables in jre
741741
File binFolder = new File(jreFolder, "bin");
742+
if (!binFolder.exists()) {
743+
throw new MojoExecutionException("Could not embed JRE from " + jrePath + ": " + binFolder.getAbsolutePath() + " doesn't exist");
744+
}
742745
Arrays.asList(binFolder.listFiles()).forEach(f -> f.setExecutable(true, false));
743746

744747
} else if (JavaUtils.getJavaMajorVersion() <= 8) {

0 commit comments

Comments
 (0)