use of org.apache.ivy.plugins.version.LatestVersionMatcher in project ant-ivy by apache.
the class IvySettings method configureDefaultVersionMatcher.
public synchronized void configureDefaultVersionMatcher() {
addVersionMatcher(new LatestVersionMatcher());
addVersionMatcher(new SubVersionMatcher());
addVersionMatcher(new VersionRangeMatcher());
}
use of org.apache.ivy.plugins.version.LatestVersionMatcher in project ant-ivy by apache.
the class SortTest method testLatestIntegration.
/**
* The dependency can ask for the latest integration. It should match whatever the version
* declared in the modules to order.
*/
@Test
public void testLatestIntegration() {
addDependency(md2, "md1", "latest.integration");
addDependency(md3, "md2", "latest.integration");
addDependency(md4, "md3", "latest.integration");
settings.setVersionMatcher(new LatestVersionMatcher());
DefaultModuleDescriptor[][] expectedOrder = new DefaultModuleDescriptor[][] { { md1, md2, md3, md4 } };
for (List<ModuleDescriptor> toSort : getAllLists(md1, md3, md2, md4)) {
assertSorted(expectedOrder, sortModuleDescriptors(toSort, nonMatchReporter));
}
}
Aggregations