Package org.apache.tools.ant.taskdefs

Examples of org.apache.tools.ant.taskdefs.Property


     * </p>
     */
    private void    setProperty( String name, String value )
        throws BuildException
    {
        Property    property = new Property();

        property.setName( name );
        property.setValue( value );

        property.setProject( getProject() );
        property.execute();
    }
View Full Code Here


    private void    setProperty( String name, String value )
        throws BuildException
    {
        log( "Setting property " + name + " to " + value, Project.MSG_INFO );
       
        Property    property = new Property();

        property.setName( name );
        property.setValue( value );

        property.setProject( getProject() );
        property.execute();
    }
View Full Code Here

        callee.setInheritRefs(inheritRefs);
        Enumeration keys = properties.keys();
        while (keys.hasMoreElements()) {
            String key = (String) keys.nextElement();
            String val = (String) properties.get(key);
            Property prop = callee.createProperty();
            prop.setName(key);
            prop.setValue(val);
        }
        callee.execute();
        System.gc();
        System.gc();
        System.gc();
View Full Code Here

            }
        }
    }

    private void loadDeliveryList() {
        Property property = (Property) getProject().createTask("property");
        property.setOwningTarget(getOwningTarget());
        property.init();
        property.setFile(deliveryList);
        property.perform();
    }
View Full Code Here

                ct.setOwningTarget(getOwningTarget());
                ct.init();
                ct.setTarget(deliverTarget);
                ct.setInheritAll(true);
                ct.setInheritRefs(true);
                Property param = ct.createParam();
                param.setName("dependency.name");
                param.setValue(depMrid.getName());
                param = ct.createParam();
                param.setName("dependency.published.status");
                param.setValue(status);
                param = ct.createParam();
                param.setName("dependency.published.version");
                param.setValue(version);
                param = ct.createParam();
                param.setName("dependency.version");
                param.setValue(depMrid.getRevision());
                param = ct.createParam();
                param.setName("dependency.status");
                param.setValue(depStatus == null ? "null" : depStatus);

                ct.perform();

                String deliveredProperty = depMrid.getName() + "." + depMrid.getRevision()
                        + ".delivered";
View Full Code Here

        return ivyEngine;
    }

    void createIvyEngine(final Task task) {
        Project project = task.getProject();
        Property prop = new Property() {
            public void execute() throws BuildException {
                addProperties(getDefaultProperties(task));
            }
        };
        prop.setProject(project);
        prop.init();
        prop.execute();

       
        IvyAntVariableContainer ivyAntVariableContainer = new IvyAntVariableContainer(project);

        IvySettings settings = new IvySettings(ivyAntVariableContainer);
View Full Code Here

    private void overrideProperties(Project subproject) throws BuildException {
        // remove duplicate properties - last property wins
        // Needed for backward compatibility
        Set<String> set = new HashSet<String>();
        for (int i = properties.size() - 1; i >= 0; --i) {
            Property p = (Property) properties.get(i);
            if (p.getName() != null && !p.getName().equals("")) {
                if (set.contains(p.getName())) {
                    properties.remove(i);
                } else {
                    set.add(p.getName());
                }
            }
        }
        for (Property p : properties) {
            p.setProject(subproject);
            p.execute();
        }

        getProject().copyInheritedProperties(subproject);
    }
View Full Code Here

        if (property != null) {
            if (isRequired() && getProject().getProperty(property) == null) {
                throw new BuildException("expected property '" + property + "': " + description);
            }
            if (defaultValue != null && getProject().getProperty(property) == null) {
                Property propTask = new Property();
                propTask.setProject(getProject());
                propTask.setTaskName(getTaskName());
                propTask.setName(property);
                propTask.setValue(defaultValue);
                propTask.execute();
            }
        } else if (path != null) {
            Object p = getProject().getReference(path);
            if (isRequired() && p == null) {
                throw new BuildException("expected path '" + path + "': " + description);
View Full Code Here

                if (ParameterTask.class.isAssignableFrom(taskClass)) {
                    ParameterTask parameterTask = (ParameterTask) maybeConfigureTask(task);
                    handleParameterTask(parameterTask, eaReport);
                }
                if (Property.class.isAssignableFrom(taskClass)) {
                    Property propertyTask = (Property) maybeConfigureTask(task);
                    handleProperty(propertyTask, eaReport);
                }
                if (Import.class.isAssignableFrom(taskClass)) {
                    Import importTask = (Import) maybeConfigureTask(task);
                    handleImport(importTask, eaReport, conf);
View Full Code Here

            // set nested parameters
            for (Iterator paramIt = parameters.iterator(); paramIt.hasNext(); )
            {
               Parameter param = (Parameter)paramIt.next();
               Property calleeParam = callee.createProperty();

               if (getProject().getProperty(param.getName()) != null)
               {
                  log("  Overriding existing property \"" + param.getName()  + "\".", Project.MSG_DEBUG);
               }

               log("  \"" + param.getName()  + "\"=\"" + param.getValue() + "\".", Project.MSG_DEBUG);
               calleeParam.setName(param.getName());
               calleeParam.setValue(param.getValue());
            }

            callee.setTarget(m_sTarget);
           
            try
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.taskdefs.Property

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.