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

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


        // create a list of ModuleRevisionIds indicating the position for each dependency
        List dependencies = new ArrayList(report.getModuleRevisionIds());

        for (Iterator iter = report.getModuleIds().iterator(); iter.hasNext();) {
            ModuleId mid = (ModuleId) iter.next();
            out.println("\t\t<module organisation=\"" + XMLHelper.escape(mid.getOrganisation())
                    + "\"" + " name=\"" + XMLHelper.escape(mid.getName()) + "\">");
            for (Iterator it2 = report.getNodes(mid).iterator(); it2.hasNext();) {
                IvyNode dep = (IvyNode) it2.next();
                ouputRevision(report, out, dependencies, dep);
            }
            out.println("\t\t</module>");
View Full Code Here


    public RetrieveReport retrieve(ModuleRevisionId mrid, RetrieveOptions options)
            throws IOException {
        RetrieveReport report = new RetrieveReport();

        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

    /**
     * @return Map<ArtifactDownloadReport, Set<String>>
     */
    public Map determineArtifactsToCopy(ModuleRevisionId mrid, String destFilePattern,
            RetrieveOptions options) throws ParseException, IOException {
        ModuleId moduleId = mrid.getModuleId();

        if (options.getResolveId() == null) {
            options.setResolveId(ResolveOptions.getDefaultResolveId(moduleId));
        }

View Full Code Here

        if (modulesIds == null) {
            List<IvyNode> sortedDependencies = resolveEngine.getSortEngine().sortNodes(
                getDependencies(), SortOptions.SILENT);
            Collections.reverse(sortedDependencies);
            for (IvyNode dependency : sortedDependencies) {
                ModuleId mid = dependency.getResolvedId().getModuleId();
                Collection<IvyNode> deps = modulesIdsMap.get(mid);
                if (deps == null) {
                    deps = new LinkedHashSet<IvyNode>();
                    modulesIdsMap.put(mid, deps);
                }
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());

            for (int c = 0; c < options.getConfs().length; c++) {
                final String[] depConfs = options.getConfs();
View Full Code Here

            DependencyResolver resolver = (DependencyResolver) iter.next();
            Map[] moduleIdAsMap = resolver.listTokenValues(tokensToList, criteria);
            for (int i = 0; i < moduleIdAsMap.length; i++) {
                String org = (String) moduleIdAsMap[i].get(IvyPatternHelper.ORGANISATION_KEY);
                String name = (String) moduleIdAsMap[i].get(IvyPatternHelper.MODULE_KEY);
                ModuleId modId = ModuleId.newInstance(org, name);
                ret.add(NameSpaceHelper.transform(modId, resolver.getNamespace()
                        .getToSystemTransformer()));
            }
        }
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

            }
            write("<extends");

            String org = substitute(settings, attributes.getValue("organisation"));
            String module = substitute(settings, attributes.getValue("module"));
            ModuleId parentId = new ModuleId(org, module);

            for (int i = 0; i < attributes.getLength(); i++) {
                String name = attributes.getQName(i);
                String value = null;

                if ("revision".equals(name)) {
                    // replace inline revision with resolved parent revision
                    ModuleDescriptor merged = options.getMergedDescriptor();
                    if (merged != null) {
                        ExtendsDescriptor[] parents = merged.getInheritedDescriptors();
                        for (int j = 0; value == null && j < parents.length; ++j) {
                            ModuleRevisionId resolvedId = parents[j].getResolvedParentRevisionId();
                            if (parentId.equals(resolvedId.getModuleId())) {
                                value = resolvedId.getRevision();
                            }
                        }
                    }
                    if (value == null) {
View Full Code Here

            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

            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

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.