Examples of IvySettings


Examples of org.apache.ivy.core.settings.IvySettings

                + "test-update-excludedconfs1.xml").toURI().toURL();
        XmlModuleDescriptorUpdater.update(settingsUrl, buffer,
            getUpdateOptions("release", "mynewrev").setConfsToExclude(new String[] {"myconf2"}));

        XmlModuleDescriptorParser parser = XmlModuleDescriptorParser.getInstance();
        ModuleDescriptor updatedMd = parser.parseDescriptor(new IvySettings(),
            new ByteArrayInputStream(buffer.toByteArray()), new BasicResource("test", false, 0, 0,
                    false), true);

        // test the number of configurations
        Configuration[] configs = updatedMd.getConfigurations();
View Full Code Here

Examples of org.apache.ivy.core.settings.IvySettings

            buffer,
            getUpdateOptions("release", "mynewrev").setConfsToExclude(
                new String[] {"myconf2", "conf2"}));

        XmlModuleDescriptorParser parser = XmlModuleDescriptorParser.getInstance();
        ModuleDescriptor updatedMd = parser.parseDescriptor(new IvySettings(),
            new ByteArrayInputStream(buffer.toByteArray()), new BasicResource("test", false, 0, 0,
                    false), true);

        // test the number of configurations
        Configuration[] configs = updatedMd.getConfigurations();
View Full Code Here

Examples of org.apache.ivy.core.settings.IvySettings

                + "test-update-excludedconfs4.xml").toURI().toURL();
        XmlModuleDescriptorUpdater.update(settingsUrl, buffer,
            getUpdateOptions("release", "mynewrev").setConfsToExclude(new String[] {"myconf2"}));

        XmlModuleDescriptorParser parser = XmlModuleDescriptorParser.getInstance();
        ModuleDescriptor updatedMd = parser.parseDescriptor(new IvySettings(),
            new ByteArrayInputStream(buffer.toByteArray()), new BasicResource("test", false, 0, 0,
                    false), true);

        // test the number of configurations
        Artifact[] artifacts = updatedMd.getAllArtifacts();
View Full Code Here

Examples of org.apache.ivy.core.settings.IvySettings

                + "test-update-excludedconfs5.xml").toURI().toURL();
        XmlModuleDescriptorUpdater.update(settingsUrl, buffer,
            getUpdateOptions("release", "mynewrev").setConfsToExclude(new String[] {"myconf2"}));

        XmlModuleDescriptorParser parser = XmlModuleDescriptorParser.getInstance();
        ModuleDescriptor updatedMd = parser.parseDescriptor(new IvySettings(),
            new ByteArrayInputStream(buffer.toByteArray()), new BasicResource("test", false, 0, 0,
                    false), true);

        DependencyDescriptor[] deps = updatedMd.getDependencies();
        assertNotNull("Dependencies shouldn't be null", deps);
View Full Code Here

Examples of org.apache.ivy.core.settings.IvySettings

    // IVY-1356
    public void testMergedUpdateWithExtendsAndExcludes() throws Exception {
        URL url = XmlModuleUpdaterTest.class.getResource("test-extends-dependencies-exclude.xml");

        XmlModuleDescriptorParser parser = XmlModuleDescriptorParser.getInstance();
        ModuleDescriptor md = parser.parseDescriptor(new IvySettings(), url, true);

        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
        XmlModuleDescriptorUpdater.update(url, buffer, getUpdateOptions("release", "mynewrev")
                .setMerge(true).setMergedDescriptor(md));

        ModuleDescriptor updatedMd = parser.parseDescriptor(new IvySettings(),
            new ByteArrayInputStream(buffer.toByteArray()), new BasicResource("test", false, 0, 0,
                    false), true);

        DependencyDescriptor[] deps = updatedMd.getDependencies();
        assertNotNull("Dependencies shouldn't be null", deps);
View Full Code Here

Examples of org.apache.ivy.core.settings.IvySettings

                        + "\t\t<dependency org=\"myorg\" name=\"mymodule1\" rev=\"1.0\" conf=\"default->default\"/>"
                        + XmlModuleDescriptorUpdater.LINE_SEPARATOR) != -1);
    }

    private UpdateOptions getUpdateOptions(String status, String revision) {
        return getUpdateOptions(new IvySettings(), new HashMap(), status, revision, new Date());
    }
View Full Code Here

Examples of org.apache.ivy.core.settings.IvySettings

    private File dest = new File("build/test/test-write.xml");

    public void testSimple() throws Exception {
        DefaultModuleDescriptor md = (DefaultModuleDescriptor) XmlModuleDescriptorParser
                .getInstance().parseDescriptor(new IvySettings(),
                    XmlModuleDescriptorWriterTest.class.getResource("test-simple.xml"), true);
        md.setResolvedPublicationDate(new GregorianCalendar(2005, 4, 1, 11, 0, 0).getTime());
        md.setResolvedModuleRevisionId(new ModuleRevisionId(md.getModuleRevisionId().getModuleId(),
                "NONE"));
        XmlModuleDescriptorWriter.write(md, LICENSE, dest);
View Full Code Here

Examples of org.apache.ivy.core.settings.IvySettings

        assertEquals(expected, wrote);
    }

    public void testInfo() throws Exception {
        DefaultModuleDescriptor md = (DefaultModuleDescriptor) XmlModuleDescriptorParser
                .getInstance().parseDescriptor(new IvySettings(),
                    XmlModuleDescriptorWriterTest.class.getResource("test-info.xml"), true);
        md.setResolvedPublicationDate(new GregorianCalendar(2005, 4, 1, 11, 0, 0).getTime());
        md.setResolvedModuleRevisionId(new ModuleRevisionId(md.getModuleRevisionId().getModuleId(),
                "NONE"));
        XmlModuleDescriptorWriter.write(md, LICENSE, dest);
View Full Code Here

Examples of org.apache.ivy.core.settings.IvySettings

        assertEquals(expected, wrote);
    }

    public void testDependencies() throws Exception {
        ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(
            new IvySettings(),
            XmlModuleDescriptorWriterTest.class.getResource("test-dependencies.xml"), true);
        XmlModuleDescriptorWriter.write(md, LICENSE, dest);

        assertTrue(dest.exists());
        String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
View Full Code Here

Examples of org.apache.ivy.core.settings.IvySettings

        assertEquals(expected, wrote);
    }

    public void testFull() throws Exception {
        ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(
            new IvySettings(), XmlModuleDescriptorWriterTest.class.getResource("test.xml"), false);
        XmlModuleDescriptorWriter.write(md, LICENSE, dest);

        assertTrue(dest.exists());
        String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
                .replaceAll("\r\n", "\n").replace('\r', '\n');
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.