Examples of ModuleId


Examples of org.apache.ivy.core.module.id.ModuleId

            String branchConstraint = substitute(settings, attributes.getValue("branchConstraint"));
            branchConstraint = branchConstraint == null ? branch : branchConstraint;

            // look for the branch used in resolved revisions
            if (branch == null) {
                ModuleId mid = ModuleId.newInstance(org, module);
                if (ns != null) {
                    mid = NameSpaceHelper.transform(mid, ns.getToSystemTransformer());
                }
                for (Iterator iter = resolvedRevisions.keySet().iterator(); iter.hasNext();) {
                    ModuleRevisionId mrid = (ModuleRevisionId) iter.next();
View Full Code Here

Examples of org.apache.ivy.core.module.id.ModuleId

            String extendType = attributes.getValue("extendType") != null ? settings
                    .substitute(attributes.getValue("extendType").toLowerCase(Locale.US)) : "all";

            List/* <String> */extendTypes = Arrays.asList(extendType.split(","));
            ModuleId parentMid = new ModuleId(parentOrganisation, parentModule);
            ModuleRevisionId parentMrid = new ModuleRevisionId(parentMid, parentRevision);

            // check on filesystem based on location attribute (for dev ONLY)
            boolean local = false;
            try {
                parent = parseParentModuleOnFilesystem(location);
                if (parent != null) {
                    ModuleId foundMid = parent.getResolvedModuleRevisionId().getModuleId();
                    if (!foundMid.equals(parentMid)) {
                        // the filesystem contains a parent module with different organisation
                        // or module name; ignore that parent module
                        Message.info("Found a parent module with unexpected ModuleRevisionId at source location "
                                + location
                                + "! Expected: "
View Full Code Here

Examples of org.apache.ivy.core.module.id.ModuleId

                    .getMatcher(matcherName);
            if (matcher == null) {
                addError("unknown matcher: " + matcherName);
                return;
            }
            getMd().addConflictManager(new ModuleId(org, mod), matcher, cm);
        }
View Full Code Here

Examples of org.apache.ivy.core.module.id.ModuleId

                    .getMatcher(matcherName);
            if (matcher == null) {
                addError("unknown matcher: " + matcherName);
                return;
            }
            getMd().addDependencyDescriptorMediator(new ModuleId(org, mod), matcher,
                new OverrideDependencyDescriptorMediator(branch, rev));
        }
View Full Code Here

Examples of org.apache.ivy.core.module.id.ModuleId

                PatternMatcher matcher = getPatternMatcher(attributes.getValue("matcher"));
                String org = settings.substitute(attributes.getValue("org"));
                org = org == null ? PatternMatcher.ANY_EXPRESSION : org;
                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 DefaultIncludeRule(aid, matcher, extraAtt);
            } else { // _state == ARTIFACT_EXCLUDE || EXCLUDE
                PatternMatcher matcher = getPatternMatcher(attributes.getValue("matcher"));
                String org = settings.substitute(attributes.getValue("org"));
                org = org == null ? PatternMatcher.ANY_EXPRESSION : org;
                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"));
View Full Code Here

Examples of org.apache.ivy.core.module.id.ModuleId

    private void testRemoveDependency(String test) throws IOException {
        File dest = File.createTempFile("ivy", ".xml");
        dest.deleteOnExit();
        FileUtil.copy(IvyFileUpdaterTest.class.getResourceAsStream(test + "/ivy.xml"), dest, null);
        updater.removeOrExcludeDependency(dest, new ModuleId("apache", "newdep"));
        assertEquals(
            test + " failed",
            FileUtil.readEntirely(IvyFileUpdaterTest.class.getResourceAsStream(test + "/expected.xml")),
            FileUtil.readEntirely(dest));
    }
View Full Code Here

Examples of org.apache.ivy.core.module.id.ModuleId

                IvyDEMessage.verbose("Workspace resolver found potential matching project "
                        + p.getName() + " with module " + candidateMrid + " for module "
                        + dependencyMrid);

                if (!ignoreBranchOnWorkspaceProjects) {
                    ModuleId mid = dependencyMrid.getModuleId();
                    String defaultBranch = getSettings().getDefaultBranch(mid);
                    String dependencyBranch = dependencyMrid.getBranch();
                    String candidateBranch = candidateMrid.getBranch();
                    if (dependencyBranch == null) {
                        dependencyBranch = defaultBranch;
View Full Code Here

Examples of org.apache.ivy.core.module.id.ModuleId

                conflicts.put(deepDependencies[i].getModuleRevisionId().getModuleId(), conflictParticipants);
            }
        }

        for (Iterator conflictIter = conflicts.keySet().iterator(); conflictIter.hasNext();) {
            ModuleId conflictKey = (ModuleId) conflictIter.next();
            manager.addMessage(conflictKey,
                    "Conflict on module " + conflictKey.getOrganisation() + "#" + conflictKey.getName(),
                    conflicts.get(conflictKey), IMessageProvider.ERROR);
        }
    }
View Full Code Here

Examples of org.apache.ivy.core.module.id.ModuleId

        IvyNodeElement[] deepDependencies = node.getDeepDependencies();
        for (int i = 0; i < deepDependencies.length; i++) {
            if (deepDependencies[i].isEvicted())
                continue;

            ModuleId moduleId = deepDependencies[i].getModuleRevisionId().getModuleId();
            if (moduleRevisionMap.containsKey(moduleId)) {
                Collection/* <IvyNodeElement> */conflicts = (Collection/* <IvyNodeElement> */) moduleRevisionMap
                        .get(moduleId);
                conflicts.add(deepDependencies[i]);
                for (Iterator iter = conflicts.iterator(); iter.hasNext();) {
View Full Code Here

Examples of org.apache.ivy.core.module.id.ModuleId

    public void testConflictManager() throws Exception {
        IvySettings settings = new IvySettings();
        XmlSettingsParser parser = new XmlSettingsParser(settings);
        parser.parse(XmlSettingsParserTest.class.getResource("ivysettings-conflict-manager.xml"));

        assertEquals("latest-time", settings.getConflictManager(new ModuleId("apache", "ivyde"))
                .getName());
        assertEquals("all", settings.getConflictManager(new ModuleId("apache", "ant")).getName());
    }
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.