ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From umag...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant UnknownElement.java
Date Wed, 05 Dec 2001 21:10:41 GMT
umagesh     01/12/05 13:10:41

  Modified:    src/main/org/apache/tools/ant UnknownElement.java
  Log:
  Display to the user another cause of task not found exception being thrown.
  
  Revision  Changes    Path
  1.15      +12 -8     jakarta-ant/src/main/org/apache/tools/ant/UnknownElement.java
  
  Index: UnknownElement.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/UnknownElement.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- UnknownElement.java	2001/11/09 15:48:11	1.14
  +++ UnknownElement.java	2001/12/05 21:10:41	1.15
  @@ -79,11 +79,11 @@
        * Childelements, holds UnknownElement instances.
        */
       private Vector children = new Vector();
  -    
  +
       public UnknownElement (String elementName) {
           this.elementName = elementName;
       }
  -    
  +
       /**
        * return the corresponding XML element name.
        */
  @@ -118,7 +118,7 @@
        */
       public void execute() {
           if (realThing == null) {
  -            // plain impossible to get here, maybeConfigure should 
  +            // plain impossible to get here, maybeConfigure should
               // have thrown an exception.
               throw new BuildException("Could not create task of type: "
                                        + elementName, location);
  @@ -140,8 +140,8 @@
        * Creates child elements, creates children of the children, sets
        * attributes of the child elements.
        */
  -    protected void handleChildren(Object parent, 
  -                                  RuntimeConfigurable parentWrapper) 
  +    protected void handleChildren(Object parent,
  +                                  RuntimeConfigurable parentWrapper)
           throws BuildException {
   
           if (parent instanceof TaskAdapter) {
  @@ -150,7 +150,7 @@
   
           Class parentClass = parent.getClass();
           IntrospectionHelper ih = IntrospectionHelper.getHelper(parentClass);
  -        
  +
           for (int i=0; i<children.size(); i++) {
               RuntimeConfigurable childWrapper = parentWrapper.getChild(i);
               UnknownElement child = (UnknownElement) children.elementAt(i);
  @@ -220,7 +220,11 @@
               + "your task, or, if this is an optional task," + lSep
               + "to put the optional.jar and all required libraries of" +lSep
               + "this task in the lib directory of" + lSep
  -            + "your ant installation (ANT_HOME).";
  +            + "your ant installation (ANT_HOME)." + lSep
  +            + "There is also the possibility that your build file " + lSep
  +            + "is written to work with a more recent version of ant " + lSep
  +            + "than the one you are using, in which case you have to " + lSep
  +            + "upgrade.";
           return new BuildException(msg, location);
       }
   
  @@ -230,7 +234,7 @@
        * @return the name to use in logging messages.
        */
       public String getTaskName() {
  -        return realThing == null || !(realThing instanceof Task) ? 
  +        return realThing == null || !(realThing instanceof Task) ?
               super.getTaskName() : ((Task) realThing).getTaskName();
       }
   
  
  
  

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


Mime
View raw message