Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-30735] Expand environment variabes in file pattern.
  • Loading branch information
uhafner committed May 25, 2016
1 parent ed839e1 commit 3a9abdb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pmd.iml
Expand Up @@ -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" />
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -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>
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/hudson/plugins/pmd/PmdPublisher.java
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 3a9abdb

Please sign in to comment.