Package org.apache.ivy.core.module.id

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


            if (orgMatcher.matches(orgs[i])) {
                tokenValues.put(IvyPatternHelper.ORGANISATION_KEY, orgs[i]);
                String[] mods = listTokenValues(IvyPatternHelper.MODULE_KEY, tokenValues);
                for (int j = 0; j < mods.length; j++) {
                    if (modMatcher.matches(mods[j])) {
                        ret.add(new ModuleId(orgs[i], mods[j]));
                    }
                }
            }
        }
        return (ModuleId[]) ret.toArray(new ModuleId[ret.size()]);
View Full Code Here


                    if (modMatcher.matches(mods[j])) {
                        tokenValues.put(IvyPatternHelper.MODULE_KEY, mods[j]);
                        String[] branches = listTokenValues(IvyPatternHelper.BRANCH_KEY,
                            tokenValues);
                        if (branches == null || branches.length == 0) {
                            branches = new String[] {settings.getDefaultBranch(new ModuleId(
                                    orgs[i], mods[j]))};
                        }
                        for (int k = 0; k < branches.length; k++) {
                            if (branches[k] == null || branchMatcher.matches(branches[k])) {
                                tokenValues.put(IvyPatternHelper.BRANCH_KEY, tokenValues);
View Full Code Here

                + " on " + resolverName);
        boolean foundModule = false;
        for (Iterator iter = modules.iterator(); iter.hasNext();) {
            ModuleEntry mEntry = (ModuleEntry) iter.next();

            ModuleId foundMid = new ModuleId(mEntry.getOrganisation(), mEntry.getModule());
            ModuleId systemMid = foundMid;
            if (fromNamespace != null) {
                systemMid = NameSpaceHelper.transform(foundMid, fromNamespace
                        .getToSystemTransformer());
            }
View Full Code Here

            DefaultModuleDescriptor md = new DefaultModuleDescriptor(ModuleRevisionId.newInstance(
                "apache", "ivy-install", "1.0"), settings.getStatusManager().getDefaultStatus(),
                    new Date());
            String resolveId = ResolveOptions.getDefaultResolveId(md);
            md.addConfiguration(new Configuration("default"));
            md.addConflictManager(new ModuleId(ExactPatternMatcher.ANY_EXPRESSION,
                    ExactPatternMatcher.ANY_EXPRESSION), ExactPatternMatcher.INSTANCE,
                new NoConflictManager());

            if (MatcherHelper.isExact(matcher, mrid)) {
                DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(md, mrid, false,
View Full Code Here

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

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

        return refresh;
    }


    public static String getDefaultResolveId(ModuleDescriptor md) {
        ModuleId module = md.getModuleRevisionId().getModuleId();
        return getDefaultResolveId(module);
    }
View Full Code Here

    }

    public boolean isEvicted(String rootModuleConf) {
        cleanEvicted();
        IvyNode root = node.getRoot();
        ModuleId moduleId = node.getId().getModuleId();
        Collection resolvedRevisions = root.getResolvedRevisions(moduleId, rootModuleConf);
        EvictionData evictedData = getEvictedData(rootModuleConf);
        return root != node && evictedData != null
            && (!resolvedRevisions.contains(node.getResolvedId())
                || evictedData.isTransitivelyEvicted()
View Full Code Here

        }
        caller.addConfiguration(callerConf, dependencyConfs);

        IvyNode parent = callerNode.getRealNode();
        for (Iterator iter = parent.getAllCallersModuleIds().iterator(); iter.hasNext();) {
            ModuleId mid = (ModuleId) iter.next();
            allCallers.put(mid, parent);
        }
        allCallers.put(mrid.getModuleId(), callerNode);
    }
View Full Code Here

     * file does not exist for any conf (resolve has not been called before ?) then an
     * IllegalStateException is thrown and nothing is copied.
     */
    public int retrieve(ModuleRevisionId mrid, String destFilePattern, RetrieveOptions options)
            throws IOException {
        ModuleId moduleId = mrid.getModuleId();
        if (LogOptions.LOG_DEFAULT.equals(options.getLog())) {
            Message.info(":: retrieving :: " + moduleId + (options.isSync() ? " [sync]" : ""));
        } else {
            Message.verbose(":: retrieving :: " + moduleId + (options.isSync() ? " [sync]" : ""));
        }
View Full Code Here

TOP

Related Classes of org.apache.ivy.core.module.id.ModuleId

Copyright © 2018 www.massapicom. 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.