aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzongyu <zzy2529420793@gmail.com>2020-06-18 15:10:50 +0800
committerzongyu <zzy2529420793@gmail.com>2020-07-06 17:48:27 +0800
commit22dd78f39f031a7c5a410ffacabae75e1ff04f91 (patch)
tree90cbbae9c104e86d6ca999b64f206b679e81ecd3 /src
parentmodify PATTERN_VERSION to match things like "r4" (diff)
downloadjava-ebuilder-22dd78f39f031a7c5a410ffacabae75e1ff04f91.tar.gz
java-ebuilder-22dd78f39f031a7c5a410ffacabae75e1ff04f91.tar.bz2
java-ebuilder-22dd78f39f031a7c5a410ffacabae75e1ff04f91.zip
compare maven version and required maven version correctly
Signed-off-by: zongyu <zzy2529420793@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/gentoo/java/ebuilder/maven/MavenCache.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/gentoo/java/ebuilder/maven/MavenCache.java b/src/main/java/org/gentoo/java/ebuilder/maven/MavenCache.java
index 19e40f9..45ff1d9 100644
--- a/src/main/java/org/gentoo/java/ebuilder/maven/MavenCache.java
+++ b/src/main/java/org/gentoo/java/ebuilder/maven/MavenCache.java
@@ -57,7 +57,7 @@ public class MavenCache {
for (final CacheItem curCacheItem : versions) {
if (curCacheItem.getParsedMavenVersion().compareTo(mavenVersion)
- <= 0) {
+ >= 0) {
cacheItem = curCacheItem;
break;
@@ -65,7 +65,7 @@ public class MavenCache {
}
if (cacheItem == null) {
- cacheItem = versions.get(versions.size() - 1);
+ return "!!!suitble-avenVersion-not-found!!!";
}
final StringBuilder sbDependency = new StringBuilder(50);