Package org.apache.tools.ant.types.Environment

Examples of org.apache.tools.ant.types.Environment.Variable


            if (jrubyLaunchMemory != null) {
                arg = java.createJvmarg();
                arg.setValue("-Xmx" + jrubyLaunchMemory);
            }

            Variable classpath = new Variable();

            Path p = new Path(java.getProject());
            p.add((Path) project.getReference("maven.plugin.classpath"));
            p.add((Path) project.getReference("maven.compile.classpath"));
            classpath.setKey("JRUBY_PARENT_CLASSPATH");
            classpath.setValue(p.toString());

            java.addEnv(classpath);
        }

        if (jrubyHome != null) {
            Variable v = new Variable();
            v.setKey("jruby.home");
            v.setValue(jrubyHome);
            java.addSysproperty(v);
        }

        Path p = java.createClasspath();
        p.add((Path) project.getReference("maven.plugin.classpath"));
View Full Code Here


            super.execute();
        }
        else
        {
            Container[] containers = this.containerSet.getContainers();
            Variable contextUrl = new Variable();
            contextUrl.setKey("cactus.contextURL");
            addSysproperty(contextUrl);
            for (int i = 0; i < containers.length; i++)
            {
                containers[i].setAntTaskFactory(this.antTaskFactory);
                containers[i].setLog(new AntLog(this));
                containers[i].setDeployableFile(deployableFile);
                containers[i].setSystemProperties(
                    (Variable[]) this.systemProperties.toArray(
                        new Variable[0]));
                if (containers[i].isEnabled())
                {
                    containers[i].init();
                    log("--------------------------------------------------"
                        + "---------------",
                        Project.MSG_INFO);
                    log("Running tests against " + containers[i].getName(),
                        Project.MSG_INFO);
                    log("--------------------------------------------------"
                        + "---------------",
                        Project.MSG_INFO);
                    contextUrl.setValue(
                        "http://localhost:" + containers[i].getPort() + "/"
                        + deployableFile.getTestContext());
                    executeInContainer(containers[i], deployableFile);
                }
            }
View Full Code Here

        ResourceBundle bundle = thePropertySet.readProperties();
        Enumeration keys = bundle.getKeys();
        while (keys.hasMoreElements())
        {
            String key = (String) keys.nextElement();
            Variable var = new Variable();
            var.setKey(key);
            var.setValue(bundle.getString(key));
            if (thePropertySet.isServer())
            {
                addCactusServerProperty(var);
            }
            else
View Full Code Here

     */
    private void addCactusClientProperty(String theKey, String theValue)
    {
        log("Adding Cactus client system property [" + theKey
            + "] with value [" + theValue + "]", Project.MSG_VERBOSE);
        Variable sysProperty = new Variable();
        sysProperty.setKey(theKey);
        sysProperty.setValue(theValue);
        super.addSysproperty(sysProperty);
    }
View Full Code Here

     * @param theKey The property name
     * @param theValue The property value
     */
    private void addCactusServerProperty(String theKey, String theValue)
    {
        Variable property = new Variable();
        property.setKey(theKey);
        property.setValue(theValue);
        addCactusServerProperty(property);
    }
View Full Code Here

     * @param theValue The value
     * @return The created environment variable
     */
    protected final Variable createSysProperty(String theKey, String theValue)
    {
        Variable var = new Variable();
        var.setKey(theKey);
        var.setValue(theValue);
        return var;
    }
View Full Code Here

     * @param theFile The file the variable should point to
     * @return The created environment variable
     */
    protected final Variable createSysProperty(String theKey, File theFile)
    {
        Variable var = new Variable();
        var.setKey(theKey);
        var.setFile(theFile);
        return var;
    }
View Full Code Here

     * @param thePath The path
     * @return The created environment variable
     */
    protected final Variable createSysProperty(String theKey, Path thePath)
    {
        Variable var = new Variable();
        var.setKey(theKey);
        var.setPath(thePath);
        return var;
    }
View Full Code Here

            super.execute();
        }
        else
        {
            Container[] containers = this.containerSet.getContainers();
            Variable contextUrl = new Variable();
            contextUrl.setKey("cactus.contextURL");
            addSysproperty(contextUrl);
            for (int i = 0; i < containers.length; i++)
            {
                containers[i].setAntTaskFactory(this.antTaskFactory);
                containers[i].setLog(new AntLog(this));
                containers[i].setDeployableFile(
                    this.earFile != null ? this.earFile : this.warFile);
                if (containers[i].isEnabled())
                {
                    containers[i].init();
                    log("--------------------------------------------------"
                        + "---------------",
                        Project.MSG_INFO);
                    log("Running tests against " + containers[i].getName(),
                        Project.MSG_INFO);
                    log("--------------------------------------------------"
                        + "---------------",
                        Project.MSG_INFO);
                    contextUrl.setValue(
                        "http://localhost:" + containers[i].getPort() + "/"
                        + contextPath);
                    executeInContainer(containers[i], war, contextPath);
                }
            }
View Full Code Here

     */
    private void addCactusProperty(String theKey, String theValue)
    {
        log("Adding Cactus system property 'cactus." + theKey + "' with value '"
            + theValue + "'", Project.MSG_VERBOSE);
        Variable sysProperty = new Variable();
        sysProperty.setKey("cactus." + theKey);
        sysProperty.setValue(theValue);
        addSysproperty(sysProperty);
    }
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.types.Environment.Variable

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.