[FELIX-4809] More flexibility for selecting the comparison artifact
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1690152 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 591ccbe..c7c88c3 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
@@ -106,12 +106,30 @@
private ArtifactMetadataSource metadataSource;
/**
+ * Group id to compare the current code against.
+ */
+ @Parameter( defaultValue = "${project.groupId}", property="comparisonGroupId" )
+ protected String comparisonGroupId;
+
+ /**
+ * Artifact to compare the current code against.
+ */
+ @Parameter( defaultValue = "${project.artifactId}", property="comparisonArtifactId" )
+ protected String comparisonArtifactId;
+
+ /**
* Version to compare the current code against.
*/
@Parameter( defaultValue = "(,${project.version})", property="comparisonVersion" )
protected String comparisonVersion;
/**
+ * Artifact to compare the current code against.
+ */
+ @Parameter( defaultValue = "${project.packaging}", property="comparisonPackaging" )
+ protected String comparisonPackaging;
+
+ /**
* Classifier for the artifact to compare the current code against.
*/
@Parameter( property="comparisonClassifier" )
@@ -434,10 +452,10 @@
try
{
previousArtifact =
- factory.createDependencyArtifact( project.getGroupId(),
- project.getArtifactId(),
+ factory.createDependencyArtifact( comparisonGroupId,
+ comparisonArtifactId,
range,
- project.getPackaging(),
+ comparisonPackaging,
comparisonClassifier,
Artifact.SCOPE_COMPILE );