ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Get.java
Date Wed, 22 May 2002 01:22:10 GMT
stevel      02/05/21 18:22:10

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
                        Get.java
  Log:
  bug ID 9298; <get> doesnt throw build exception on an auth failure
  
  now it does, unless ignoreerrors is true.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.25.2.1  +8 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Get.java
  
  Index: Get.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Get.java,v
  retrieving revision 1.25
  retrieving revision 1.25.2.1
  diff -u -r1.25 -r1.25.2.1
  --- Get.java	30 Apr 2002 14:31:01 -0000	1.25
  +++ Get.java	22 May 2002 01:22:10 -0000	1.25.2.1
  @@ -64,6 +64,7 @@
   import java.util.Date;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Task;
  +import org.apache.tools.ant.Project;
   import org.apache.tools.ant.util.FileUtils;
   import org.apache.tools.ant.util.JavaEnvUtils;
   
  @@ -176,8 +177,13 @@
                   // test for 401 result (HTTP only)
                   if (httpConnection.getResponseCode()
                       == HttpURLConnection.HTTP_UNAUTHORIZED)  {
  -                    log("Not authorized - check " + dest + " for details");
  -                    return;
  +                    String message="HTTP Authorization failure";
  +                    if(ignoreErrors) {
  +                        log(message,Project.MSG_WARN);
  +                        return;
  +                    } else {
  +                        throw new BuildException(message);
  +                    }
                   }
   
               }
  
  
  

--
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