Package org.apache.ivy

Examples of org.apache.ivy.Ivy.install()


    public void testNotTransitive() throws Exception {
        Ivy ivy = Ivy.newInstance();
        ivy.configure(new File("test/repositories/ivysettings.xml"));

        ivy.install(ModuleRevisionId.newInstance("org1", "mod1.1", "1.0"), ivy.getSettings()
                .getDefaultResolver().getName(), "install",
            new InstallOptions().setTransitive(false));

        assertTrue(new File("build/test/install/org1/mod1.1/ivy-1.0.xml").exists());
        assertTrue(new File("build/test/install/org1/mod1.1/mod1.1-1.0.jar").exists());
View Full Code Here


    public void testRegexpMatcher() throws Exception {
        Ivy ivy = Ivy.newInstance();
        ivy.configure(new File("test/repositories/ivysettings.xml"));

        ivy.install(ModuleRevisionId.newInstance("org1", ".*", ".*"), "1", "install",
            new InstallOptions().setMatcherName(PatternMatcher.REGEXP).setOverwrite(true));

        assertTrue(new File("build/test/install/org1/mod1.1/ivy-1.0.xml").exists());
        assertTrue(new File("build/test/install/org1/mod1.1/mod1.1-1.0.jar").exists());

View Full Code Here

                    "no to resolver name: please provide it through parameter 'to'");
        }
        ModuleRevisionId mrid = ModuleRevisionId.newInstance(organisation, module, revision);
        ResolveReport report;
        try {
            report = ivy.install(mrid, from, to, transitive, doValidate(settings), overwrite,
                FilterHelper.getArtifactTypeFilter(type), matcher);
        } catch (Exception e) {
            throw new BuildException("impossible to install " + mrid + ": " + e, e);
        }
View Full Code Here

                    "no to resolver name: please provide it through parameter 'to'");
        }
        ModuleRevisionId mrid = ModuleRevisionId.newInstance(organisation, module, revision);
        ResolveReport report;
        try {
            report = ivy.install(mrid, from, to, transitive, doValidate(settings), overwrite,
                FilterHelper.getArtifactTypeFilter(type), cache, matcher);
        } catch (Exception e) {
            throw new BuildException("impossible to install " + mrid + ": " + e, e);
        }
View Full Code Here

    public void testSimple() throws Exception {
        Ivy ivy = Ivy.newInstance();
        ivy.configure(new File("test/repositories/ivysettings.xml"));

        ivy.install(ModuleRevisionId.newInstance("org1", "mod1.2", "2.0"), ivy.getSettings()
                .getDefaultResolver().getName(), "install", true, true, true, null, _cache,
            PatternMatcher.EXACT);

        assertTrue(new File("build/test/install/org1/mod1.2/ivy-2.0.xml").exists());
        assertTrue(new File("build/test/install/org1/mod1.2/mod1.2-2.0.jar").exists());
View Full Code Here

    public void testSimpleWithoutDefaultResolver() throws Exception {
        Ivy ivy = Ivy.newInstance();
        ivy.configure(new File("test/repositories/ivysettings-nodefaultresolver.xml"));

        ivy.install(ModuleRevisionId.newInstance("org1", "mod1.2", "2.0"), "test", "install", true,
            true, true, null, _cache, PatternMatcher.EXACT);

        assertTrue(new File("build/test/install/org1/mod1.2/ivy-2.0.xml").exists());
        assertTrue(new File("build/test/install/org1/mod1.2/mod1.2-2.0.jar").exists());
    }
View Full Code Here

    public void testDependencies() throws Exception {
        Ivy ivy = Ivy.newInstance();
        ivy.configure(new File("test/repositories/ivysettings.xml"));

        ivy.install(ModuleRevisionId.newInstance("org1", "mod1.1", "1.0"), ivy.getSettings()
                .getDefaultResolver().getName(), "install", true, true, true, null, _cache,
            PatternMatcher.EXACT);

        assertTrue(new File("build/test/install/org1/mod1.1/ivy-1.0.xml").exists());
        assertTrue(new File("build/test/install/org1/mod1.1/mod1.1-1.0.jar").exists());
View Full Code Here

    public void testNotTransitive() throws Exception {
        Ivy ivy = Ivy.newInstance();
        ivy.configure(new File("test/repositories/ivysettings.xml"));

        ivy.install(ModuleRevisionId.newInstance("org1", "mod1.1", "1.0"), ivy.getSettings()
                .getDefaultResolver().getName(), "install", false, true, true, null, _cache,
            PatternMatcher.EXACT);

        assertTrue(new File("build/test/install/org1/mod1.1/ivy-1.0.xml").exists());
        assertTrue(new File("build/test/install/org1/mod1.1/mod1.1-1.0.jar").exists());
View Full Code Here

    public void testRegexpMatcher() throws Exception {
        Ivy ivy = Ivy.newInstance();
        ivy.configure(new File("test/repositories/ivysettings.xml"));

        ivy.install(ModuleRevisionId.newInstance("org1", ".*", ".*"), "1", "install", false, true,
            true, null, _cache, PatternMatcher.REGEXP);

        assertTrue(new File("build/test/install/org1/mod1.1/ivy-1.0.xml").exists());
        assertTrue(new File("build/test/install/org1/mod1.1/mod1.1-1.0.jar").exists());

View Full Code Here

    public void testSimple() throws Exception {
        Ivy ivy = Ivy.newInstance();
        ivy.configure(new File("test/repositories/ivysettings.xml"));
       
        ivy.install(ModuleRevisionId.newInstance("org1", "mod1.2", "2.0"),
                ivy.getSettings().getDefaultResolver().getName(),
                "install", true, true, true, null, _cache, PatternMatcher.EXACT);
       
        assertTrue(new File("build/test/install/org1/mod1.2/ivy-2.0.xml").exists());
        assertTrue(new File("build/test/install/org1/mod1.2/mod1.2-2.0.jar").exists());
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.