Java Code Examples for org.apache.ivy.plugins.matcher.PatternMatcher#EXACT

The following examples show how to use org.apache.ivy.plugins.matcher.PatternMatcher#EXACT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IvyOverride.java    From ant-ivy with Apache License 2.0 5 votes vote down vote up
void addOverride(DefaultModuleDescriptor md, IvySettings settings) {
    String matcherName = (matcher == null) ? PatternMatcher.EXACT : matcher;
    String orgPattern = (org == null) ? PatternMatcher.ANY_EXPRESSION : org;
    String modulePattern = (module == null) ? PatternMatcher.ANY_EXPRESSION : module;
    md.addDependencyDescriptorMediator(new ModuleId(orgPattern, modulePattern),
        settings.getMatcher(matcherName), new OverrideDependencyDescriptorMediator(branch, rev));
}
 
Example 2
Source File: IvyDependencyExclude.java    From ant-ivy with Apache License 2.0 5 votes vote down vote up
DefaultExcludeRule asRule(IvySettings settings) {
    String matcherName = (matcher == null) ? PatternMatcher.EXACT : matcher;
    String orgPattern = (org == null) ? PatternMatcher.ANY_EXPRESSION : org;
    String modulePattern = (module == null) ? PatternMatcher.ANY_EXPRESSION : module;
    String namePattern = (name == null) ? PatternMatcher.ANY_EXPRESSION : name;
    String typePattern = (type == null) ? PatternMatcher.ANY_EXPRESSION : type;
    String extPattern = (ext == null) ? typePattern : ext;
    ArtifactId aid = new ArtifactId(new ModuleId(orgPattern, modulePattern), namePattern,
            typePattern, extPattern);
    return new DefaultExcludeRule(aid, settings.getMatcher(matcherName), null);
}
 
Example 3
Source File: IvyDependencyInclude.java    From ant-ivy with Apache License 2.0 5 votes vote down vote up
DefaultIncludeRule asRule(IvySettings settings) {
    String matcherName = matcher == null ? PatternMatcher.EXACT : matcher;
    String namePattern = name == null ? PatternMatcher.ANY_EXPRESSION : name;
    String typePattern = type == null ? PatternMatcher.ANY_EXPRESSION : type;
    String extPattern = ext == null ? typePattern : ext;
    ArtifactId aid = new ArtifactId(new ModuleId(PatternMatcher.ANY_EXPRESSION,
            PatternMatcher.ANY_EXPRESSION), namePattern, typePattern, extPattern);
    return new DefaultIncludeRule(aid, settings.getMatcher(matcherName), null);
}
 
Example 4
Source File: IvyConflict.java    From ant-ivy with Apache License 2.0 5 votes vote down vote up
void addConflict(DefaultModuleDescriptor md, IvySettings settings) {
    String matcherName = (matcher == null) ? PatternMatcher.EXACT : matcher;
    String orgPattern = (org == null) ? PatternMatcher.ANY_EXPRESSION : org;
    String modulePattern = (module == null) ? PatternMatcher.ANY_EXPRESSION : module;
    ConflictManager cm = null;
    if (rev != null) {
        cm = new FixedConflictManager(splitToArray(rev));
    } else if (manager != null) {
        cm = settings.getConflictManager(manager);
    }
    md.addConflictManager(new ModuleId(orgPattern, modulePattern),
        settings.getMatcher(matcherName), cm);
}
 
Example 5
Source File: IvyExclude.java    From ant-ivy with Apache License 2.0 5 votes vote down vote up
DefaultExcludeRule asRule(IvySettings settings) {
    String matcherName = (matcher == null) ? PatternMatcher.EXACT : matcher;
    String orgPattern = (org == null) ? PatternMatcher.ANY_EXPRESSION : org;
    String modulePattern = (module == null) ? PatternMatcher.ANY_EXPRESSION : module;
    String artifactPattern = (artifact == null) ? PatternMatcher.ANY_EXPRESSION : artifact;
    String typePattern = (type == null) ? PatternMatcher.ANY_EXPRESSION : type;
    String extPattern = (ext == null) ? typePattern : ext;
    ArtifactId aid = new ArtifactId(new ModuleId(orgPattern, modulePattern), artifactPattern,
            typePattern, extPattern);
    return new DefaultExcludeRule(aid, settings.getMatcher(matcherName), null);
}