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

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


                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

                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

    public void addArtifact(IvyArtifactName newArtifact, Set<String> configurations) {
        if (configurations.isEmpty()) {
            throw new IllegalArgumentException("Artifact should be attached to at least one configuration.");
        }

        MDArtifact unattached = new MDArtifact(module, newArtifact.getName(), newArtifact.getType(), newArtifact.getExtension(), null, newArtifact.getAttributes());
        //Adding the artifact will replace any existing artifact
        //This potentially leads to loss of information - the configurations of the replaced artifact are lost (see GRADLE-123)
        //Hence we attempt to find an existing artifact and merge the information
        Artifact[] allArtifacts = module.getAllArtifacts();
        for (Artifact existing : allArtifacts) {
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.