Bug 10225

Summary: ANT Tasks Error Situation
Product: Tomcat 4 Reporter: Marc Logemann <devlists>
Component: UnknownAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED DUPLICATE    
Severity: enhancement CC: richard_kennard, roytmana
Priority: P3    
Version: Nightly Build   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: src jar file containing the feature enhancement
the same as the src-JAR, but this time a diff (i hope the format is correct)

Description Marc Logemann 2002-06-25 18:41:22 UTC
for example the org.apache.catalina.ant.StartTask will throw an exception
when you try to start a webapp which is allready running, this results
in a build-error in ANT. But in ANT build files where you emulate
something like hot-deploy in using a stop/startTask combination, there
are situations where you try to start an webapp which is allready running.

There should be an attribute where you can define if you really want
to throw an Exception (aka BuildError) or not. 

something like:
<tcstart  url="${catalina.url}" username="${catalina.username}" 
password="${catalina.password}" path="/maxbahr"/ builderroronfail="false">

The same goes for several other tasks like StopTask for allready stopped
webapps.

Craig mentioned correctly that a distinction between "bad-startup" or
"allready running" would be nice. IMO bad startup (which is mostly some
bad user/pw/path combination) should result in BuildError, but "allready
running" Situation should be left to the user...

I just mentioned StartTask and StopTask, there may be others where the
same pattern could be applied.
Comment 1 Marc Logemann 2002-06-25 21:59:27 UTC
Created attachment 2185 [details]
src jar file containing the feature enhancement
Comment 2 Marc Logemann 2002-06-25 23:26:15 UTC
Created attachment 2186 [details]
the same as the src-JAR, but this time a diff (i hope the format is correct)
Comment 3 Mark Thomas 2010-12-14 19:33:35 UTC
*** Bug 17572 has been marked as a duplicate of this bug. ***
Comment 4 Mark Thomas 2010-12-14 19:34:58 UTC
*** Bug 17070 has been marked as a duplicate of this bug. ***
Comment 5 Mark Thomas 2010-12-14 19:37:40 UTC
Dup has what appears to be a better patch

*** This bug has been marked as a duplicate of bug 28852 ***