You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by vm...@apache.org on 2003/02/09 20:19:10 UTC

cvs commit: jakarta-cactus/documentation/src/java/org/apache/cactus/documentation CheckSitemapTask.java

vmassol     2003/02/09 11:19:10

  Modified:    documentation/src/java/org/apache/cactus/documentation
                        CheckSitemapTask.java
  Log:
  Make it throw a build exception when failonerror is set and a resource is not found
  
  Revision  Changes    Path
  1.5       +5 -5      jakarta-cactus/documentation/src/java/org/apache/cactus/documentation/CheckSitemapTask.java
  
  Index: CheckSitemapTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/documentation/src/java/org/apache/cactus/documentation/CheckSitemapTask.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CheckSitemapTask.java	28 Jan 2003 14:58:22 -0000	1.4
  +++ CheckSitemapTask.java	9 Feb 2003 19:19:10 -0000	1.5
  @@ -248,13 +248,13 @@
        */
       private boolean checkSitemapResource(Element theElement)
       {
  +        boolean isResourcePresent = true;       
           String id = theElement.getAttribute("id");
   
           if (isResourceToBeChecked(theElement))
           {
               String target = theElement.getAttribute("target");
  -                         
  -    
  +                             
               if ((target == null) || (target.length() == 0))
               {
                   log("Skipping remote resource [" + id + "]", 
  @@ -262,7 +262,7 @@
               }
               else
               {
  -                checkLocalSitemapResource(id, target);
  +                isResourcePresent = checkLocalSitemapResource(id, target);
               }
           }
           else
  @@ -270,7 +270,7 @@
               log("This resource should not be checked: [" + id + "]", 
                   Project.MSG_VERBOSE);
           }
  -        return true;
  +        return isResourcePresent;
       }
   
       /**
  
  
  

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