Package org.apache.ivy.core.report

Examples of org.apache.ivy.core.report.ResolveReport


    }

    public ResolvedConfiguration resolve(Configuration configuration, Ivy ivy, ModuleDescriptor moduleDescriptor) {
        Clock clock = new Clock();
        ResolveOptions resolveOptions = createResolveOptions(configuration);
        ResolveReport resolveReport;
        try {
            resolveReport = ivy.resolve(moduleDescriptor, resolveOptions);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
View Full Code Here


        }
    }

    private void resolveAndAssert(String mrid, String expectedModuleSet) throws ParseException,
            IOException {
        ResolveReport report = fixture.resolve(mrid);
        assertFalse(report.hasError());
        ConfigurationResolveReport defaultReport = report.getConfigurationReport("default");
        TestHelper.assertModuleRevisionIds(expectedModuleSet, defaultReport.getModuleRevisionIds());
    }
View Full Code Here

        FileUtil.forceDelete(_cache);
    }

    // Test case for issue IVY-388
    public void testIvy388() throws Exception {
        ResolveReport report = ivy.resolve(
            LatestConflictManagerTest.class.getResource("ivy-388.xml"), getResolveOptions());

        List deps = report.getDependencies();
        Iterator dependencies = deps.iterator();
        String[] confs = report.getConfigurations();
        while (dependencies.hasNext()) {
            IvyNode node = (IvyNode) dependencies.next();
            for (int i = 0; i < confs.length; i++) {
                String conf = confs[i];
                if (!node.isEvicted(conf)) {
                    boolean flag1 = report.getConfigurationReport(conf).getDependency(
                        node.getResolvedId()) != null;
                    boolean flag2 = report.getConfigurationReport(conf).getModuleRevisionIds()
                            .contains(node.getResolvedId());
                    assertEquals("Inconsistent data for node " + node + " in conf " + conf, flag1,
                        flag2);
                }
            }
View Full Code Here

        }
    }

    // Test case for issue IVY-383
    public void testIvy383() throws Exception {
        ResolveReport report = ivy.resolve(
            LatestConflictManagerTest.class.getResource("ivy-383.xml"), getResolveOptions());
        ConfigurationResolveReport defaultReport = report.getConfigurationReport("default");
        Iterator iter = defaultReport.getModuleRevisionIds().iterator();
        while (iter.hasNext()) {
            ModuleRevisionId mrid = (ModuleRevisionId) iter.next();
            if (mrid.getName().equals("mod1.1")) {
                assertEquals("1.0", mrid.getRevision());
View Full Code Here

        long time = System.currentTimeMillis() - 10000;
        new File("test/repositories/1/org1/mod1.2/jars/mod1.2-2.0.jar").setLastModified(time);
        new File("test/repositories/1/org1/mod1.2/jars/mod1.2-2.2.jar")
                .setLastModified(time + 2000);

        ResolveReport report = ivy.resolve(
            LatestConflictManagerTest.class.getResource("ivy-latest-time-1.xml"),
            getResolveOptions());
        ConfigurationResolveReport defaultReport = report.getConfigurationReport("default");
        Iterator iter = defaultReport.getModuleRevisionIds().iterator();
        while (iter.hasNext()) {
            ModuleRevisionId mrid = (ModuleRevisionId) iter.next();
            if (mrid.getName().equals("mod1.1")) {
                assertEquals("1.0", mrid.getRevision());
View Full Code Here

        long time = System.currentTimeMillis() - 10000;
        new File("test/repositories/1/org1/mod1.2/jars/mod1.2-2.0.jar").setLastModified(time);
        new File("test/repositories/1/org1/mod1.2/jars/mod1.2-2.2.jar")
                .setLastModified(time + 2000);

        ResolveReport report = ivy.resolve(
            LatestConflictManagerTest.class.getResource("ivy-latest-time-2.xml"),
            getResolveOptions());
        ConfigurationResolveReport defaultReport = report.getConfigurationReport("default");
        Iterator iter = defaultReport.getModuleRevisionIds().iterator();
        while (iter.hasNext()) {
            ModuleRevisionId mrid = (ModuleRevisionId) iter.next();
            if (mrid.getName().equals("mod1.1")) {
                assertEquals("1.0", mrid.getRevision());
View Full Code Here

        new File("test/repositories/IVY-407/MyCompany/C/ivy-1.0.1.xml")
                .setLastModified(time + 2000);
        new File("test/repositories/IVY-407/MyCompany/C/ivy-1.0.2.xml")
                .setLastModified(time + 4000);

        ResolveReport report = ivy.resolve(
            LatestConflictManagerTest.class.getResource("ivy-latest-time-transitivity.xml"),
            getResolveOptions());
        ConfigurationResolveReport defaultReport = report.getConfigurationReport("default");
        Iterator iter = defaultReport.getModuleRevisionIds().iterator();
        while (iter.hasNext()) {
            ModuleRevisionId mrid = (ModuleRevisionId) iter.next();

            if (mrid.getName().equals("A")) {
View Full Code Here

        configureProject("test/java/org/apache/ivy/ant/IvyAntSettingsBuildFile.xml");
    }

    public void testOverrideNotSpecified() {
        executeTarget("testOverrideNotSpecified");
        ResolveReport report = (ResolveReport) getProject().getReference("ivy.resolved.report");
        assertNotNull(report);
        assertFalse(report.hasError());
        assertEquals(1, report.getDependencies().size());
    }
View Full Code Here

        assertEquals(1, report.getDependencies().size());
    }

    public void testOverrideSetToFalse() {
        executeTarget("testOverrideSetToFalse");
        ResolveReport report = (ResolveReport) getProject().getReference("ivy.resolved.report");
        assertNotNull(report);
        assertFalse(report.hasError());
        assertEquals(1, report.getDependencies().size());
    }
View Full Code Here

    }

    public void testSettingsWithIdIvyInstance() {
        // IVY-925
        executeTarget("testSettingsWithPropertyAsId");
        ResolveReport report = (ResolveReport) getProject().getReference("ivy.resolved.report");
        assertNotNull(report);
        assertFalse(report.hasError());
        assertEquals(1, report.getDependencies().size());
    }
View Full Code Here

TOP

Related Classes of org.apache.ivy.core.report.ResolveReport

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.