Skip to content

Commit

Permalink
[FIXED JENKINS-10375] Maven build error if headless option is checked…
Browse files Browse the repository at this point in the history
… and MAVEN_OPTS are empty

Originally-Committed-As: dcabd4ba9a6b6036d697b863dc9bfe21691a3504
  • Loading branch information
kutzi committed Jul 19, 2011
1 parent c0fc442 commit 9ed3903
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/hudson/maven/AbstractMavenProcessFactory.java
Expand Up @@ -276,7 +276,11 @@ public String getMavenOpts() {

if (mms.runHeadless()) {
// Configure headless process
mavenOpts += " -Djava.awt.headless=true";
if (mavenOpts == null) {
mavenOpts = "-Djava.awt.headless=true";
} else {
mavenOpts += " -Djava.awt.headless=true";
}
} else {
if (Platform.isDarwin()) {
// Would be cool to replace the generic Java icon with jenkins logo, but requires
Expand Down

0 comments on commit 9ed3903

Please sign in to comment.