ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs SubAnt.java
Date Tue, 15 Jul 2003 16:44:28 GMT
peterreilly    2003/07/15 09:44:28

  Modified:    src/main/org/apache/tools/ant/taskdefs SubAnt.java
  Log:
  stylecheck
  
  Revision  Changes    Path
  1.7       +17 -16    ant/src/main/org/apache/tools/ant/taskdefs/SubAnt.java
  
  Index: SubAnt.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/SubAnt.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SubAnt.java	5 Jul 2003 14:34:12 -0000	1.6
  +++ SubAnt.java	15 Jul 2003 16:44:27 -0000	1.7
  @@ -117,8 +117,7 @@
       /**
        * Runs the various sub-builds.
        */
  -    public void execute()
  -                throws BuildException {
  +    public void execute() {
           if (buildpath == null) {
               throw new BuildException("No buildpath specified");
           }
  @@ -135,15 +134,14 @@
               target = getOwningTarget().getName();
           }
   */
  -        for (int i=0; i<count; ++i) {
  -            File directory=null;
  +        for (int i = 0; i < count; ++i) {
  +            File directory = null;
               File file = new File(filenames[i]);
               if (file.isDirectory()) {
                   if (genericantfile != null) {
                       directory = file;
                       file = genericantfile;
  -                }
  -                else {
  +                } else {
                       file = new File(file, antfile);
                   }
               }
  @@ -164,7 +162,7 @@
       private void execute(File file, File directory)
                   throws BuildException {
           if (!file.exists() || file.isDirectory() || !file.canRead()) {
  -            String msg = "Invalid file: "+file;
  +            String msg = "Invalid file: " + file;
               if (failOnError) {
                   throw new BuildException(msg);
               }
  @@ -187,9 +185,9 @@
               if (failOnError) {
                   throw e;
               }
  -            log("Failure for target '"+target
  -               +"' of: "+antfilename+"\n"
  -               +e.getMessage(), Project.MSG_WARN);
  +            log("Failure for target '" + target
  +               + "' of: " +  antfilename + "\n"
  +               + e.getMessage(), Project.MSG_WARN);
           }
       }
   
  @@ -206,13 +204,15 @@
   
       /**
        * Build file path, to use in conjunction with directories.<br/>
  -     * Use <code>genericantfile</code>, in order to run the same build file
with different basedirs.<br/>
  +     * Use <code>genericantfile</code>, in order to run the same build file
  +     * with different basedirs.<br/>
        * If this attribute is set, <code>antfile</code> is ignored.
        *
  -     * @param afile (path of the generic ant file, absolute or relative to project base
directory)
  +     * @param afile (path of the generic ant file, absolute or relative to
  +     *               project base directory)
        * */
       public void setGenericAntfile(File afile) {
  -        this.genericantfile=afile;
  +        this.genericantfile = afile;
       }
   
       /**
  @@ -227,6 +227,7 @@
       /**
        * The target to call on the different sub-builds. Set to "" to execute
        * the default target.
  +     * @param target the target
        * <p>
        */
       //     REVISIT: Defaults to the target name that contains this task if not specified.
  @@ -287,6 +288,7 @@
       /**
        * Corresponds to <code>&lt;ant&gt;</code>'s
        * nested <code>&lt;propertyset&gt;</code> element.
  +     * @param ps the propertset
        */
       public void addPropertyset(PropertySet ps) {
           propertySets.addElement(ps);
  @@ -354,8 +356,7 @@
        *
        * @return the newly created nested build path element.
        */
  -    public Path.PathElement createBuildpathElement()
  -                            throws BuildException {
  +    public Path.PathElement createBuildpathElement() {
           return getBuildpath().createPathElement();
       }
   
  @@ -392,7 +393,7 @@
           Ant ant = (Ant) getProject().createTask("ant");
           ant.setOwningTarget(getOwningTarget());
           ant.init();
  -        if(target != null && target.length()>0) {
  +        if (target != null && target.length() > 0) {
               ant.setTarget(target);
           }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message