Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[JENKINS-31202] Make remaining plugins compatible to SimpleBuildStep.
checkstyle, dry, findbugs, pmd, tasks, analysis-collector.
  • Loading branch information
uhafner committed Nov 13, 2016
1 parent a73b997 commit 3fda8ed3752bc5404f936c1e65ee9c37e3ea13b0
Showing with 83 additions and 74 deletions.
  1. +8 −0 go.sh
  2. +56 −56 pmd.iml
  3. +1 −1 pom.xml
  4. +10 −10 src/main/java/hudson/plugins/pmd/PmdProjectAction.java
  5. +0 −7 src/main/java/hudson/plugins/pmd/PmdPublisher.java
  6. +8 −0 src/main/java/hudson/plugins/pmd/PmdResultAction.java
8 go.sh
@@ -0,0 +1,8 @@
rm -rf $JENKINS_HOME/plugins/pmd*

mvn install || { echo "Build failed"; exit 1; }

cp -f target/*.hpi $JENKINS_HOME/plugins/

cd $JENKINS_HOME
./go.sh
112 pmd.iml

Large diffs are not rendered by default.

@@ -38,7 +38,7 @@
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-core</artifactId>
<version>1.77</version>
<version>1.80-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
@@ -1,8 +1,8 @@
package hudson.plugins.pmd;

import hudson.model.AbstractProject;
import hudson.plugins.analysis.core.ResultAction;
import hudson.model.Job;
import hudson.plugins.analysis.core.AbstractProjectAction;
import hudson.plugins.analysis.core.ResultAction;

/**
* Entry point to visualize the PMD trend graph in the project screen. Drawing
@@ -14,24 +14,24 @@ public class PmdProjectAction extends AbstractProjectAction<ResultAction<PmdResu
/**
* Instantiates a new {@link PmdProjectAction}.
*
* @param project
* the project that owns this action
* @param job
* the job that owns this action
*/
public PmdProjectAction(final AbstractProject<?, ?> project) {
this(project, PmdResultAction.class);
public PmdProjectAction(final Job<?, ?> job) {
this(job, PmdResultAction.class);
}

/**
* Instantiates a new {@link PmdProjectAction}.
*
* @param project
* the project that owns this action
* @param job
* the job that owns this action
* @param type
* the result action type
*/
public PmdProjectAction(final AbstractProject<?, ?> project,
public PmdProjectAction(final Job<?, ?> job,
final Class<? extends ResultAction<PmdResult>> type) {
super(project, type, Messages._PMD_ProjectAction_Name(), Messages._PMD_Trend_Name(),
super(job, type, Messages._PMD_ProjectAction_Name(), Messages._PMD_Trend_Name(),
PmdDescriptor.PLUGIN_ID, PmdDescriptor.ICON_URL, PmdDescriptor.RESULT_URL);
}
}
@@ -13,8 +13,6 @@
import hudson.Launcher;
import hudson.matrix.MatrixAggregator;
import hudson.matrix.MatrixBuild;
import hudson.model.AbstractProject;
import hudson.model.Action;
import hudson.model.BuildListener;
import hudson.model.Run;
import hudson.model.TaskListener;
@@ -68,11 +66,6 @@ public void setPattern(final String pattern) {
this.pattern = pattern;
}

@Override
public Action getProjectAction(final AbstractProject<?, ?> project) {
return new PmdProjectAction(project);
}

@Override
public BuildResult perform(final Run<?, ?> build, final FilePath workspace, final PluginLogger logger) throws
InterruptedException, IOException {
@@ -1,5 +1,8 @@
package hudson.plugins.pmd;

import java.util.Collection;

import hudson.model.Action;
import hudson.model.Run;
import hudson.plugins.analysis.core.AbstractResultAction;
import hudson.plugins.analysis.core.HealthDescriptor;
@@ -31,6 +34,11 @@ public PmdResultAction(final Run<?, ?> owner, final HealthDescriptor healthDescr
super(owner, new PmdHealthDescriptor(healthDescriptor), result);
}

@Override
public Collection<? extends Action> getProjectActions() {
return asSet(new PmdProjectAction(getJob()));
}

@Override
public String getDisplayName() {
return Messages.PMD_ProjectAction_Name();

0 comments on commit 3fda8ed

Please sign in to comment.