use of org.talend.designer.maven.aether.comparator.VersionStringComparator in project tbd-studio-se by Talend.
the class AbstractDynamicDistribution method getAllVersions.
@Override
public List<String> getAllVersions(IDynamicMonitor monitor) throws Exception {
Set<String> allVersion = new HashSet<>();
DynamicDistributionManager dynamicDistributionManager = DynamicDistributionManager.getInstance();
DynamicConfiguration dynamicConfiguration = new DynamicConfiguration();
dynamicConfiguration.setDistribution(getDistributionName());
IDependencyResolver dependencyResolver = dynamicDistributionManager.getDependencyResolver(dynamicConfiguration);
List<String> allHadoopVersions = dependencyResolver.listHadoopVersions(null, null, monitor);
if (allHadoopVersions != null) {
allVersion.addAll(allHadoopVersions);
}
List<String> versionList = new LinkedList<>(allVersion);
Collections.sort(versionList, Collections.reverseOrder(new VersionStringComparator()));
return versionList;
}
Aggregations