Package org.apache.ivy

Examples of org.apache.ivy.Ivy


        }
    }

    // Test case for issue IVY-407
    public void testLatestTime1() throws Exception {
        ivy = new Ivy();
        ivy.configure(LatestConflictManagerTest.class.getResource("ivysettings-latest-time.xml"));
        ivy.getSettings().setVariable("ivy.log.conflict.resolution", "true", true);

        // set timestamps, because svn is not preserving this information,
        // and the latest time strategy is relying on it
View Full Code Here


            }
        }
    }

    public void testLatestTime2() throws Exception {
        ivy = new Ivy();
        ivy.configure(LatestConflictManagerTest.class.getResource("ivysettings-latest-time.xml"));
        ivy.getSettings().setVariable("ivy.log.conflict.resolution", "true", true);

        // set timestamps, because svn is not preserving this information,
        // and the latest time strategy is relying on it
View Full Code Here

     * A needs B-1.0.0 and C-1.0.2 : retrieve ok and publish A-1.0.0 4) D needs C-1.0.1 : retrieve
     * ok and publish D-1.0.0 5) E needs D-1.0.0 and A-1.0.0 (D before A in ivy file) retrieve
     * failed to get C-1.0.2 from A (get apparently C-1.0.1 from D)
     */
    public void testLatestTimeTransitivity() throws Exception {
        ivy = new Ivy();
        ivy.configure(LatestConflictManagerTest.class
                .getResource("ivysettings-latest-time-transitivity.xml"));
        ivy.getSettings().setVariable("ivy.log.conflict.resolution", "true", true);

        // set timestamps, because svn is not preserving this information,
View Full Code Here

        cache = new File("build/cache");
        cache.mkdirs();
        settings.setDefaultCache(cache);

        ivy = new Ivy();
        ivy.setSettings(settings);
        ivy.bind();

        ivy.getResolutionCacheManager().clean();
        RepositoryCacheManager[] caches = settings.getRepositoryCacheManagers();
View Full Code Here

        cache = new File("build/cache");
        cache.mkdirs();
        settings.setDefaultCache(cache);

        ivy = new Ivy();
        ivy.setSettings(settings);
        ivy.bind();

        ivy.getResolutionCacheManager().clean();
        RepositoryCacheManager[] caches = settings.getRepositoryCacheManagers();
View Full Code Here

    private Ivy ivy;

    private File cache;

    protected void setUp() throws Exception {
        ivy = new Ivy();
        ivy.configure(StrictConflictManagerTest.class.getResource("ivysettings-strict-test.xml"));
        cache = new File("build/cache");
        cache.mkdirs();
    }
View Full Code Here

     * </p>
     *
     * @return the current ivy instance
     */
    public Ivy getIvy() {
        Ivy ivy = peekIvy();
        return ivy == null ? getDefaultIvy() : ivy;
    }
View Full Code Here

     * </p>
     *
     * @return the current ivy instance, or <code>null</code> if there is no current ivy instance.
     */
    public Ivy peekIvy() {
        Ivy ivy = (Ivy) this.ivy.get();
        return ivy;
    }
View Full Code Here

    public MessageLogger getMessageLogger() {
        // calling getIvy() instead of peekIvy() is not possible here: it will initialize a default
        // Ivy instance, with default settings, but settings themselves may log messages and lead to
        // a call to this method. So we use the current Ivy instance if any, or the default Ivy
        // instance, or the default MessageLogger.
        Ivy ivy = peekIvy();
        if (ivy == null) {
            if (defaultIvy == null) {
                return Message.getDefaultLogger();
            } else {
                return defaultIvy.getLoggerEngine();
            }
        } else {
            return ivy.getLoggerEngine();
        }
    }
View Full Code Here

                .exists());
        assertTrue(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar").exists());
    }

    public void testResolverDirectlyUsingCache() throws Exception {
        Ivy ivy = new Ivy();
        ivy.configure(ResolveTest.class.getResource("badcacheconf.xml"));
        File depIvyFileInCache = getIvyFileInCache(ModuleRevisionId.newInstance("org1", "mod1.1",
            "1.0"));
        FileUtil.copy(File.createTempFile("test", "xml"), depIvyFileInCache, null); // creates a
        // fake
        // dependency
        // file in cache
        ResolveReport report = ivy.resolve(new File(
                "test/repositories/1/org2/mod2.4/ivys/ivy-0.3.xml"),
            getResolveOptions(new String[] {"*"}));

        assertNotNull(report);
        ModuleDescriptor md = report.getModuleDescriptor();
View Full Code Here

TOP

Related Classes of org.apache.ivy.Ivy

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.