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

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


            return Arrays.asList(new String[] {"*"});
        }
        Object[] confs = confTableViewer.getCheckedElements();
        List confList = new ArrayList();
        for (int i = 0; i < confs.length; i++) {
            Configuration c = (Configuration) confs[i];
            confList.add(c.getName());
        }
        return confList;
    }
View Full Code Here


    private DefaultModuleDescriptor cloneMd(ModuleDescriptor md, Artifact af) {

        DefaultModuleDescriptor newMd = new DefaultModuleDescriptor(md.getModuleRevisionId(),
                "release", null, true);
        newMd.addConfiguration(new Configuration(ModuleDescriptor.DEFAULT_CONFIGURATION));
        newMd.setLastModified(System.currentTimeMillis());

        newMd.setDescription(md.getDescription());
        newMd.setHomePage(md.getHomePage());
        newMd.setLastModified(md.getLastModified());
View Full Code Here

        assertEquals("org.apache.ivy.test", md.getModuleRevisionId().getName());
        assertEquals("1.0.0", md.getModuleRevisionId().getRevision());

        assertNotNull(md.getConfigurations());
        assertEquals(
            Arrays.asList(new Configuration[] {new Configuration("default"),
                    new Configuration("optional"), new Configuration("transitive-optional")}),
            Arrays.asList(md.getConfigurations()));

        assertEquals(0, md.getAllArtifacts().length);

        assertNotNull(md.getDependencies());
View Full Code Here

        if (confs.length == total) {
            return Arrays.asList(new String[] {"*"});
        }
        List confList = new ArrayList();
        for (int i = 0; i < confs.length; i++) {
            Configuration c = (Configuration) confs[i];
            confList.add(c.getName());
        }
        return confList;
    }
View Full Code Here

            Configuration[] configurations = md.getConfigurations();
            if ("*".equals(conf.confs.get(0))) {
                confTableViewer.setCheckedElements(configurations);
            } else {
                for (int i = 0; i < conf.confs.size(); i++) {
                    Configuration configuration = md.getConfiguration((String) conf.confs.get(i));
                    if (configuration != null) {
                        confTableViewer.setChecked(configuration, true);
                    }
                }
            }
View Full Code Here

    protected boolean isParentConfTransitive() {
        String conf = getParent().getRequestedConf();
        if (conf == null) {
            return true;
        }
        Configuration parentConf = getParentNode().getConfiguration(conf);
        return parentConf.isTransitive();

    }
View Full Code Here

            String parentConf, String conf, boolean shouldBePublic, IvyNodeUsage usage) {
        if (md != null) {
            String[] confs = getRealConfs(conf);
            addRootModuleConfigurations(usage, rootModuleConf, confs);
            for (int i = 0; i < confs.length; i++) {
                Configuration c = md.getConfiguration(confs[i]);
                if (c == null) {
                    confsToFetch.remove(conf);
                    if (isConfRequiredByMergedUsageOnly(rootModuleConf, conf)) {
                        Message.verbose(
                            "configuration required by evicted revision is not available in "
                            + "selected revision. skipping " + conf + " in " + this);
                    } else if (!conf.equals(confs[i])) {
                        problem = new RuntimeException("configuration not found in " + this
                                + ": '" + conf + "'. Missing configuration: '" + confs[i]
                                + "'. It was required from " + parent + " " + parentConf);
                    } else {
                        problem = new RuntimeException("configuration not found in " + this
                                + ": '" + confs[i] + "'. It was required from " + parent + " "
                                + parentConf);
                    }
                    return false;
                } else if (shouldBePublic && !isRoot()
                        && c.getVisibility() != Configuration.Visibility.PUBLIC) {
                    confsToFetch.remove(conf);
                    if (isConfRequiredByMergedUsageOnly(rootModuleConf, conf)) {
                        Message.verbose(
                            "configuration required by evicted revision is not visible in "
                            + "selected revision. skipping " + conf + " in " + this);
View Full Code Here

            throw new IllegalStateException(
                    "impossible to get configuration when data has not been loaded");
        }
        String defaultConf = getDefaultConf(conf);
        conf = getMainConf(conf);
        Configuration configuration = md.getConfiguration(conf);
        if (configuration == null) {
            configuration = md.getConfiguration(defaultConf);
        }
        return configuration;
    }
View Full Code Here

    //This is never called.  Could we remove it?
    public void discardConf(String rootModuleConf, String conf) {
        Set depConfs = usage.addAndGetConfigurations(rootModuleConf);
        if (md != null) {
            // remove all given dependency configurations to the set + extended ones
            Configuration c = md.getConfiguration(conf);
            if (conf != null) {
                String[] exts = c.getExtends();
                for (int i = 0; i < exts.length; i++) {
                    discardConf(rootModuleConf, exts[i]); // recursive remove of extended
                    // configurations
                }
                depConfs.remove(c.getName());
            } else {
                Message.warn("unknown configuration in " + getId() + ": " + conf);
            }
        } else {
            depConfs.remove(conf);
View Full Code Here

        Set depConfs = usage.addAndGetConfigurations(rootModuleConf);
        if (md != null) {
            // add all given dependency configurations to the set + extended ones
            for (int i = 0; i < dependencyConfs.length; i++) {
                depConfs.add(dependencyConfs[i]);
                Configuration conf = md.getConfiguration(dependencyConfs[i]);
                if (conf != null) {
                    String[] exts = conf.getExtends();
                    // recursive add of extended
                    addRootModuleConfigurations(usage, rootModuleConf, exts);
                }
            }
        } else {
View Full Code Here

TOP

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

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.