Skip to content

Commit

Permalink
FELIX-4666 : The baseline goal should print out the resolved version …
Browse files Browse the repository at this point in the history
…used for comparison. Apply patch from Robert Munteanu

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1656406 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
cziegeler committed Feb 2, 2015
1 parent 1a832a1 commit c4a8a79
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ public final void execute()
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" );
Expand Down Expand Up @@ -214,7 +215,7 @@ public final void execute()
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() );
Expand Down Expand Up @@ -434,7 +435,7 @@ private Jar getCurrentBundle()
return openJar( currentBundle );
}

private Jar getPreviousBundle()
private Artifact getPreviousArtifact()
throws MojoFailureException, MojoExecutionException
{
// Find the previous version JAR and resolve it, and it's dependencies
Expand Down Expand Up @@ -504,7 +505,7 @@ private Jar getPreviousBundle()
+ " does not exist on local/remote repositories", anfe );
}

return openJar( previousArtifact.getFile() );
return previousArtifact;
}

private void filterSnapshots( List<ArtifactVersion> versions )
Expand Down

0 comments on commit c4a8a79

Please sign in to comment.