Skip to content
Permalink
Browse files

[JENKINS-11571] Don't print remote log twice.

  • Loading branch information...
uhafner committed Nov 15, 2011
1 parent ccc8720 commit 88a3410bd441bb385705789ca99b574b4bb7a7d9
@@ -10,7 +10,6 @@
import hudson.plugins.analysis.core.BuildResult;
import hudson.plugins.analysis.core.HealthAwarePublisher;
import hudson.plugins.analysis.util.PluginLogger;
import hudson.plugins.analysis.util.StringPluginLogger;
import hudson.plugins.tasks.parser.TasksParserResult;
import hudson.plugins.tasks.parser.WorkspaceScanner;

@@ -201,8 +200,6 @@ public Action getProjectAction(final AbstractProject<?, ?> project) {
@Override
protected BuildResult perform(final AbstractBuild<?, ?> build, final PluginLogger logger) throws InterruptedException, IOException {
TasksParserResult project;
logger.log("Scanning workspace files for tasks...");
new StringPluginLogger("");
WorkspaceScanner scanner = new WorkspaceScanner(StringUtils.defaultIfEmpty(getPattern(), DEFAULT_PATTERN),
getExcludePattern(), getDefaultEncoding(), high, normal, low, ignoreCase, shouldDetectModules());
project = build.getWorkspace().act(scanner);
@@ -197,15 +197,15 @@ protected boolean acceptGoal(final String goal) {
@Override
public TasksParserResult perform(final MavenBuildProxy build, final MavenProject pom, final MojoInfo mojo, final PluginLogger logger) throws InterruptedException, IOException {
FilePath basedir = new FilePath(pom.getBasedir());
logger.log(String.format("Scanning folder '%s' for tasks ... ", basedir));

WorkspaceScanner workspaceScanner = new WorkspaceScanner(
StringUtils.defaultIfEmpty(pattern, DEFAULT_PATTERN),
excludePattern, getDefaultEncoding(), high, normal, low, ignoreCase, pom.getName(),
pom.getModules());
TasksParserResult project = basedir.act(workspaceScanner);
logger.logLines(project.getLogMessages());
logger.log(String.format("Found %d open tasks.", project.getNumberOfAnnotations()));

project.setLog(project.getLogMessages()
+ String.format("Found %d open tasks.\n", project.getNumberOfAnnotations()));

return project;
}

0 comments on commit 88a3410

Please sign in to comment.
You can’t perform that action at this time.