I noticed the same irritation with the catalina ant tasks last week. I did try to check whether a webapp was already deployed prior to calling deploy, but I couldn't work out how to capture the output of the Catalina List Task and parse the results for the existence of the webapp. Any suggestions as to how to do that? I thought maybe the JmxQuery task might do it, but I haven't had time to check.
Another good way to do this would be to enhance the tasks! I was going to create a patch this weekend if I get the time. I think my desired features for this are to allow a failonerror attribute and also a usefile attribute to send the output to the file, since that way I could use <linecontainsregexp/> to validate whether the webapp is already deployed. James On Thu, 2005-08-18 at 12:12, [EMAIL PROTECTED] wrote: > * Antcontrib <trycatch> > * Ant2 will never be written > * why you dont check for the existence of the webapp before undeploying? > > > Jan > > >-----Ursprüngliche Nachricht----- > >Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > >Gesendet: Donnerstag, 18. August 2005 12:31 > >An: [email protected] > >Betreff: Workaround for no failonerror > > > >I keep needing to ignore failures for tasks which don't > >themselves support a "failonerror" attribute. > > > >For example, I want to add a tomcat 'undeploy' task when doing > >a clean build before redeploying the newly built warfile to tomcat. > > > >But this fails if the the app is not already deployed, and > >stops the clean and build halfway through. So I keep having to > >go in and edit the build.xml to switch this task in and out manually. > > > >The feature inlined below is accepted for Ant2, but Is there a > >recognised way already in use to enclose an arbitrary task in > >some kind of wrapper which swallows (ignores) errors where > >they don't matter, allowing the build script to continue? > > > >I am using Ant 1.6.2 embedded in Eclipse. > > > >Cefn > >http://cefn.com > > > >>>>>>>>>>>>>>>>>>>> > > > >From <http://ant.apache.org/ant2/requested-features.html> > >http://ant.apache.org/ant2/requested-features.html - accepted > >new features.... > > > >'Provide "failonerror"-like functionality to all tasks. > >(Provide this as an aspect?? Much like logging aspect or > >classloader aspect).' > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
