Package org.apache.ivy.core.report

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


        Ivy ivy = new Ivy();
        ivy.configure(new File("test/repositories/IVY-84/ivysettings.xml"));
        ResolveReport report = ivy.resolve(new File("test/repositories/IVY-84/tests/7/ivy.xml")
                .toURL(), getResolveOptions(new String[] {"buildtime", "default"}));

        ConfigurationResolveReport conf = report.getConfigurationReport("default");

        assertContainsArtifact("test", "a", "1.0.2", "a", "txt", "txt", conf);
        assertDoesntContainArtifact("test", "a", "1.0.2", "a-bt", "txt", "txt", conf);
        assertContainsArtifact("test", "b", "1.0.1", "b", "txt", "txt", conf);
        assertDoesntContainArtifact("test", "b", "1.0.1", "b-bt", "txt", "txt", conf);
View Full Code Here


        assertNotNull(report);
        ModuleDescriptor md = report.getModuleDescriptor();
        assertNotNull(md);
        ModuleRevisionId mrid = ModuleRevisionId.newInstance("org6", "mod6.1", "0.3");
        assertEquals(mrid, md.getModuleRevisionId());
        ConfigurationResolveReport crr = report.getConfigurationReport("default");
        assertNotNull(crr);
        assertEquals(1, crr.getArtifactsNumber());
        crr = report.getConfigurationReport("extension");
        assertNotNull(crr);
        assertEquals(1, crr.getArtifactsNumber());

        assertTrue(getResolvedIvyFileInCache(mrid).exists());

        assertTrue(getIvyFileInCache(
            ModuleRevisionId.newInstance("org1", "mod1.2", "2.0")).exists());
View Full Code Here

        assertFalse(report.hasError());
        ModuleDescriptor md = report.getModuleDescriptor();
        assertNotNull(md);
        ModuleRevisionId mrid = ModuleRevisionId.newInstance("org6", "mod6.2", "0.3");
        assertEquals(mrid, md.getModuleRevisionId());
        ConfigurationResolveReport crr = report.getConfigurationReport("default");
        assertNotNull(crr);
        assertEquals(2, crr.getArtifactsNumber());
        crr = report.getConfigurationReport("extension");
        assertNotNull(crr);
        assertEquals(2, crr.getArtifactsNumber());

        assertTrue(getResolvedIvyFileInCache(mrid).exists());

        assertTrue(getIvyFileInCache(
            ModuleRevisionId.newInstance("org6", "mod6.1", "0.4")).exists());
View Full Code Here

                .toURL(), getResolveOptions(new String[] {"*"}));
        assertNotNull(report);
        assertFalse(report.hasError());
        ModuleDescriptor md = report.getModuleDescriptor();
        assertNotNull(md);
        ConfigurationResolveReport crr = report.getConfigurationReport("libraries");
        assertEquals(0, crr.getArtifactsNumber());

        crr = report.getConfigurationReport("run");
        assertEquals(2, crr.getArtifactsNumber());
        assertContainsArtifact("org6", "mod6.2", "2.0", "mod6.2", "jar", "jar", crr);
        assertContainsArtifact("org6", "mod6.1", "2.0", "mod6.1", "jar", "jar", crr);

        crr = report.getConfigurationReport("compile");
        assertEquals(2, crr.getArtifactsNumber());
        assertContainsArtifact("org6", "mod6.2", "2.0", "mod6.2", "jar", "jar", crr);
        assertContainsArtifact("org6", "mod6.1", "2.0", "mod6.1", "jar", "jar", crr);

        crr = report.getConfigurationReport("test");
        assertEquals(2, crr.getArtifactsNumber());
        assertContainsArtifact("org6", "mod6.1", "2.0", "mod6.1", "jar", "jar", crr);
        assertContainsArtifact("org1", "mod1.2", "2.2", "mod1.2", "jar", "jar", crr);
    }
View Full Code Here

            for (int i = 0; i < confs.length; i++) {
                Message.verbose("resolving dependencies for configuration '" + confs[i] + "'");
                // for each configuration we clear the cache of what's been fetched
                fetchedSet.clear();
   
                ConfigurationResolveReport confReport = null;
                if (report != null) {
                    confReport = report.getConfigurationReport(confs[i]);
                    if (confReport == null) {
                        confReport = new ConfigurationResolveReport(
                            this, md, confs[i], reportDate, options);
                        report.addReport(confs[i], confReport);
                    }
                }
                // we reuse the same resolve data with a new report for each conf
View Full Code Here

            options.setResolveId(ResolveOptions.getDefaultResolveId(md));
        }

        try {
            return r.getDependency(new DefaultDependencyDescriptor(id, true), new ResolveData(this,
                    options, new ConfigurationResolveReport(this, md, "default", null, options)));
        } catch (ParseException e) {
            throw new RuntimeException("problem while parsing repository module descriptor for "
                    + id + ": " + e, e);
        }
    }
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());
            } else if (mrid.getName().equals("mod1.2")) {
View Full Code Here

        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());
            } else if (mrid.getName().equals("mod1.2")) {
View Full Code Here

        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());
            } else if (mrid.getName().equals("mod1.2")) {
View Full Code Here

        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")) {
                assertEquals("A revision should be 1.0.0", "1.0.0", mrid.getRevision());
View Full Code Here

TOP

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

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.