Author: gnodet
Date: Thu Jul 9 19:44:41 2015
New Revision: 1690152
URL: http://svn.apache.org/r1690152
Log:
[FELIX-4809] More flexibility for selecting the comparison artifact
Modified:
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/AbstractBaselinePlugin.java
Modified:
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/AbstractBaselinePlugin.java
URL:
http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/AbstractBaselinePlugin.java?rev=1690152&r1=1690151&r2=1690152&view=diff
==============================================================================
---
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/AbstractBaselinePlugin.java
(original)
+++
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/AbstractBaselinePlugin.java
Thu Jul 9 19:44:41 2015
@@ -106,12 +106,30 @@ abstract class AbstractBaselinePlugin
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 @@ abstract class AbstractBaselinePlugin
try
{
previousArtifact =
- factory.createDependencyArtifact( project.getGroupId(),
- project.getArtifactId(),
+ factory.createDependencyArtifact( comparisonGroupId,
+ comparisonArtifactId,
range,
- project.getPackaging(),
+ comparisonPackaging,
comparisonClassifier,
Artifact.SCOPE_COMPILE );