FELIX-4591 : add the ability to specify the classifier in the new baseline configuration of the plugin.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1619332 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/AbstractBaselinePlugin.java b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/AbstractBaselinePlugin.java
index 4c0a5b9..1f53617 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/AbstractBaselinePlugin.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/AbstractBaselinePlugin.java
@@ -28,16 +28,6 @@
import java.util.Map;
import java.util.Set;
-import aQute.bnd.differ.Baseline;
-import aQute.bnd.differ.Baseline.Info;
-import aQute.bnd.differ.DiffPluginImpl;
-import aQute.bnd.osgi.Instructions;
-import aQute.bnd.osgi.Jar;
-import aQute.bnd.osgi.Processor;
-import aQute.bnd.service.diff.Delta;
-import aQute.bnd.service.diff.Diff;
-import aQute.bnd.version.Version;
-import aQute.service.reporter.Reporter;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.factory.ArtifactFactory;
import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
@@ -56,6 +46,17 @@
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.StringUtils;
+import aQute.bnd.differ.Baseline;
+import aQute.bnd.differ.Baseline.Info;
+import aQute.bnd.differ.DiffPluginImpl;
+import aQute.bnd.osgi.Instructions;
+import aQute.bnd.osgi.Jar;
+import aQute.bnd.osgi.Processor;
+import aQute.bnd.service.diff.Delta;
+import aQute.bnd.service.diff.Diff;
+import aQute.bnd.version.Version;
+import aQute.service.reporter.Reporter;
+
/**
* Abstract BND Baseline check between two bundles.
*/
@@ -137,6 +138,13 @@
protected String comparisonVersion;
/**
+ * Classifier for the artifact to compare the current code against.
+ *
+ * @parameter expression="${comparisonClassifier}"
+ */
+ protected String comparisonClassifier;
+
+ /**
* A list of packages filter, if empty the whole bundle will be traversed. Values are specified in OSGi package
* instructions notation, e.g. <code>!org.apache.felix.bundleplugin</code>.
*
@@ -448,7 +456,7 @@
project.getArtifactId(),
range,
project.getPackaging(),
- null,
+ comparisonClassifier,
Artifact.SCOPE_COMPILE );
if ( !previousArtifact.getVersionRange().isSelectedVersionKnown( previousArtifact ) )