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

Commit

Permalink
[JENKINS-11571] Don't print remote log twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Nov 15, 2011
1 parent ccc8720 commit 88a3410
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/main/java/hudson/plugins/tasks/TasksPublisher.java
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/hudson/plugins/tasks/TasksReporter.java
Expand Up @@ -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;
}
Expand Down

0 comments on commit 88a3410

Please sign in to comment.