felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1656406 - /felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/AbstractBaselinePlugin.java
Date Mon, 02 Feb 2015 08:26:13 GMT
Author: cziegeler
Date: Mon Feb  2 08:26:13 2015
New Revision: 1656406

URL: http://svn.apache.org/r1656406
Log:
FELIX-4666 : The baseline goal should print out the resolved version used for comparison.
Apply patch from Robert Munteanu

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=1656406&r1=1656405&r2=1656406&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
Mon Feb  2 08:26:13 2015
@@ -183,7 +183,8 @@ abstract class AbstractBaselinePlugin
             return;
         }
 
-        final Jar previousBundle = getPreviousBundle();
+        final Artifact previousArtifact = getPreviousArtifact();
+        final Jar previousBundle = openJar(previousArtifact.getFile());
         if ( previousBundle == null )
         {
             getLog().info( "Not generating Baseline report as there is no previous version
of the library to compare against" );
@@ -214,7 +215,7 @@ abstract class AbstractBaselinePlugin
             Set<Info> infoSet = new Baseline( reporter, new DiffPluginImpl() )
                                 .baseline( currentBundle, previousBundle, packageFilters
);
 
-            startBaseline( generationDate, project.getArtifactId(), project.getVersion(),
comparisonVersion );
+            startBaseline( generationDate, project.getArtifactId(), project.getVersion(),
previousArtifact.getVersion() );
 
             final Info[] infos = infoSet.toArray( new Info[infoSet.size()] );
             Arrays.sort( infos, new InfoComparator() );
@@ -434,7 +435,7 @@ abstract class AbstractBaselinePlugin
         return openJar( currentBundle );
     }
 
-    private Jar getPreviousBundle()
+    private Artifact getPreviousArtifact()
         throws MojoFailureException, MojoExecutionException
     {
         // Find the previous version JAR and resolve it, and it's dependencies
@@ -504,7 +505,7 @@ abstract class AbstractBaselinePlugin
                 + " does not exist on local/remote repositories", anfe );
         }
 
-        return openJar( previousArtifact.getFile() );
+        return previousArtifact;
     }
 
     private void filterSnapshots( List<ArtifactVersion> versions )



Mime
View raw message