Skip to content
Permalink
Browse files
[JENKINS-17024] The SLOCCOUNT analysis Results not available in IVY b…
…uilds

- SloccountDescriptor.isApplicable() doesn't consider IVY plugin. The method updated to just return true the same as other similar "publisher" plugins (e.g. Warnings).
- Dependency to Maven plugin can be removed from pom.xml, isApplicable() was the only place where it was referenced.
- Dependency to FindBugs plugin can be removed, it is nowhere referenced. There are "Remainings from the findbugs plugin have been removed" commits in Git log, this dependency was probably forgotten.
- The update was NOT fully tested since I have no IVY project. The only thing i tried is that SLOCCount publisher now appears in configuration of IVY job.
  • Loading branch information
mixalturek committed Jan 4, 2014
1 parent b4e1392 commit 7157fd7ad5d72e17a6d0585c4a3fd1331aa44206
Showing 2 changed files with 5 additions and 15 deletions.
10 pom.xml
@@ -54,15 +54,7 @@
</properties>

<dependencies>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>maven-plugin</artifactId>
</dependency>
<dependency>
<groupId>findbugs</groupId>
<artifactId>annotations</artifactId>
<version>1.0.0</version>
</dependency>
<!-- None -->
</dependencies>

<repositories>
@@ -2,10 +2,7 @@


import hudson.Extension;
import hudson.maven.AbstractMavenProject;
import hudson.model.AbstractProject;
import hudson.model.FreeStyleProject;
import hudson.model.Hudson;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.Publisher;

@@ -20,10 +17,11 @@ public SloccountDescriptor(){
super(SloccountPublisher.class);
}

@SuppressWarnings("rawtypes")
@Override
public boolean isApplicable(Class<? extends AbstractProject> jobType) {
return AbstractMavenProject.class.isAssignableFrom(jobType) ||
FreeStyleProject.class.isAssignableFrom(jobType) ||
jobType.getSimpleName().equals("JobGenerator");
// The plugin is applicable for all job types
return true;
}

@Override

0 comments on commit 7157fd7

Please sign in to comment.