File tree 1 file changed +15
-1
lines changed
src/main/java/com/akathist/maven/plugins/launch4j
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ public class Launch4jMojo extends AbstractMojo {
137
137
* in order to avoid opening a DOS window.
138
138
* Choosing gui also enables other options like taskbar icon and a splash screen.
139
139
*/
140
- @ Parameter
140
+ @ Parameter ( defaultValue = "console" , required = true )
141
141
private String headerType ;
142
142
143
143
/**
@@ -350,6 +350,8 @@ private void doExecute() throws MojoExecutionException {
350
350
getLog ().debug ("Skipping execution of the plugin" );
351
351
return ;
352
352
}
353
+
354
+ fillSensibleJreDefaults ();
353
355
354
356
if (!disableVersionInfoDefaults ) {
355
357
try {
@@ -491,6 +493,18 @@ private void doExecute() throws MojoExecutionException {
491
493
}
492
494
}
493
495
}
496
+
497
+ private void fillSensibleJreDefaults () throws MojoExecutionException {
498
+ if (jre == null ) {
499
+ jre = new Jre ();
500
+ }
501
+
502
+ if (jre .path == null ) {
503
+ String pathDef = "%JAVA_HOME%;%PATH%" ;
504
+ getLog ().warn ("jre.path not set, defaulting to \" " + pathDef + "\" " );
505
+ jre .path = pathDef ;
506
+ }
507
+ }
494
508
495
509
/**
496
510
* Prepares a little directory for launch4j to do its thing. Launch4j needs a bunch of object files
You can’t perform that action at this time.
0 commit comments