Package org.apache.tools.ant.taskdefs

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


        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);
        settings.setBaseDir(project.getBaseDir());
       
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 getConfiguredIvyInstance((ProjectComponent) task);
    }

    void createIvyEngine(final ProjectComponent 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);
        settings.setBaseDir(project.getBaseDir());
       
View Full Code Here

            javaProps.setProperty(propName, propValue);
        }
       
        // Copy the properties into java.util.Properties
        for (Iterator iterator = this.properties.iterator(); iterator.hasNext();) {
            Property prop = (Property) iterator.next();
           
            String propName = prop.getName();
            String propValue = prop.getValue();

            if(propName==null)
                throw new NullPointerException("The propName must not be null");
           
            if(propValue==null)
View Full Code Here

        if (antFile != null)
            ant.setAntfile(antFile);

        Enumeration e = properties.elements();
        PropertyContainer pc = null;
        Property p = null;
        while (e.hasMoreElements())
        {
            pc = (PropertyContainer)e.nextElement();
            p = ant.createProperty();
            p.setName(pc.getName());
            p.setValue(pc.getValue());
        }

        e = references.elements();
        ReferenceContainer rc = null;
        Ant.Reference ref = null;
View Full Code Here

            toExecute = project.getDefaultTarget();
        callTarget.setTarget(toExecute);

        Enumeration e = properties.elements();
        PropertyContainer pc = null;
        Property p = null;
        while (e.hasMoreElements())
        {
            pc = (PropertyContainer)e.nextElement();
            p = callTarget.createParam();
            p.setName(pc.getName());
            p.setValue(pc.getValue());
        }


        e = references.elements();
        ReferenceContainer rc = null;
View Full Code Here

        //put the outputdirectory in a property
        if (kind.equalsIgnoreCase(ATTR_OUTPUT))
        {
          String propName = idContainer + "outpath";
          Property property = new Property();
          property.setName(propName);
          property.setValue(path);
          property.setProject(getProject());
          property.execute();
          if (verbose)
            System.out.println("Setting property " + propName + " to value " + path);
        }

        //let's put the last source directory in a property
        if (kind.equalsIgnoreCase(ATTR_SRC))
        {
          String propName = idContainer + "srcpath";
          Property property = new Property();
          property.setName(propName);
          property.setValue(path);
          property.setProject(getProject());
          property.execute();
          if (verbose)
            System.out.println("Setting property " + propName + " to value " + path);
        }

        if ((kind.equalsIgnoreCase(ATTR_SRC) && includeSource)
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

        //put the outputdirectory in a property
        if (kind.equalsIgnoreCase(ATTR_OUTPUT))
        {
          String propName = idContainer + "outpath";
          Property property = new Property();
          property.setName(propName);
          property.setValue(path);
          property.setProject(getProject());
          property.execute();
          if (verbose)
            System.out.println("Setting property " + propName + " to value " + path);
        }

        //let's put the last source directory in a property
        if (kind.equalsIgnoreCase(ATTR_SRC))
        {
          String propName = idContainer + "srcpath";
          Property property = new Property();
          property.setName(propName);
          property.setValue(path);
          property.setProject(getProject());
          property.execute();
          if (verbose)
            System.out.println("Setting property " + propName + " to value " + path);
        }

        if ((kind.equalsIgnoreCase(ATTR_SRC) && includeSource)
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.