Package org.apache.tools.ant.taskdefs

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


    * @exception BuildException  Description of the Exception
    */
   private void overrideProperties() throws BuildException {
      Enumeration e = properties.elements();
      while ( e.hasMoreElements() ) {
         Property p = (Property)e.nextElement();
         p.setProject( newProject );
         p.execute();
      }
      getProject().copyInheritedProperties( newProject );
   }
View Full Code Here


         reinit();
      }
      /*
       *  Property p = new Property( true, getProject() );
       */
      Property p = new Property();
      p.setProject( newProject );
      p.setTaskName( "property" );
      properties.addElement( p );
      return p;
   }
View Full Code Here

    */
   private void reinit() {
      init();
      final int count = properties.size();
      for ( int i = 0; i < count; i++ ) {
         Property p = (Property)properties.elementAt( i );
         Property newP = (Property)newProject.createTask( "property" );
         newP.setName( p.getName() );
         if ( p.getValue() != null ) {
            newP.setValue( p.getValue() );
         }
         if ( p.getFile() != null ) {
            newP.setFile( p.getFile() );
         }
         if ( p.getResource() != null ) {
            newP.setResource( p.getResource() );
         }
         if ( p.getPrefix() != null ) {
            newP.setPrefix( p.getPrefix() );
         }
         if ( p.getRefid() != null ) {
            newP.setRefid( p.getRefid() );
         }
         if ( p.getEnvironment() != null ) {
            newP.setEnvironment( p.getEnvironment() );
         }
         if ( p.getClasspath() != null ) {
            newP.setClasspath( p.getClasspath() );
         }
         properties.setElementAt( newP, i );
      }
   }
View Full Code Here

    * @exception BuildException  Description of the Exception
    */
   private void overrideProperties() throws BuildException {
      Enumeration e = properties.elements();
      while ( e.hasMoreElements() ) {
         Property p = (Property)e.nextElement();
         p.setProject( newProject );
         p.execute();
      }
      getProject().copyInheritedProperties( newProject );
   }
View Full Code Here

         reinit();
      }
      /*
       *  Property p = new Property( true, getProject() );
       */
      Property p = new Property();
      p.setProject( newProject );
      p.setTaskName( "property" );
      properties.addElement( p );
      return p;
   }
View Full Code Here

        Vector tasks = new Vector();

        int sz = values.size();
        CallTarget ct = null;
        Object val = null;
        Property p = null;

        for (int i = 0; i < sz; i++) {
            val = values.elementAt(i);
            ct = createCallTarget();
            p = ct.createParam();
            p.setName(param);

            if (val instanceof File)
                p.setLocation((File)val);
            else
                p.setValue((String)val);

            tasks.addElement(ct);
        }

        if (parallel && maxThreads > 1)
View Full Code Here

        ct.setTarget(target);
        ct.setInheritAll(inheritAll);
        ct.setInheritRefs(inheritRefs);
        Enumeration e = params.elements();
        while (e.hasMoreElements()) {
            Property param = (Property) e.nextElement();
            Property toSet = ct.createParam();
            toSet.setName(param.getName());
            if (param.getValue() != null) {
                toSet.setValue(param.getValue());
            }
            if (param.getFile() != null) {
                toSet.setFile(param.getFile());
            }
            if (param.getResource() != null) {
                toSet.setResource(param.getResource());
            }
            if (param.getPrefix() != null) {
                toSet.setPrefix(param.getPrefix());
            }
            if (param.getRefid() != null) {
                toSet.setRefid(param.getRefid());
            }
            if (param.getEnvironment() != null) {
                toSet.setEnvironment(param.getEnvironment());
            }
            if (param.getClasspath() != null) {
                toSet.setClasspath(param.getClasspath());
            }
        }

        e = references.elements();
        while (e.hasMoreElements()) {
View Full Code Here

                else
                    getProject().setUserProperty(property, value);
            }
            else
            {
                Property p = (Property)project.createTask("property");
                p.setName(property);
                p.setValue(value);
                p.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

                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

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.