diff --git a/biz.aQute.bndlib/src/aQute/lib/deployer/FileRepo.java b/biz.aQute.bndlib/src/aQute/lib/deployer/FileRepo.java index 1e94835067..57b6b37945 100644 --- a/biz.aQute.bndlib/src/aQute/lib/deployer/FileRepo.java +++ b/biz.aQute.bndlib/src/aQute/lib/deployer/FileRepo.java @@ -447,6 +447,7 @@ public List list(String regex) throws Exception { public SortedSet versions(String bsn) throws Exception { init(); + boolean haslatest = false; File dir = new File(root, bsn); if (dir.isDirectory()) { String versions[] = dir.list(); @@ -455,10 +456,14 @@ public SortedSet versions(String bsn) throws Exception { Matcher m = REPO_FILE.matcher(v); if (m.matches()) { String version = m.group(2); - if (!version.equals("latest")) + if (version.equals("latest")) + haslatest = true; + else list.add(new Version(version)); } } + if ( list.isEmpty() && haslatest) + list.add( new Version(MAX_MAJOR,0,0)); return new SortedList(list); } return SortedList.empty();