Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[FIXED JENKINS-30735] Expand environment variabes in file pattern.
  • Loading branch information
uhafner committed May 25, 2016
1 parent ed839e1 commit 3a9abdb0ddb5b2d34e7d0ed29f7d015a19f67898
Showing with 5 additions and 3 deletions.
  1. +1 −1 pmd.iml
  2. +1 −1 pom.xml
  3. +3 −1 src/main/java/hudson/plugins/pmd/PmdPublisher.java
@@ -21,7 +21,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.jvnet.hudson.plugins:analysis-core:1.75" level="project" />
<orderEntry type="module" module-name="analysis-core" />
<orderEntry type="library" name="Maven: de.java2html:java2html:5.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.3.2" level="project" />
<orderEntry type="library" name="Maven: xerces:xercesImpl:2.11.0" level="project" />
@@ -38,7 +38,7 @@
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-core</artifactId>
<version>1.75</version>
<version>1.77-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
@@ -17,6 +17,7 @@
import hudson.model.Action;
import hudson.model.BuildListener;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.plugins.analysis.core.BuildResult;
import hudson.plugins.analysis.core.FilesParser;
import hudson.plugins.analysis.core.HealthAwarePublisher;
@@ -76,7 +77,8 @@ public Action getProjectAction(final AbstractProject<?, ?> project) {
public BuildResult perform(final Run<?, ?> build, final FilePath workspace, final PluginLogger logger) throws
InterruptedException, IOException {
logger.log("Collecting PMD analysis files...");
FilesParser parser = new FilesParser(PLUGIN_NAME, StringUtils.defaultIfEmpty(getPattern(), DEFAULT_PATTERN),
FilesParser parser = new FilesParser(PLUGIN_NAME,
StringUtils.defaultIfEmpty(expandFilePattern(getPattern(), build.getEnvironment(TaskListener.NULL)), DEFAULT_PATTERN),
new PmdParser(getDefaultEncoding()), shouldDetectModules(), isMavenBuild(build));
ParserResult project = workspace.act(parser);
logger.logLines(project.getLogMessages());

0 comments on commit 3a9abdb

Please sign in to comment.