提交 dcabd4ba 编写于 作者: C Christoph Kutzinski

[FIXED JENKINS-10375] Maven build error if headless option is checked and MAVEN_OPTS are empty

上级 eea84e5f
......@@ -63,6 +63,9 @@ Upcoming changes</a>
<li class=bug>
Fixed an occasional NPE when running Maven jobs
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-9822">issue 9822</a>)
<li class=bug>
Fixed Maven build error if headless option is set and MAVEN_OPTS empty
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-10375">issue 10375</a>)
</ul>
</div><!--=TRUNK-END=-->
......
......@@ -276,7 +276,11 @@ public abstract class AbstractMavenProcessFactory
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册