Examples of DefaultExcludeRule


Examples of org.apache.ivy.core.module.descriptor.DefaultExcludeRule

                String module = settings.substitute(attributes.getValue("module"));
                module = module == null ? PatternMatcher.ANY_EXPRESSION : module;
                ArtifactId aid = new ArtifactId(new ModuleId(org, module), name, type, ext);
                Map extraAtt = ExtendableItemHelper.getExtraAttributes(settings, attributes,
                    new String[] {"org", "module", "name", "type", "ext", "matcher", "conf"});
                confAware = new DefaultExcludeRule(aid, matcher, extraAtt);
            }
            String confs = settings.substitute(attributes.getValue("conf"));
            // only add confs if they are specified. if they aren't, endElement will handle this
            // only if there are no conf defined in sub elements
            if (confs != null && confs.length() > 0) {
View Full Code Here

Examples of org.apache.ivy.core.module.descriptor.DefaultExcludeRule

                                    module = m.group(2);
                                }

                                ArtifactId aid = new ArtifactId(new ModuleId(org, module), "*", "*", "*");
                                PatternMatcher matcher = new ExactOrRegexpPatternMatcher();
                                ExcludeRule excludeRule = new DefaultExcludeRule(aid, matcher, new HashMap());
                                depDescriptor.addExcludeRule("default", excludeRule);
                            }
                        }

                        // Ids
View Full Code Here

Examples of org.apache.ivy.core.module.descriptor.DefaultExcludeRule

                String module = settings.substitute(attributes.getValue("module"));
                module = module == null ? PatternMatcher.ANY_EXPRESSION : module;
                ArtifactId aid = new ArtifactId(new ModuleId(org, module), name, type, ext);
                Map extraAtt = ExtendableItemHelper.getExtraAttributes(settings, attributes,
                    new String[] {"org", "module", "name", "type", "ext", "matcher", "conf"});
                confAware = new DefaultExcludeRule(aid, matcher, extraAtt);
            }
            String confs = settings.substitute(attributes.getValue("conf"));
            // only add confs if they are specified. if they aren't, endElement will handle this
            // only if there are no conf defined in sub elements
            if (confs != null && confs.length() > 0) {
View Full Code Here

Examples of org.apache.ivy.core.module.descriptor.DefaultExcludeRule

        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);
    }
View Full Code Here

Examples of org.apache.ivy.core.module.descriptor.DefaultExcludeRule

                }

                Iterator itExcludes = excludes.iterator();
                while (itExcludes.hasNext()) {
                    IvyExclude exclude = (IvyExclude) itExcludes.next();
                    DefaultExcludeRule rule = exclude.asRule(settings);
                    rule.addConfiguration("default");
                    md.addExcludeRule(rule);
                }

                Iterator itConflicts = conflicts.iterator();
                while (itConflicts.hasNext()) {
View Full Code Here

Examples of org.apache.ivy.core.module.descriptor.DefaultExcludeRule

                while (itPkg.hasNext()) {
                    String pkg = (String) itPkg.next();
                    ArtifactId id = new ArtifactId(ModuleId.newInstance(BundleInfo.BUNDLE_TYPE, pkg),
                            PatternMatcher.ANY_EXPRESSION, PatternMatcher.ANY_EXPRESSION,
                            PatternMatcher.ANY_EXPRESSION);
                    DefaultExcludeRule rule = new DefaultExcludeRule(id,
                            ExactOrRegexpPatternMatcher.INSTANCE, null);
                    String[] confs = md.getConfigurationsNames();
                    for (int i = 0; i < confs.length; i++) {
                        rule.addConfiguration(confs[i]);
                    }
                    md.addExcludeRule(rule);
                }
            }
        }
View Full Code Here

Examples of org.apache.ivy.core.module.descriptor.DefaultExcludeRule

                String module = ivy.substitute(attributes.getValue("module"));
                module = module == null ? PatternMatcher.ANY_EXPRESSION : module;
                ArtifactId aid = new ArtifactId(new ModuleId(org, module), name, type, ext);
                Map extraAtt = ExtendableItemHelper.getExtraAttributes(attributes, new String[] {
                        "org", "module", "name", "type", "ext", "matcher", "conf"});
                confAware = new DefaultExcludeRule(aid, matcher, extraAtt);
            }
            String confs = ivy.substitute(attributes.getValue("conf"));
            // only add confs if they are specified. if they aren't, endElement will handle this
            // only if there are no conf defined in sub elements
            if (confs != null && confs.length() > 0) {
View Full Code Here

Examples of org.apache.ivy.core.module.descriptor.DefaultExcludeRule

                for (Iterator iter = exclusions.iterator(); iter.hasNext();) {
                    ModuleId mid = (ModuleId) iter.next();
                    String[] confs = dd.getModuleConfigurations();
                    for (int i = 0; i < confs.length; i++) {
                        dd
                                .addExcludeRule(confs[i], new DefaultExcludeRule(new ArtifactId(
                                        mid, PatternMatcher.ANY_EXPRESSION,
                                        PatternMatcher.ANY_EXPRESSION,
                                        PatternMatcher.ANY_EXPRESSION),
                                        ExactPatternMatcher.INSTANCE, null));
                    }
View Full Code Here

Examples of org.gradle.api.internal.artifacts.DefaultExcludeRule

    @Test
    public void testCreateExcludeRule() {
        String configurationName = "someConf";
        Map excludeRuleArgs = GUtil.map(ExcludeRule.GROUP_KEY, "someOrg", ExcludeRule.MODULE_KEY, "someModule");
        org.apache.ivy.core.module.descriptor.ExcludeRule ivyExcludeRule =
                new DefaultExcludeRuleConverter().createExcludeRule(configurationName, new DefaultExcludeRule(excludeRuleArgs));
        assertThat(ivyExcludeRule.getId().getModuleId().getOrganisation(),
                Matchers.equalTo(excludeRuleArgs.get(ExcludeRule.GROUP_KEY)));
        assertThat(ivyExcludeRule.getId().getName(),
                Matchers.equalTo(PatternMatcher.ANY_EXPRESSION));
        assertThat(ivyExcludeRule.getId().getExt(),
View Full Code Here

Examples of org.gradle.api.internal.artifacts.DefaultExcludeRule

    }
   
    @Test
    public void convertWithConvertableConfigurationExcludes() {
        final Configuration someConfigurationStub = createNamedConfigurationStubWithDependencies("someConfiguration",
                WrapUtil.<ExcludeRule>toSet(new DefaultExcludeRule(toMap("key", "value"))), dependency1);
        final Exclusion mavenExclude = new Exclusion();
        mavenExclude.setGroupId("a");
        mavenExclude.setArtifactId("b");
        context.checking(new Expectations() {{
           allowing(conf2ScopeMappingContainerMock).getMapping(toSet(someConfigurationStub)); will(returnValue(createMapping(compileConfStub, "compile")));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.