Package org.apache.ivy.core.module.descriptor

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


        return new 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

        return new 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

    }

    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

            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", dad.getDependencyDescriptor()
View Full Code Here

            }
        }
        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].getQualifiedExtraAttributes()));
            }
        }
        // now collects artifacts files
View Full Code Here

                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

                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

                        if (workspaceArtifacts == null) {
                            workspaceArtifacts = new HashMap();
                            parentContext.set(IVYDE_WORKSPACE_ARTIFACTS, workspaceArtifacts);
                        }
                        for (int j = 0; j < dArtifacts.length; j++) {
                            Artifact artifact = new MDArtifact(md, dArtifacts[j].getName(),
                                    dArtifacts[j].getType(), dArtifacts[j].getExt(),
                                    dArtifacts[j].getUrl(),
                                    dArtifacts[j].getQualifiedExtraAttributes());
                            workspaceArtifacts.put(artifact, af);
                        }
View Full Code Here

    }

    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

TOP

Related Classes of org.apache.ivy.core.module.descriptor.MDArtifact

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.