use of org.apache.ivy.plugins.version.ExactVersionMatcher in project ant-ivy by apache.
the class SortTest method setUp.
@Before
public void setUp() {
// The revision is often not set in the
md1 = createModuleDescriptorToSort("md1", null);
// ivy.xml file that are ordered
// But sometimes they are set
md2 = createModuleDescriptorToSort("md2", "rev2");
md3 = createModuleDescriptorToSort("md3", "rev3");
md4 = createModuleDescriptorToSort("md4", "rev4");
settings = new SimpleSortEngineSettings();
settings.setCircularDependencyStrategy(WarnCircularDependencyStrategy.getInstance());
settings.setVersionMatcher(new ExactVersionMatcher());
sortEngine = new SortEngine(settings);
nonMatchReporter = new SilentNonMatchingVersionReporter();
}
use of org.apache.ivy.plugins.version.ExactVersionMatcher in project ant-ivy by apache.
the class IvySettings method addVersionMatcher.
public synchronized void addVersionMatcher(VersionMatcher vmatcher) {
init(vmatcher);
versionMatchers.put(vmatcher.getName(), vmatcher);
if (versionMatcher == null) {
versionMatcher = new ChainVersionMatcher();
addVersionMatcher(new ExactVersionMatcher());
}
if (versionMatcher instanceof ChainVersionMatcher) {
ChainVersionMatcher chain = (ChainVersionMatcher) versionMatcher;
chain.add(vmatcher);
}
}
Aggregations