ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gle...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant Main.java
Date Sat, 03 Mar 2001 22:31:32 GMT
glennm      01/03/03 14:31:32

  Modified:    src/main/org/apache/tools/ant Main.java
  Log:
  Add info about default target to -projecthelp
  
  Revision  Changes    Path
  1.31      +18 -0     jakarta-ant/src/main/org/apache/tools/ant/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Main.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Main.java	2001/01/31 13:32:57	1.30
  +++ Main.java	2001/03/03 22:31:31	1.31
  @@ -566,6 +566,24 @@
                   }
               }
           }
  +
  +        String defaultTarget = project.getDefaultTarget();
  +        if (defaultTarget != null && !"".equals(defaultTarget)) { // shouldn't
need to check but...
  +            Vector defaultName = new Vector();
  +            Vector defaultDesc = new Vector();
  +            defaultName.addElement(defaultTarget);
  +
  +            int indexOfDefDesc = topNames.indexOf(defaultTarget);
  +            if (indexOfDefDesc >= 0) {
  +                defaultDesc.addElement(topDescriptions.elementAt(indexOfDefDesc));
  +            } else {
  +                defaultDesc.addElement("");
  +            }
  +
  +            printTargets(defaultName, defaultDesc, "Default target:", maxLength);
  +
  +        }
  +
           printTargets(topNames, topDescriptions, "Main targets:", maxLength);
           printTargets(subNames, null, "Subtargets:", 0);
       }
  
  
  

Mime
View raw message