yoavs 2004/08/30 12:52:51 Modified: catalina/src/share/org/apache/catalina/ant UndeployTask.java Log: Addressed Bugzilla 30763, added failOnError attribute. Revision Changes Path 1.4 +31 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/UndeployTask.java Index: UndeployTask.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/UndeployTask.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- UndeployTask.java 27 Feb 2004 14:58:41 -0000 1.3 +++ UndeployTask.java 30 Aug 2004 19:52:51 -0000 1.4 @@ -33,7 +33,29 @@ // ------------------------------------------------------------- Properties + /** + * Whether to fail (with a BuildException) if + * an error occurs. The default behavior is + * to do so. + */ + protected boolean failOnError = true; + /** + * Returns the value of the failOnError + * property. + */ + public boolean isFailOnError() { + return failOnError; + } + + /** + * Sets the value of the failOnError property. + * + * @param newFailOnError New attribute value + */ + public void setFailOnError(boolean newFailOnError) { + failOnError = newFailOnError; + } /** * The context path of the web application we are managing. @@ -64,7 +86,14 @@ throw new BuildException ("Must specify 'path' attribute"); } - execute("/undeploy?path=" + this.path); + + try { + execute("/undeploy?path=" + this.path); + } catch (BuildException e) { + if( isFailOnError() ) { + throw e; + } + } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]