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

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


        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


        String useConf = BundleInfoAdapter.CONF_USE_PREFIX + dd.getDependencyRevisionId().getName();

        capabilityMd.addConfiguration(BundleInfoAdapter.CONF_DEFAULT);
        capabilityMd.addConfiguration(BundleInfoAdapter.CONF_OPTIONAL);
        capabilityMd.addConfiguration(BundleInfoAdapter.CONF_TRANSITIVE_OPTIONAL);
        capabilityMd.addConfiguration(new Configuration(useConf));

        DefaultDependencyDescriptor capabilityDD = new DefaultDependencyDescriptor(
                md.getModuleRevisionId(), false);
        capabilityDD.addDependencyConfiguration(BundleInfoAdapter.CONF_NAME_DEFAULT,
            BundleInfoAdapter.CONF_NAME_DEFAULT);
View Full Code Here

        }
    }

    protected void assertConf(ModuleDescriptor md, String name, String desc, Visibility visibility,
            String[] exts) {
        Configuration conf = md.getConfiguration(name);
        assertNotNull("configuration not found: " + name, conf);
        assertEquals(name, conf.getName());
        assertEquals(desc, conf.getDescription());
        assertEquals(visibility, conf.getVisibility());
        assertEquals(Arrays.asList(exts), Arrays.asList(conf.getExtends()));
    }
View Full Code Here

                md.getStatus(), new Date());

        // copy configurations
        List<String> resolvedConfs = Arrays.asList(getConfigurations());
        for (String conf : resolvedConfs) {
            fixedmd.addConfiguration(new Configuration(conf));
        }

        if (midToKeep != null && !midToKeep.isEmpty()) {
            // add dependency we want to keep from the original module descriptor
            DependencyDescriptor[] deps = md.getDependencies();
View Full Code Here

            DefaultModuleDescriptor md = new DefaultModuleDescriptor(ModuleRevisionId.newInstance(
                "apache", "ivy-install", "1.0"), settings.getStatusManager().getDefaultStatus(),
                    new Date());
            String resolveId = ResolveOptions.getDefaultResolveId(md);
            md.addConfiguration(new Configuration("default"));
            md.addConflictManager(new ModuleId(ExactPatternMatcher.ANY_EXPRESSION,
                    ExactPatternMatcher.ANY_EXPRESSION), ExactPatternMatcher.INSTANCE,
                new NoConflictManager());

            for (int c = 0; c < options.getConfs().length; c++) {
View Full Code Here

         */
        protected void mergeConfigurations(ModuleDescriptor parent) {
            ModuleRevisionId sourceMrid = parent.getModuleRevisionId();
            Configuration[] configurations = parent.getConfigurations();
            for (int i = 0; i < configurations.length; i++) {
                Configuration configuration = configurations[i];
                Message.debug("Merging configuration with: " + configuration.getName());
                // copy configuration from parent descriptor
                getMd().addConfiguration(new Configuration(configuration, sourceMrid));
            }

            if (parent instanceof DefaultModuleDescriptor) {
                setDefaultConfMapping(((DefaultModuleDescriptor) parent).getDefaultConfMapping());
                setDefaultConf(((DefaultModuleDescriptor) parent).getDefaultConf());
View Full Code Here

                    String ext = settings.substitute(attributes.getValue("extends"));
                    String transitiveValue = attributes.getValue("transitive");
                    boolean transitive = (transitiveValue == null) ? true : Boolean.valueOf(
                        attributes.getValue("transitive")).booleanValue();
                    String deprecated = attributes.getValue("deprecated");
                    Configuration configuration = new Configuration(conf,
                            Configuration.Visibility.getVisibility(visibility == null ? "public"
                                    : visibility), settings.substitute(attributes
                                    .getValue("description")), ext == null ? null : ext.split(","),
                            transitive, deprecated);
                    ExtendableItemHelper.fillExtraAttributes(settings, configuration, attributes,
View Full Code Here

            }
        }

        protected void checkConfigurations() {
            if (getMd().getConfigurations().length == 0) {
                getMd().addConfiguration(new Configuration("default"));
            }
        }
View Full Code Here

        up.setText("Up");
        up.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));
        up.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                int i = getSelectedConfigurationIndex();
                Configuration c = orderedConfigurations[i];
                orderedConfigurations[i] = orderedConfigurations[i - 1];
                orderedConfigurations[i - 1] = c;
                confTableViewer.refresh();
                updateUpDownEnableButtons(true);
            }
        });

        down = new Button(upDownButtons, SWT.PUSH);
        down.setText("Down");
        down.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));
        down.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                int i = getSelectedConfigurationIndex();
                Configuration c = orderedConfigurations[i];
                orderedConfigurations[i] = orderedConfigurations[i + 1];
                orderedConfigurations[i + 1] = c;
                confTableViewer.refresh();
                updateUpDownEnableButtons(true);
            }
View Full Code Here

        });
    }

    private int getSelectedConfigurationIndex() {
        IStructuredSelection selection = (IStructuredSelection) confTableViewer.getSelection();
        Configuration c = (Configuration) selection.getFirstElement();
        for (int i = 0; i < orderedConfigurations.length; i++) {
            if (orderedConfigurations[i] == c) {
                return i;
            }
        }
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.