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

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


        ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(settings,
            getClass().getResource("test-configextendsothers2.xml"), true);
        assertNotNull(md);

        // has an 'all-public' configuration
        Configuration allPublic = md.getConfiguration("all-public");
        assertNotNull(allPublic);

        // 'all-public' extends all other public configurations
        String[] allPublicExt = allPublic.getExtends();
        assertEquals(Arrays.asList(new String[] {"default", "test", "extra"}),
            Arrays.asList(allPublicExt));
    }
View Full Code Here


        // verify that the parent description was merged.
        assertEquals("Parent module description.", md.getDescription());

        // verify that the parent and child configurations were merged together.
        final Configuration[] expectedConfs = {new Configuration("default"),
                new Configuration("conf1"), new Configuration("conf2")};
        assertNotNull(md.getConfigurations());
        assertEquals(Arrays.asList(expectedConfs), Arrays.asList(md.getConfigurations()));

        // verify parent and child dependencies were merged together.
        DependencyDescriptor[] deps = md.getDependencies();
View Full Code Here

        // verify that the parent description was ignored.
        assertEquals("", md.getDescription());

        // verify that the parent configurations were ignored.
        final Configuration[] expectedConfs = {new Configuration("default")};
        assertNotNull(md.getConfigurations());
        assertEquals(Arrays.asList(expectedConfs), Arrays.asList(md.getConfigurations()));

        // verify parent dependencies were merged.
        DependencyDescriptor[] deps = md.getDependencies();
View Full Code Here

        // verify that the parent description was ignored.
        assertEquals("", md.getDescription());

        // verify that the parent and child configurations were merged together.
        final Configuration[] expectedConfs = {new Configuration("default"),
                new Configuration("conf1"), new Configuration("conf2")};
        assertNotNull(md.getConfigurations());
        assertEquals(Arrays.asList(expectedConfs), Arrays.asList(md.getConfigurations()));

        // verify parent dependencies were ignored.
        DependencyDescriptor[] deps = md.getDependencies();
View Full Code Here

        // verify that the parent description was merged.
        assertEquals("Parent module description.", md.getDescription());

        // verify that the parent configurations were ignored.
        final Configuration[] expectedConfs = {new Configuration("default")};
        assertNotNull(md.getConfigurations());
        assertEquals(Arrays.asList(expectedConfs), Arrays.asList(md.getConfigurations()));

        // verify parent dependencies were ignored.
        DependencyDescriptor[] deps = md.getDependencies();
View Full Code Here

        // child description should always be preferred, even if extendType="description"
        assertEquals("Child description overrides parent.", md.getDescription());

        // verify that the parent configurations were ignored.
        final Configuration[] expectedConfs = {new Configuration("default")};
        assertNotNull(md.getConfigurations());
        assertEquals(Arrays.asList(expectedConfs), Arrays.asList(md.getConfigurations()));

        // verify parent dependencies were ignored.
        DependencyDescriptor[] deps = md.getDependencies();
View Full Code Here

        // verify that the parent description was ignored.
        assertEquals("", md.getDescription());

        // verify that the parent and child configurations were merged together.
        final Configuration[] expectedConfs = {new Configuration("default"),
                new Configuration("conf1"), new Configuration("conf2")};
        assertNotNull(md.getConfigurations());
        assertEquals(Arrays.asList(expectedConfs), Arrays.asList(md.getConfigurations()));

        // verify parent and child dependencies were merged together.
        DependencyDescriptor[] deps = md.getDependencies();
View Full Code Here

        // verify that the parent description was merged.
        assertEquals("Parent module description.", md.getDescription());

        // verify that the parent and child configurations were merged together.
        final Configuration[] expectedConfs = {new Configuration("default"),
                new Configuration("conf1"), new Configuration("conf2")};
        assertNotNull(md.getConfigurations());
        assertEquals(Arrays.asList(expectedConfs), Arrays.asList(md.getConfigurations()));

        // verify parent and child dependencies were merged together.
        DependencyDescriptor[] deps = md.getDependencies();
View Full Code Here

     */
    public void testTransitiveAttributeForNonTransitiveConfs() throws Exception {
        // Given a ModuleDescriptor with a non-transitive configuration
        DefaultModuleDescriptor md = new DefaultModuleDescriptor(new ModuleRevisionId(new ModuleId(
                "myorg", "myname"), "1.0"), "integration", new Date());
        Configuration conf = new Configuration("conf", Visibility.PUBLIC, "desc", null, false, null);
        md.addConfiguration(conf);

        // When the ModuleDescriptor is written
        XmlModuleDescriptorWriter.write(md, LICENSE, dest);

View Full Code Here

     */
    public void testTransitiveAttributeNotWrittenForTransitiveConfs() throws Exception {
        // Given a ModuleDescriptor with a transitive configuration
        DefaultModuleDescriptor md = new DefaultModuleDescriptor(new ModuleRevisionId(new ModuleId(
                "myorg", "myname"), "1.0"), "integration", new Date());
        Configuration conf = new Configuration("conf", Visibility.PUBLIC, "desc", null, true, null);
        md.addConfiguration(conf);

        // When the ModuleDescriptor is written
        XmlModuleDescriptorWriter.write(md, LICENSE, dest);

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.