Skip to content

Commit

Permalink
MiniMaven: download and use new versions as specified by pom.xml
Browse files Browse the repository at this point in the history
... even when our latest Maven run was so long ago that its records
still show the old version.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Oct 18, 2011
1 parent 61cf433 commit 3f6be95
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src-plugins/fake/fiji/build/MiniMaven.java
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@ protected POM findLocallyCachedPOM(String groupId, String artifactId, String ver
if (groupId == null)
return null;
String key = groupId + ">" + artifactId;
if (localPOMCache.containsKey(key))
return localPOMCache.get(key); // may be null
if (localPOMCache.containsKey(key)) {
POM result = localPOMCache.get(key); // may be null
if (result == null || version == null || compareVersion(version, result.version) <= 0)
return result;
}

String path = System.getProperty("user.home") + "/.m2/repository/" + groupId.replace('.', '/') + "/" + artifactId + "/";
if (version == null)
Expand Down

0 comments on commit 3f6be95

Please sign in to comment.