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.
Originally-Committed-As: 088c08485f568cc42e8ec0a9593299d98a19970d
  • Loading branch information
kutzi committed Feb 23, 2013
1 parent dc2215b commit d7bd940
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/hudson/maven/reporters/SurefireArchiver.java
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 d7bd940

Please sign in to comment.