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

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


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

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

       
        System.setProperty("FLEX_HOME", flexHomeProperty);
        String flexlibProperty = flexHomeProperty.concat("/frameworks/");
    System.setProperty("flexlib", flexlibProperty);

        final Variable variable = new Variable();
        variable.setKey("flexlib");
        variable.setValue(flexHomeProperty);
    addSysproperty(variable);
       
        // This allows the tool to find the default config file.
        cmdline.createArgument().setValue("+flexlib=" + flexlibProperty);
       
View Full Code Here

                             javaTask.createJvmarg().setValue(javaFlag);
                         }
                     }
                    
                     for (String i : properties.keySet()) {
                         Variable sysp = new Variable();
                         sysp.setKey(i);
                         sysp.setValue(properties.get(i));
                         javaTask.addSysproperty(sysp);
                     }

                     if (quiet) {
                         javaTask.createArg().setValue("--quiet");
View Full Code Here

                            javaTask.createJvmarg().setValue(javaFlag);
                        }
                    }
                   
                    for (String i : properties.keySet()) {
                        Variable sysp = new Variable();
                        sysp.setKey(i);
                        sysp.setValue(properties.get(i));
                        javaTask.addSysproperty(sysp);
                    }

                    if (verbose) {
                        javaTask.createArg().setValue("--verbose");
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

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

            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));

                // Clone the DeployableFile instance as each container can
                // override default deployment properties (e.g. port, context
                // root, etc).
                DeployableFile thisDeployable = null;
                try
                {
                    thisDeployable = (DeployableFile) deployableFile.clone();
                }
                catch (CloneNotSupportedException e)
                {
                    throw new BuildException(e);
                }
                containers[i].setDeployableFile(thisDeployable);

                // Allow the container to override the default test context.
                // This is to support container extensions to the web.xml file.
                // Most containers allow defining the root context in these
                // extensions.
                if (containers[i].getTestContext() != null)
                {
                    thisDeployable.setTestContext(
                        containers[i].getTestContext());
                }              
               
                containers[i].setSystemProperties(
                    (Variable[]) this.systemProperties.toArray(
                        new Variable[0]));

                // Add extra classpath entries
                containers[i].setContainerClasspath(this.containerClasspath);
               
                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() + "/"
                        + thisDeployable.getTestContext());
                    executeInContainer(containers[i], thisDeployable);
                }
            }
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.