Package org.codehaus.cargo.generic

Examples of org.codehaus.cargo.generic.DefaultContainerFactory


        // (2) Create the Cargo Container instance wrapping our physical container
        LocalConfiguration configuration = (LocalConfiguration)
                new DefaultConfigurationFactory().createConfiguration(
                        "tomcat5x", ConfigurationType.STANDALONE);
        container = (InstalledLocalContainer)
                new DefaultContainerFactory().createContainer(
                        "tomcat5x", ContainerType.INSTALLED, configuration);
        container.setHome(tomcatHome);

        // (3) Statically deploy WAR(s)
        configuration.addDeployable(getWAR("struts-blank"));
View Full Code Here


    //    Assert.assertEquals(adapter.adminPort, port);
        Assert.assertEquals(adapter.userName, username);
        Assert.assertEquals(adapter.getPassword(), password);

        ConfigurationFactory configFactory = new DefaultConfigurationFactory();
        ContainerFactory containerFactory = new DefaultContainerFactory();

        Container container = adapter.getContainer(configFactory, containerFactory, adapter.getContainerId());
        Assert.assertNotNull(container);
    }
View Full Code Here

        Assert.assertEquals(remoteAdapter.userName, username);
        Assert.assertEquals(remoteAdapter.getPassword(), password);
        Assert.assertEquals(remoteAdapter.hostname, hostname);

        ConfigurationFactory configFactory = new DefaultConfigurationFactory();
        ContainerFactory containerFactory = new DefaultContainerFactory();

        Container container = remoteAdapter.getContainer(configFactory, containerFactory, remoteAdapter.getContainerId());
        Assert.assertNotNull(container);
    }
View Full Code Here

     //   Assert.assertEquals(adapter.adminPort, port);
        Assert.assertEquals(adapter.userName, username);
        Assert.assertEquals(adapter.getPassword(), password);

        ConfigurationFactory configFactory = new DefaultConfigurationFactory();
        ContainerFactory containerFactory = new DefaultContainerFactory();

        Container container = adapter.getContainer(configFactory, containerFactory, adapter.getContainerId());
        Assert.assertNotNull(container);
    }
View Full Code Here

                    listener.error(Messages.DeployPublisher_NoSuchFile(f));
                    return true;
                }
                ClassLoader cl = getClass().getClassLoader();
                final ConfigurationFactory configFactory = new DefaultConfigurationFactory(cl);
                final ContainerFactory containerFactory = new DefaultContainerFactory(cl);
                final DeployerFactory deployerFactory = new DefaultDeployerFactory(cl);

                Container container = getContainer(configFactory, containerFactory, getContainerId());

                deploy(deployerFactory, listener, container, f, contextPath);
View Full Code Here

    // 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
View Full Code Here

            System.out.println("[INFO] servlet port: " + servletPort);
        }

        configuration.addDeployable(war);

        container = (InstalledLocalContainer) new DefaultContainerFactory()
                .createContainer(containerId, ContainerType.INSTALLED,
                        configuration);

        // If 'cargo.container.home' is not set, or if an expression was
        // passed through, try to use the TOMCAT_HOME environment variable.
View Full Code Here

        // (2) Create the Cargo Container instance wrapping our physical container
        LocalConfiguration configuration = (LocalConfiguration)
                new DefaultConfigurationFactory().createConfiguration(
                        "tomcat5x", ConfigurationType.STANDALONE);
        container = (InstalledLocalContainer)
                new DefaultContainerFactory().createContainer(
                        "tomcat5x", ContainerType.INSTALLED, configuration);
        container.setHome(tomcatHome);

        // (3) Statically deploy WAR(s)
        configuration.addDeployable(getWAR("struts-blank"));
View Full Code Here

      {
         throw new BuildException("No specified file to deploy");
      }

      //
      ContainerFactory containerFactory = new DefaultContainerFactory();
      RemoteContainer container = (RemoteContainer)containerFactory.createContainer("jboss4x", ContainerType.REMOTE, cfg);

      //
      JBossJMXDeployer deployer = new JBossJMXDeployer(container);
      execute(deployer);
   }
View Full Code Here

     * @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

TOP

Related Classes of org.codehaus.cargo.generic.DefaultContainerFactory

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.