private Set<String> getVersions(String name, Configuration conf, boolean offline) {
RepositoryManager repoman = createRepository(conf, offline);
ModuleVersionQuery query = new ModuleVersionQuery(name, null, ModuleQuery.Type.JVM);
query.setBinaryMajor(Versions.JVM_BINARY_MAJOR_VERSION);
ModuleVersionResult result = repoman.completeVersions(query);
NavigableMap<String, ModuleVersionDetails> versionMap = result.getVersions();
return versionMap.keySet();
}