Package org.codehaus.cargo.container.installer

Examples of org.codehaus.cargo.container.installer.ZipURLInstaller


        String tomcat5x = System.getProperty("cargo.tomcat5x.home");

        File tomcatHome;
        if (tomcat5x == null || tomcat5x.startsWith("$")) {
            //System.out.println("INFO: Downloading Tomcat 5.0 from a mirror");
            Installer installer = new ZipURLInstaller(
                    new URL("http://mirrors.ibiblio.org/pub/mirrors/apache"
                            + "/tomcat/tomcat-5/v5.0.30/bin/jakarta-tomcat-5.0.30.zip"));
            installer.install();
            tomcatHome = installer.getHome();
        } else {
            tomcatHome = new File(tomcat5x);
        }
        //System.out.println("INFO: Tomcat home is " + tomcatHome);
View Full Code Here


    prepareTemporaryPath();

    // TODO(jarcec): We should parametrize those paths, version, etc...
    // Source: http://cargo.codehaus.org/Functional+testing
    Installer installer = new ZipURLInstaller(new URL("http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.36/bin/apache-tomcat-6.0.36.zip"));
    installer.install();

    LocalConfiguration configuration = (LocalConfiguration) new DefaultConfigurationFactory().createConfiguration("tomcat6x", ContainerType.INSTALLED, ConfigurationType.STANDALONE);
    container = (InstalledLocalContainer) new DefaultContainerFactory().createContainer("tomcat6x", ContainerType.INSTALLED, configuration);

    // Set home to our installed tomcat instance
    container.setHome(installer.getHome());

    // Store tomcat logs into file as they are quite handy for debugging
    container.setOutput(getTemporaryPath() + "/log/tomcat.log");

    // Propagate system properties to the container
View Full Code Here

        String tomcat5x = System.getProperty("cargo.tomcat5x.home");

        File tomcatHome;
        if (tomcat5x == null || tomcat5x.startsWith("$")) {
            //System.out.println("INFO: Downloading Tomcat 5.0 from a mirror");
            Installer installer = new ZipURLInstaller(
                    new URL("http://mirrors.ibiblio.org/pub/mirrors/apache"
                            + "/tomcat/tomcat-5/v5.0.30/bin/jakarta-tomcat-5.0.30.zip"));
            installer.install();
            tomcatHome = installer.getHome();
        } else {
            tomcatHome = new File(tomcat5x);
        }
        //System.out.println("INFO: Tomcat home is " + tomcatHome);
View Full Code Here

    /**
     * Downloads and installs container into target directory, and then starts up container with specified configuration.
     * @throws IOException
     */
    public void setupContainer() throws IOException {
        Installer installer = new ZipURLInstaller(new URL(getZipInstallerUrl()), "target/install/" + getContainerId());
        installer.install();
        ContainerFactory containerFac = new DefaultContainerFactory();
        ConfigurationFactory configFac = new DefaultConfigurationFactory();
        Configuration configuration =
            configFac.createConfiguration(getContainerId(), ContainerType.INSTALLED, ConfigurationType.STANDALONE);
        setConfigProps(configuration, getConfigProps());
        container =
            (InstalledLocalContainer) containerFac.createContainer(getContainerId(), ContainerType.INSTALLED, configuration);
        container.setLogger(new SimpleLogger());
        container.setHome(installer.getHome());
        Map<String, String> props = getContainerProps();
        if (props != null) {
            container.setSystemProperties(props);
        }

View Full Code Here

            LOGGER.info("Installing [" + configurationName + "] configuration...");
        }
        try {
            final URL remoteLocation = new URL(this.remoteLocation + containerConfigurationFile);
            final String installDir = containerHome + "server/";
            final ZipURLInstaller installer = new ZipURLInstaller(remoteLocation, installDir, installDir);
            installer.install();
        } catch (final MalformedURLException e) {
            throw new DeployException("Failed to download container!", e);
        }

        /*
 
View Full Code Here

         */
        String installDir;
        try {
            final URL remoteLocationUrl = new URL(this.remoteLocation + containerFile);
            installDir = StringUtils.substringBeforeLast(StringUtils.chomp(containerHome, "/"), "/");
            final ZipURLInstaller installer = new ZipURLInstaller(remoteLocationUrl, installDir, installDir);
            installer.install();
        } catch (final MalformedURLException e) {
            throw new DeployException("Failed to download container!", e);
        }

        /*
 
View Full Code Here

    prepareTemporaryPath();

    // TODO(jarcec): We should parametrize those paths, version, etc...
    // Source: http://cargo.codehaus.org/Functional+testing
    Installer installer = new ZipURLInstaller(new URL("http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.36/bin/apache-tomcat-6.0.36.zip"));
    installer.install();

    LocalConfiguration configuration = (LocalConfiguration) new DefaultConfigurationFactory().createConfiguration("tomcat6x", ContainerType.INSTALLED, ConfigurationType.STANDALONE);
    container = (InstalledLocalContainer) new DefaultContainerFactory().createContainer("tomcat6x", ContainerType.INSTALLED, configuration);

    // Set home to our installed tomcat instance
    container.setHome(installer.getHome());

    // Store tomcat logs into file as they are quite handy for debugging
    container.setOutput(getTemporaryPath() + "/log/tomcat.log");

    // Propagate system properties to the container
View Full Code Here

        String tomcat5x = System.getProperty("cargo.tomcat5x.home");

        File tomcatHome;
        if (tomcat5x == null || tomcat5x.startsWith("$")) {
            //System.out.println("INFO: Downloading Tomcat 5.0 from a mirror");
            Installer installer = new ZipURLInstaller(
                    new URL("http://mirrors.ibiblio.org/pub/mirrors/apache"
                            + "/tomcat/tomcat-5/v5.5.26/bin/apache-tomcat-5.5.26.zip"));
            installer.install();
            tomcatHome = installer.getHome();
        } else {
            tomcatHome = new File(tomcat5x);
        }
        //System.out.println("INFO: Tomcat home is " + tomcatHome);
View Full Code Here

TOP

Related Classes of org.codehaus.cargo.container.installer.ZipURLInstaller

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.