Skip to content

Commit

Permalink
[FIXED JENKINS-16928] Don't create mojo config key if it didn't exist.
Browse files Browse the repository at this point in the history
Fixes: Maven2 builds with non-standard test mojos failed.
  • Loading branch information
kutzi committed Feb 23, 2013
1 parent 2edf322 commit 088c084
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog.html
Expand Up @@ -61,6 +61,9 @@
<li class=bug>
“Build” from job context menu produced a confusing warning page.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-16844">issue 16844</a>)
<li class=bug>
Maven2 builds with non-standard test plugins failed.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-16928">issue 16928</a>)
</ul>
</div><!--=TRUNK-END=-->

Expand Down
Expand Up @@ -93,7 +93,7 @@ public boolean preExecute(MavenBuildProxy build, MavenProject pom, MojoInfo mojo
// Many test plugins have - as surefire - a configuration key 'testFailureIgnore' which defaults to
// ${maven.test.failure.ignore}, so just try that one and change value to true,
// if it's still at that default:
XmlPlexusConfiguration c = (XmlPlexusConfiguration) mojo.configuration.getChild("testFailureIgnore");
XmlPlexusConfiguration c = (XmlPlexusConfiguration) mojo.configuration.getChild("testFailureIgnore",false);
if(c!=null && c.getValue() != null && c.getValue().equals("${maven.test.failure.ignore}") && System.getProperty("maven.test.failure.ignore")==null) {
if (build.getMavenBuildInformation().isMaven3OrLater()) {
String fieldName = "testFailureIgnore";
Expand Down

0 comments on commit 088c084

Please sign in to comment.