Examples of MDArtifact


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

                    Map extraAttributes = new HashMap(dad.getQualifiedExtraAttributes());
                    // this is later used to know that this is a merged artifact
                    extraAttributes.put("ivy:merged",
                        dad.getDependencyDescriptor().getParentRevisionId()
                        + " -> " + usage.getNode().getId());
                    artifacts.add(new MDArtifact(md, dad.getName(), dad.getType(), dad.getExt(),
                        dad.getUrl(), extraAttributes));
                }
            }
        }
    }
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

                    DefaultArtifact.newIvyArtifact(
                        md.getResolvedModuleRevisionId(), md.getPublicationDate()));
                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

                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()));
            }
        }
        boolean successfullyPublished = false;
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) {
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.