diff --git a/src/main/groovy/org/codehaus/mojo/spotbugs/PluginArtifact.groovy b/src/main/groovy/org/codehaus/mojo/spotbugs/PluginArtifact.groovy
index 08c427fe..c128a82d 100644
--- a/src/main/groovy/org/codehaus/mojo/spotbugs/PluginArtifact.groovy
+++ b/src/main/groovy/org/codehaus/mojo/spotbugs/PluginArtifact.groovy
@@ -20,4 +20,5 @@ class PluginArtifact {
String artifactId
String version
String type = "jar"
+ String classifier
}
diff --git a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsGui.groovy b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsGui.groovy
index b43a5719..6029ce23 100644
--- a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsGui.groovy
+++ b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsGui.groovy
@@ -87,8 +87,11 @@ class SpotBugsGui extends AbstractMojo implements SpotBugsPluginsTrait {
String pluginList
/**
- * Collection of PluginArtifact to work on. (PluginArtifact contains groupId, artifactId, version, type.)
+ * Collection of PluginArtifact to work on. (PluginArtifact contains groupId, artifactId, version, type, classifier.)
* See Usage for details.
+ *
+ * @since 2.4.1
+ * @since 4.8.3.0 includes classfier
*/
@Parameter
PluginArtifact[] plugins
diff --git a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy
index 908c919d..c7502253 100644
--- a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy
+++ b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy
@@ -434,10 +434,11 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {
String pluginList
/**
- * Collection of PluginArtifact to work on. (PluginArtifact contains groupId, artifactId, version, type.)
+ * Collection of PluginArtifact to work on. (PluginArtifact contains groupId, artifactId, version, type, classifier.)
* See Usage for details.
*
* @since 2.4.1
+ * @since 4.8.3.0 includes classfier
*/
@Parameter
PluginArtifact[] plugins;
diff --git a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsPluginsTrait.groovy b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsPluginsTrait.groovy
index dd9fd95d..639f2c17 100644
--- a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsPluginsTrait.groovy
+++ b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsPluginsTrait.groovy
@@ -99,9 +99,15 @@ trait SpotBugsPluginsTrait {
plugins.each() { plugin ->
log.debug(" Processing Plugin: " + plugin.toString())
- log.debug("groupId is ${plugin['groupId']} ****** artifactId is ${plugin['artifactId']} ****** version is ${plugin['version']} ****** type is ${plugin['type']}")
- pomArtifact = this.factory.createArtifact(plugin['groupId'], plugin['artifactId'], plugin['version'], "", plugin['type'])
- log.debug("pomArtifact is ${pomArtifact} ****** groupId is ${plugin['groupId']} ****** artifactId is ${plugin['artifactId']} ****** version is ${plugin['version']} ****** type is ${plugin['type']}")
+ if (plugin['classifier'] == null) {
+ log.debug("groupId is ${plugin['groupId']} ****** artifactId is ${plugin['artifactId']} ****** version is ${plugin['version']} ****** type is ${plugin['type']}")
+ pomArtifact = this.factory.createArtifact(plugin['groupId'], plugin['artifactId'], plugin['version'], "", plugin['type'])
+ log.debug("pomArtifact is ${pomArtifact} ****** groupId is ${pomArtifact['groupId']} ****** artifactId is ${pomArtifact['artifactId']} ****** version is ${pomArtifact['version']} ****** type is ${pomArtifact['type']}")
+ } else {
+ log.debug("groupId is ${plugin['groupId']} ****** artifactId is ${plugin['artifactId']} ****** version is ${plugin['version']} ****** type is ${plugin['type']} ****** classifier is ${plugin['classifier']}")
+ pomArtifact = this.factory.createArtifactWithClassifier(plugin['groupId'], plugin['artifactId'], plugin['version'], "", plugin['type'], plugin['classifier'])
+ log.debug("pomArtifact is ${pomArtifact} ****** groupId is ${pomArtifact['groupId']} ****** artifactId is ${pomArtifact['artifactId']} ****** version is ${pomArtifact['version']} ****** type is ${pomArtifact['type']} ****** classfier is ${pomArtifact['classifier']}")
+ }
pomArtifact = artifactResolver.resolveArtifact(configuration, pomArtifact).getArtifact()