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

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


                            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


                             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

            super.execute();
        }
        else
        {
            Container[] containers = this.containerSet.getContainers();
            Variable contextUrl = new Variable();
            contextUrl.setKey("cactus.contextURL");
            addSysproperty(contextUrl);

            AntTaskFactory antTaskFactory = new DefaultAntTaskFactory(
                getProject(), getTaskName(), getLocation(), getOwningTarget());
           
            for (int i = 0; i < containers.length; i++)
            {
                containers[i].setAntTaskFactory(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()
                        + " @ " + containers[i].getBaseURL(),
                        Project.MSG_INFO);
                    log("--------------------------------------------------"
                        + "---------------", Project.MSG_INFO);
                    contextUrl.setValue(containers[i].getBaseURL() + "/"
                        + thisDeployable.getTestContext());
                    executeInContainer(containers[i], thisDeployable);
                }
            }
        }
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 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

    }

    void transferCoberturaDataFileProperty(Java task) {
        String coberturaProperty = coberturaPropertyValue();
        if (coberturaProperty != null) {
            Variable sysproperty = new Variable();
            sysproperty.setKey(COB_PROP_KEY);
            sysproperty.setValue(coberturaProperty);
            task.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.