Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
[FIXED JENKINS-16250] Use outputPath configuration option if available.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Feb 13, 2013
1 parent 567fec4 commit f314904
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 2 deletions.
Empty file modified plugin/clean.sh 100644 → 100755
Empty file.
Empty file modified plugin/debug.sh 100644 → 100755
Empty file.
Empty file modified plugin/german.sh 100644 → 100755
Empty file.
Empty file modified plugin/go.sh 100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion plugin/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-pom</artifactId>
<version>1.40</version>
<version>1.42</version>
<relativePath>../../analysis-pom/pom.xml</relativePath>
</parent>

Expand Down
@@ -1,5 +1,6 @@
package hudson.plugins.findbugs;

import hudson.FilePath;
import hudson.maven.MavenAggregatedReport;
import hudson.maven.MavenBuildProxy;
import hudson.maven.MojoInfo;
Expand All @@ -11,6 +12,7 @@
import hudson.plugins.analysis.core.ParserResult;
import hudson.plugins.analysis.util.PluginLogger;
import hudson.plugins.findbugs.parser.FindBugsParser;
import hudson.remoting.VirtualChannel;

import java.io.IOException;
import java.util.ArrayList;
Expand Down Expand Up @@ -170,7 +172,16 @@ public ParserResult perform(final MavenBuildProxy build, final MavenProject pom,
FilesParser findBugsCollector = new FilesParser(PLUGIN_NAME, determineFileName(mojo),
new FindBugsParser(sources, isRankActivated), getModuleName(pom));

return getTargetPath(pom).act(findBugsCollector);
return getOutputPath(mojo, pom).act(findBugsCollector);
}

private FilePath getOutputPath(final MojoInfo mojo, final MavenProject pom) {
try {
return new FilePath((VirtualChannel)null, mojo.getConfigurationValue("findbugsXmlOutputDirectory", String.class));
}
catch (ComponentConfigurationException exception) {
return getTargetPath(pom);
}
}

@Override
Expand Down

0 comments on commit f314904

Please sign in to comment.