Examples of MDArtifact


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

    public Artifact getMainArtifact() {
        return mainArtifact;
    }

    public Artifact getSourceArtifact() {
        return new MDArtifact(
            ivyModuleDescriptor, mrid.getName(), "source", "jar",
            null, Collections.singletonMap("m:classifier", "sources"));
    }
View Full Code Here

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

            ivyModuleDescriptor, mrid.getName(), "source", "jar",
            null, Collections.singletonMap("m:classifier", "sources"));
    }

    public Artifact getSrcArtifact() {
        return new MDArtifact(
            ivyModuleDescriptor, mrid.getName(), "source", "jar",
            null, Collections.singletonMap("m:classifier", "src"));
    }
View Full Code Here

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

            ivyModuleDescriptor, mrid.getName(), "source", "jar",
            null, Collections.singletonMap("m:classifier", "src"));
    }

    public Artifact getJavadocArtifact() {
        return new MDArtifact(
            ivyModuleDescriptor, mrid.getName(), "javadoc", "jar",
            null, Collections.singletonMap("m:classifier", "javadoc"));
    }
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:
        for (Iterator iter = artifactsSet.iterator(); iter.hasNext();) {
            Artifact artifact = (Artifact) iter.next();
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

            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) {
            IllegalStateException ise = new IllegalStateException(ex.getMessage()+" in "+xmlURL);
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
                    // only if there are no conf defined in sub elements
                    if (confs != null && confs.length() > 0) {
                        String[] conf;
View Full Code Here

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

    public Artifact getMainArtifact() {
        return mainArtifact;
    }

    public Artifact getSourceArtifact() {
        return new MDArtifact(
            ivyModuleDescriptor, mrid.getName(), "source", "jar",
            null, Collections.singletonMap("m:classifier", "sources"));
    }
View Full Code Here

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

            ivyModuleDescriptor, mrid.getName(), "source", "jar",
            null, Collections.singletonMap("m:classifier", "sources"));
    }

    public Artifact getJavadocArtifact() {
        return new MDArtifact(
            ivyModuleDescriptor, mrid.getName(), "javadoc", "jar",
            null, Collections.singletonMap("m:classifier", "javadoc"));
    }
View Full Code Here

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

    public Artifact getMainArtifact() {
        return mainArtifact;
    }

    public Artifact getSourceArtifact() {
        return new MDArtifact(
            ivyModuleDescriptor, mrid.getName(), "source", "jar",
            null, Collections.singletonMap("m:classifier", "sources"));
    }
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.