Examples of MDArtifact


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

                checkConfigurations();
                replaceConfigurationWildcards();
                if (!_artifactsDeclared) {
                    String[] confs = md.getConfigurationsNames();
                    for (int i = 0; i < confs.length; i++) {
                        md.addArtifact(confs[i], new MDArtifact(md, md.getModuleRevisionId()
                                .getName(), "jar", "jar"));
                    }
                }
                md.check();
            } catch (ParserConfigurationException ex) {
View Full Code Here

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

                        String type = _ivy.substitute(attributes.getValue("type"));
                        type = type == null ? "jar" : type;
                        String ext = _ivy.substitute(attributes.getValue("ext"));
                        ext = ext != null ? ext : type;
                        String url = _ivy.substitute(attributes.getValue("url"));
                        _artifact = new MDArtifact(md, artName, type, ext, url == null ? null
                                : new URL(url), ExtendableItemHelper.getExtraAttributes(attributes,
                            new String[] {"ext", "type", "name", "conf"}));
                        String confs = _ivy.substitute(attributes.getValue("conf"));
                        // only add confs if they are specified. if they aren't, endElement will
                        // handle this
View Full Code Here

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

            }
        }
        Artifact[] extraArtifacts = options.getExtraArtifacts();
        if (extraArtifacts != null) {
            for (int i = 0; i < extraArtifacts.length; i++) {
                artifactsSet.add(new MDArtifact(md, extraArtifacts[i].getName(), extraArtifacts[i]
                        .getType(), extraArtifacts[i].getExt(), extraArtifacts[i].getUrl(),
                        extraArtifacts[i].getExtraAttributes()));
            }
        }
        // for each declared published artifact in this descriptor, do:
View Full Code Here

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

            // these descritions are thus used as if they were declared in the module
            // descriptor. If one is not really present, the error will be raised
            // at download time
            for (Iterator it = dependencyArtifacts.iterator(); it.hasNext();) {
                DependencyArtifactDescriptor dad = (DependencyArtifactDescriptor) it.next();
                artifacts.add(new MDArtifact(md, dad.getName(), dad.getType(), dad.getExt(), dad
                        .getUrl(), dad.getExtraAttributes()));
            }
        } else {
            Set includes = (Set) dependencyIncludes.get(rootModuleConf);

            if ((dependencyArtifacts == null || dependencyArtifacts.isEmpty())
                    && (includes == null || includes.isEmpty())) {
                // no artifacts / includes: we get all artifacts as defined by the descriptor
                for (Iterator iter = confs.iterator(); iter.hasNext();) {
                    String conf = (String) iter.next();
                    artifacts.addAll(Arrays.asList(md.getArtifacts(conf)));
                }
            } else {
                // we have to get only artifacts listed as "includes"

                // first we get all artifacts as defined by the module descriptor
                // and classify them by artifact id
                Map allArtifacts = new HashMap();
                for (Iterator iter = confs.iterator(); iter.hasNext();) {
                    String conf = (String) iter.next();
                    Artifact[] arts = md.getArtifacts(conf);
                    for (int i = 0; i < arts.length; i++) {
                        allArtifacts.put(arts[i].getId().getArtifactId(), arts[i]);
                    }
                }

                // now we add caller defined ones
                for (Iterator it = dependencyArtifacts.iterator(); it.hasNext();) {
                    DependencyArtifactDescriptor dad = (DependencyArtifactDescriptor) it.next();
                    artifacts.add(new MDArtifact(md, dad.getName(), dad.getType(), dad.getExt(),
                            dad.getUrl(), dad.getExtraAttributes()));
                }

                // and now we filter according to include rules
                for (Iterator it = includes.iterator(); it.hasNext();) {
View Full Code Here

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

                        getMd().getResolvedModuleRevisionId(), getMd().getPublicationDate()));
                if (!artifactsDeclared) {
                    String[] confs = getMd().getConfigurationsNames();
                    for (int i = 0; i < confs.length; i++) {
                        getMd().addArtifact(confs[i],
                            new MDArtifact(getMd(), getMd().getModuleRevisionId().getName(),
                                "jar", "jar"));
                    }
                }
                getMd().check();
            } catch (ParserConfigurationException ex) {
View Full Code Here

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

                String type = settings.substitute(attributes.getValue("type"));
                type = type == null ? "jar" : type;
                String ext = settings.substitute(attributes.getValue("ext"));
                ext = ext != null ? ext : type;
                String url = settings.substitute(attributes.getValue("url"));
                artifact = new MDArtifact(getMd(), artName, type, ext, url == null ? null
                        : new URL(url), ExtendableItemHelper.getExtraAttributes(
                            settings, attributes, new String[] {"ext", "type", "name", "conf"}));
                String confs = settings.substitute(attributes.getValue("conf"));
                // only add confs if they are specified. if they aren't, endElement will
                // handle this
View Full Code Here

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

    }

    private void addArtifactsFromOwnUsage(Set artifacts, Set dependencyArtifacts) {
        for (Iterator it = dependencyArtifacts.iterator(); it.hasNext();) {
            DependencyArtifactDescriptor dad = (DependencyArtifactDescriptor) it.next();
            artifacts.add(new MDArtifact(md, dad.getName(), dad.getType(), dad.getExt(),
                    dad.getUrl(), dad.getQualifiedExtraAttributes()));
        }
    }
View Full Code Here

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

            Set mergedDependencyArtifacts = usage.getDependencyArtifactsSet(rootModuleConf);
            if (mergedDependencyArtifacts != null) {
                for (Iterator it = mergedDependencyArtifacts.iterator(); it.hasNext();) {
                    DependencyArtifactDescriptor dad = (DependencyArtifactDescriptor) it.next();
                    Map extraAttributes = new HashMap(dad.getQualifiedExtraAttributes());
                    MDArtifact artifact = new MDArtifact(md, dad.getName(), dad.getType(), dad.getExt(),
                            dad.getUrl(), extraAttributes);
                   
                    if (!artifacts.contains(artifact)) {
                        // this is later used to know that this is a merged artifact
                        extraAttributes.put("ivy:merged",
View Full Code Here

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

                        getMd().getResolvedModuleRevisionId(), getMd().getPublicationDate()));
                if (!artifactsDeclared) {
                    String[] confs = getMd().getConfigurationsNames();
                    for (int i = 0; i < confs.length; i++) {
                        getMd().addArtifact(confs[i],
                            new MDArtifact(getMd(), getMd().getModuleRevisionId().getName(),
                                "jar", "jar"));
                    }
                }
                getMd().check();
            } catch (ParserConfigurationException ex) {
View Full Code Here

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

                String type = settings.substitute(attributes.getValue("type"));
                type = type == null ? "jar" : type;
                String ext = settings.substitute(attributes.getValue("ext"));
                ext = ext != null ? ext : type;
                String url = settings.substitute(attributes.getValue("url"));
                artifact = new MDArtifact(getMd(), artName, type, ext, url == null ? null
                        : new URL(url), ExtendableItemHelper.getExtraAttributes(
                            settings, attributes, new String[] {"ext", "type", "name", "conf"}));
                String confs = settings.substitute(attributes.getValue("conf"));
                // only add confs if they are specified. if they aren't, endElement will
                // handle this
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.