Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files
[FIXED JENKINS-14024] Added option to allow disabling of time expensive
operation that resolves relative paths by scanning the whole workspace.
  • Loading branch information
uhafner committed Jun 15, 2012
1 parent fd4ba2b commit 1e119381e25747f638c2022d1bd31de0a85eff7f
@@ -36,7 +36,7 @@
@@ -113,6 +113,10 @@ public class WarningsPublisher extends HealthAwarePublisher {
* Ant file-set pattern of files to include in report
* @param excludePattern
* Ant file-set pattern of files to exclude from report
* @param canResolveRelativePaths
* determines whether relative paths in warnings should be
* resolved using a time expensive operation that scans the whole
* workspace for matching files.
@@ -124,14 +128,14 @@ public WarningsPublisher(final String healthy, final String unHealthy, final Str
final String failedTotalAll, final String failedTotalHigh, final String failedTotalNormal, final String failedTotalLow,
final String failedNewAll, final String failedNewHigh, final String failedNewNormal, final String failedNewLow,
final boolean canRunOnFailed, final boolean shouldDetectModules, final boolean canComputeNew,
final String includePattern, final String excludePattern,
final String includePattern, final String excludePattern, final boolean canResolveRelativePaths,
final List<ParserConfiguration> parserConfigurations, final List<ConsoleParser> consoleParsers) {
super(healthy, unHealthy, thresholdLimit, defaultEncoding, useDeltaValues,
unstableTotalAll, unstableTotalHigh, unstableTotalNormal, unstableTotalLow,
unstableNewAll, unstableNewHigh, unstableNewNormal, unstableNewLow,
failedTotalAll, failedTotalHigh, failedTotalNormal, failedTotalLow,
failedNewAll, failedNewHigh, failedNewNormal, failedNewLow,
canRunOnFailed, shouldDetectModules, canComputeNew, PLUGIN_NAME);
canRunOnFailed, shouldDetectModules, canComputeNew, canResolveRelativePaths, PLUGIN_NAME);
this.includePattern = StringUtils.stripToNull(includePattern);
this.excludePattern = StringUtils.stripToNull(excludePattern);
if (consoleParsers != null) {
@@ -290,7 +294,14 @@ private List<ParserResult> parseConsoleLog(final AbstractBuild<?, ?> build,
if (!build.getWorkspace().isRemote()) {
guessModuleNames(build, warnings);
ParserResult project = new ParserResult(build.getWorkspace());
ParserResult project;
if (canResolveRelativePaths()) {
project = new ParserResult(build.getWorkspace());
else {
project = new ParserResult();
project = new ParserResult(build.getWorkspace());
results.add(annotate(build, project, parserName));
@@ -316,7 +327,7 @@ private List<ParserResult> parseFiles(final AbstractBuild<?, ?> build, final Plu

FilesParser parser = new FilesParser(PLUGIN_NAME, filePattern,
new FileWarningsParser(ParserRegistry.getParsers(parserName), getDefaultEncoding(), getIncludePattern(), getExcludePattern()),
shouldDetectModules(), isMavenBuild(build));
shouldDetectModules(), isMavenBuild(build), canResolveRelativePaths());
ParserResult project = build.getWorkspace().act(parser);

@@ -26,6 +26,9 @@
<f:entry title="${%Detect modules}" description="${%description.detectModules}">
<f:checkbox name="shouldDetectModules" checked="${instance.shouldDetectModules}"/>
<f:entry title="${%Resolve relative paths}" description="${%description.resolveRelativePaths}">
<f:checkbox name="canResolveRelativePaths" checked="${instance.canResolveRelativePaths}"/>

<u:health id="warnings"/>
<u:thresholds id="warnings"/>
@@ -17,4 +17,6 @@ description.excludePattern=Comma separated list of \
description.detectModules=Determines if Ant or Maven modules should be detected for all files that contain \
warnings. Activating this option may increase your build time since the detector scans the whole \
workspace for ''build.xml'' or ''pom.xml'' files in order to assign the correct module names.
description.resolveRelativePaths=Determines if relative paths in warnings should be resolved using a time expensive operation \
that scans the whole workspace for matching files. Deactivate this option if you encounter performance problems.
configure=You can define the default values for the trend graph in a separate view.
@@ -22,3 +22,6 @@ description.detectModules=Bestimmt ob Dateien, die Warnungen enthalten, nach Pro
Da dazu der gesamte Arbeitsbereich nach ''build.xml'' oder ''pom.xml'' Dateien durchsucht wird, kann je \
nach Größe des Arbeitsbereichs die Dauer eines Builds erheblich erhöht werden.
Detect\ modules=Projekte automatisch erkennen
Resolve\ relative\ paths=Relative Pfade auflösen
description.resolveRelativePaths=Falls aktiviert, werden relative Pfade für betroffene Dateien durch absolute Pfade ersetzt. \
Diese Operation benötigt viel Zeit in großen Arbeitsbereichen und sollte daher bei Performanceproblemen deaktiviert werden.

1 comment on commit 1e11938

Copy link

@buildhive buildhive commented on 1e11938 Jun 15, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jenkins » warnings-plugin #43 FAILURE
Looks like this commit caused a build failure
(what's this?)

Please sign in to comment.