yoavs 2004/08/30 12:43:27 Modified: catalina/src/share/org/apache/catalina/ant Tag: TOMCAT_5_0 UndeployTask.java webapps/docs Tag: TOMCAT_5_0 changelog.xml Log: Added failOnError attribute to UndeployTask, Bugzilla 30763. Revision Changes Path No revision No revision 1.3.2.1 +32 -3 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.3.2.1 diff -u -r1.3 -r1.3.2.1 --- UndeployTask.java 27 Feb 2004 14:58:41 -0000 1.3 +++ UndeployTask.java 30 Aug 2004 19:43:26 -0000 1.3.2.1 @@ -34,6 +34,12 @@ // ------------------------------------------------------------- Properties + /** + * Whether to fail (with a BuildException) if + * an error occurs. The default behavior is + * to do so. + */ + protected boolean failOnError = true; /** * The context path of the web application we are managing. @@ -48,6 +54,23 @@ this.path = path; } + /** + * 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; + } + // --------------------------------------------------------- Public Methods @@ -64,9 +87,15 @@ 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; + } + } + } } No revision No revision 1.70.2.17 +3 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.70.2.16 retrieving revision 1.70.2.17 diff -u -r1.70.2.16 -r1.70.2.17 --- changelog.xml 30 Aug 2004 19:35:37 -0000 1.70.2.16 +++ changelog.xml 30 Aug 2004 19:43:26 -0000 1.70.2.17 @@ -30,6 +30,9 @@ <fix> <bug>28914</bug>: threadPriority attribute ignored. (yoavs) </fix> + <fix> + <bug>30763</bug>: added failOnError attribute to UndeployTask. (yoavs) + </fix> </changelog> </subsection> </section>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]