DO NOT REPLY [Bug 32800] - Add Redirector and failOnError support for Catalina Ant tasks
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=32800. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32800 [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Additional Comments From [EMAIL PROTECTED] 2005-01-31 12:50 --- I'm reopening to post, as promised, the updated doc for this enhancement. I'm sorry i didn't make it in time for 5.5.7 release, but i've been rather busy with my real job lately. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 32800] - Add Redirector and failOnError support for Catalina Ant tasks
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=32800. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32800 --- Additional Comments From [EMAIL PROTECTED] 2005-01-31 12:53 --- Created an attachment (id=14141) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=14141action=view) Patch for manager-howto.xml I tried to be as accurate as possible, but english is not my mother's language, so please have a check to syntax and grammatic :) -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 32800] - Add Redirector and failOnError support for Catalina Ant tasks
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=32800. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32800 [EMAIL PROTECTED] changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2005-01-31 13:19 --- Thanks, I've committed it. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 32800] - Add Redirector and failOnError support for Catalina Ant tasks
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=32800. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32800 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2005-01-03 17:22 --- All right, I committed the patch (I couldn't do it earlier, sorry), which looked good. Happy new year. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 32800] - Add Redirector and failOnError support for Catalina Ant tasks
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=32800. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32800 --- Additional Comments From [EMAIL PROTECTED] 2004-12-23 13:30 --- (From update of attachment 13821) Index: AbstractCatalinaTask.java === RCS file: /home/cvspublic/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ ant/AbstractCatalinaTask.java,v retrieving revision 1.3 diff -u -r1.3 AbstractCatalinaTask.java --- AbstractCatalinaTask.java 27 Feb 2004 14:58:40 - 1.3 +++ AbstractCatalinaTask.java 23 Dec 2004 11:55:25 - @@ -40,7 +40,7 @@ * @since 4.1 */ -public abstract class AbstractCatalinaTask extends Task { +public abstract class AbstractCatalinaTask extends BaseRedirectorHelperTask { // - Instance Variables @@ -209,35 +209,46 @@ reader = new InputStreamReader(hconn.getInputStream(), CHARSET); StringBuffer buff = new StringBuffer(); String error = null; +int msgPriority = Project.MSG_INFO; boolean first = true; while (true) { int ch = reader.read(); if (ch 0) { break; } else if ((ch == '\r') || (ch == '\n')) { -String line = buff.toString(); -buff.setLength(0); -log(line, Project.MSG_INFO); -if (first) { -if (!line.startsWith(OK -)) { -error = line; +// in Win \r\n would cause handleOutput() to be called +// twice, the second time with an empty string, +// producing blank lines +if (buff.length() 0) { +String line = buff.toString(); +buff.setLength(0); +if (first) { +if (!line.startsWith(OK -)) { +error = line; +msgPriority = Project.MSG_ERR; +} +first = false; } -first = false; +handleOutput(line, msgPriority); } } else { buff.append((char) ch); } } if (buff.length() 0) { -log(buff.toString(), Project.MSG_INFO); +handleOutput(buff.toString(), msgPriority); } -if (error != null) { +if (error != null isFailOnError()) { throw new BuildException(error); } - } catch (Throwable t) { -throw new BuildException(t); +if (isFailOnError()) { +throw new BuildException(t); +} else { +handleErrorOutput(t.getMessage()); +} } finally { +closeRedirector(); if (reader != null) { try { reader.close(); Index: UndeployTask.java === RCS file: /home/cvspublic/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ ant/UndeployTask.java,v retrieving revision 1.4 diff -u -r1.4 UndeployTask.java --- UndeployTask.java 30 Aug 2004 19:52:51 - 1.4 +++ UndeployTask.java 23 Dec 2004 11:55:25 - @@ -33,29 +33,6 @@ // - 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. @@ -87,14 +64,7 @@ (Must specify 'path' attribute); } -try { - execute(/undeploy?path= + this.path); - } catch (BuildException e) { - if( isFailOnError() ) { - throw e; - } -} - +execute(/undeploy?path= + this.path); } Index: ValidatorTask.java === RCS file:
DO NOT REPLY [Bug 32800] - Add Redirector and failOnError support for Catalina Ant tasks
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=32800. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32800 --- Additional Comments From [EMAIL PROTECTED] 2004-12-23 13:31 --- (From update of attachment 13822) /* * Copyright 2002,2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.catalina.ant; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; import org.apache.tools.ant.taskdefs.Redirector; import org.apache.tools.ant.types.RedirectorElement; /** * Abstract base class to add output redirection support for Catalina * Ant tasks. These tasks require Ant 1.5 or later. * br * strongWARNING:/strong due to depends chain, Ant could call a Task * more than once and this can affect the output redirection when configured. * If you are collecting the output in a property, it will collect the output * of only the first run, since Ant properties are immutable and once created * they cannot be changed. * br * If you are collecting output in a file the file will be overwritten with the * output of the last run, unless you set append=true, in which case each run * will append it's output to the file. * * * @author Gabriele Garuglieri * @version $Revision$ $Date$ * @since 5.5 */ public abstract class BaseRedirectorHelperTask extends Task { // - Properties /** Redirector helper */ protected Redirector redirector = new Redirector(this); //protected Redirector redirector = null; /** Redirector element for this task */ protected RedirectorElement redirectorElement = null; /** The stream for info output */ protected OutputStream redirectOutStream = null; /** The stream for error output */ protected OutputStream redirectErrStream = null; /** The print stream for info output */ PrintStream redirectOutPrintStream = null; /** The print stream for error output */ PrintStream redirectErrPrintStream = null; /** * Whether to fail (with a BuildException) if * ManagerServlet returns an error. The default behavior is * to do so. * b * This flag does not control parameters checking. If the task is called * with wrong or invalid parameters, it will throw BuildException * independently from the setting of this flag. */ protected boolean failOnError = true; /** * codetrue/code true when output redirection is requested for this task . * Default is to log on Ant log. */ protected boolean redirectOutput = false; /** * will be set to codetrue/code when the configuration of the Redirector is * complete. */ protected boolean redirectorConfigured = false; /** * Flag which indicates that, if redirected, output should also be * always sent to the log. Default is that otput is sent only to * redirected streams. */ protected boolean alwaysLog = false; /** * Whether to fail (with a BuildException) if * ManagerServlet returns an error. The default behavior is * to do so. */ public void setFailonerror(boolean fail) { failOnError = fail; } /** * Returns the value of the failOnError * property. */ public boolean isFailOnError() { return failOnError; } /** * File the output of the task is redirected to. * * @param out name of the output file */ public void setOutput(File out) { redirector.setOutput(out); redirectOutput = true; } /** * File the error output of the task is redirected to. * * @param error name of the error file * */ public void setError(File error) { redirector.setError(error); redirectOutput = true; } /** * Controls whether error output is logged. This is only useful * when output is being redirected and error output is desired in the * Ant log * * @param logError if true the standard error is sent to the Ant log
DO NOT REPLY [Bug 32800] - Add Redirector and failOnError support for Catalina Ant tasks
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=32800. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32800 --- Additional Comments From [EMAIL PROTECTED] 2004-12-23 13:45 --- Sorry, i think i made a bit of mess... I thougth i could edit the attachment in place. I made a couple of changes to the patch: 1- i moved the failOnError support from AbstractCatalinaTask to BaseRedirectorHelperTask because the ValidatorTask does not extend AbstractCatalinaTask. 2- depending on how the build targets dependency chains are laid out, a task may be called more than once. I know it doesn't make any sense to call a Catalina task more than once, but should it happen, i have added some checks so that it won't blow out with NPE like it was doing the first version. Some comments have been added on how calling more than once a redirected task may affect the output. Sorry again for the mistake, if you want that i resubmit the patch as an attchment please ask. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 32800] - Add Redirector and failOnError support for Catalina Ant tasks
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=32800. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32800 [EMAIL PROTECTED] changed: What|Removed |Added Attachment #13821|0 |1 is obsolete|| -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 32800] - Add Redirector and failOnError support for Catalina Ant tasks
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=32800. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32800 [EMAIL PROTECTED] changed: What|Removed |Added Attachment #13822|0 |1 is obsolete|| -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 32800] - Add Redirector and failOnError support for Catalina Ant tasks
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=32800. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32800 --- Additional Comments From [EMAIL PROTECTED] 2004-12-23 15:23 --- That would be better, as some EOLs seem to have been mangled. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 32800] - Add Redirector and failOnError support for Catalina Ant tasks
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=32800. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32800 --- Additional Comments From [EMAIL PROTECTED] 2004-12-23 15:51 --- Created an attachment (id=13837) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=13837action=view) Patch to existing tasks Updated patch. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 32800] - Add Redirector and failOnError support for Catalina Ant tasks
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=32800. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32800 --- Additional Comments From [EMAIL PROTECTED] 2004-12-23 15:55 --- Created an attachment (id=13838) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=13838action=view) Redirector helper Task Updated new Task. By the way, if you need anything i'll be at my workplace till tomorrow, then i'll leave for a couple of weeks of vacation. My best wishes for a Joieux Noel to you and family. Gabriele -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 32800] New: - Add Redirector and failOnError support for Catalina Ant tasks
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=32800. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32800 Summary: Add Redirector and failOnError support for Catalina Ant tasks Product: Tomcat 5 Version: 5.5.6 Platform: PC OS/Version: Windows XP Status: NEW Severity: enhancement Priority: P2 Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I'm submitting a patch to Catalina Ant task to add Redirector and failOnError support, so that Manager and JMX commands output can be captured in files or Ant properties to ease Ant task automation. The change is transparent to the casual user, because if the Redirector support is not configured nothing changes in the usual task behaviour. If the patch is accepted i'll update the tasks documentation accordingly. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 32800] - Add Redirector and failOnError support for Catalina Ant tasks
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=32800. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32800 --- Additional Comments From [EMAIL PROTECTED] 2004-12-22 16:16 --- Created an attachment (id=13821) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=13821action=view) Patch to existing tasks -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 32800] - Add Redirector and failOnError support for Catalina Ant tasks
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=32800. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32800 --- Additional Comments From [EMAIL PROTECTED] 2004-12-22 16:17 --- Created an attachment (id=13822) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=13822action=view) Redirector helper task -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 32800] - Add Redirector and failOnError support for Catalina Ant tasks
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=32800. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32800 --- Additional Comments From [EMAIL PROTECTED] 2004-12-22 17:41 --- I'll look into your patches (which look good) tomorrow. Thanks. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[PATCH] Added http proxy support to catalina ant tasks
? jakarta-tomcat-catalina/site.patch Index: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/AbstractC atalinaTask.java === RCS file: /home/cvspublic/jakarta-tomcat-catalina/catalina/src/share/org/apache/catali na/ant/AbstractCatalinaTask.java,v retrieving revision 1.2 diff -u -r1.2 AbstractCatalinaTask.java --- jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/AbstractC atalinaTask.java 6 Oct 2003 09:04:43 - 1.2 +++ jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/AbstractC atalinaTask.java 19 Feb 2004 15:44:54 - @@ -1,307 +1,354 @@ -/* - * $Header: /home/cvspublic/jakarta-tomcat-catalina/catalina/src/share/org/apache/catali na/ant/AbstractCatalinaTask.java,v 1.2 2003/10/06 09:04:43 remm Exp $ - * $Revision: 1.2 $ - * $Date: 2003/10/06 09:04:43 $ - * - * - * - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/). - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names The Jakarta Project, Tomcat, and Apache Software - * Foundation must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact [EMAIL PROTECTED] - * - * 5. Products derived from this software may not be called Apache - * nor may Apache appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * http://www.apache.org/. - * - */ - - -package org.apache.catalina.ant; - - -import java.io.BufferedOutputStream; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.net.URLConnection; -import org.apache.catalina.util.Base64; -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.Project; -import org.apache.tools.ant.Task; - - -/** - * Abstract base class for Ant tasks that interact with the - * emManager/em web application for dynamically deploying and - * undeploying applications. These tasks require Ant 1.4 or later. - * - * @author Craig R. McClanahan - * @version $Revision: 1.2 $ $Date: 2003/10/06 09:04:43 $ - * @since 4.1 - */ - -public abstract class AbstractCatalinaTask extends Task { - - - // - Instance Variables - - - /** - * manager webapp's encoding. - */ - private static String CHARSET = utf-8; - - - // - Properties - - - /** - * The login password for the codeManager/code application. - */ - protected String password = null; - - public String getPassword() { - return (this.password); - } - - public void setPassword(String password) { - this.password = password; - } - - - /** - * The URL of the codeManager/code application to be used. - */ - protected String url = http://localhost:8080/manager;; - - public String getUrl() { - return (this.url); - } - - public
Re: [PATCH] Added http proxy support to catalina ant tasks
Aaron wrote: ? jakarta-tomcat-catalina/site.patch Index: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/AbstractC atalinaTask.java I'm not thrilled about the feature, but the most problematic is that this is a bad patch. You might as well post the whole file ;) Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [PATCH] Added http proxy support to catalina ant tasks
Howdy, Also, please use the 2.0 license ;) (http://www.apache.org/licenses/). Yoav Shapira Millennium ChemInformatics -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: Thursday, February 19, 2004 11:05 AM To: Tomcat Developers List Subject: Re: [PATCH] Added http proxy support to catalina ant tasks Aaron wrote: ? jakarta-tomcat-catalina/site.patch Index: jakarta-tomcat- catalina/catalina/src/share/org/apache/catalina/ant/AbstractC atalinaTask.java I'm not thrilled about the feature, but the most problematic is that this is a bad patch. You might as well post the whole file ;) Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [PATCH] Added http proxy support to catalina ant tasks
Shapira, Yoav wrote: Howdy, Also, please use the 2.0 license ;) (http://www.apache.org/licenses/). That's ok, we still have 10 days to switch :) Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[PATCH] Added http proxy support to catalina ant tasks
Title: Message Made the modifications to the license. Index: AbstractCatalinaTask.java === RCS file: /home/cvspublic/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/AbstractCatalinaTask.java,v retrieving revision 1.2 diff -u -r1.2 AbstractCatalinaTask.java --- AbstractCatalinaTask.java 6 Oct 2003 09:04:43 - 1.2 +++ AbstractCatalinaTask.java 19 Feb 2004 18:24:13 - @@ -1,307 +1,315 @@ -/* - * $Header: /home/cvspublic/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/AbstractCatalinaTask.java,v 1.2 2003/10/06 09:04:43 remm Exp $ - * $Revision: 1.2 $ - * $Date: 2003/10/06 09:04:43 $ - * - * - * - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in - *the documentation and/or other materials provided with the - *distribution. - * - * 3. The end-user documentation included with the redistribution, if - *any, must include the following acknowlegement: - * This product includes software developed by the - *Apache Software Foundation (http://www.apache.org/). - *Alternately, this acknowlegement may appear in the software itself, - *if and wherever such third-party acknowlegements normally appear. - * - * 4. The names The Jakarta Project, Tomcat, and Apache Software - *Foundation must not be used to endorse or promote products derived - *from this software without prior written permission. For written - *permission, please contact [EMAIL PROTECTED] - * - * 5. Products derived from this software may not be called Apache - *nor may Apache appear in their names without prior written - *permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * http://www.apache.org/. - * - */ - - -package org.apache.catalina.ant; - - -import java.io.BufferedOutputStream; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.net.URLConnection; -import org.apache.catalina.util.Base64; -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.Project; -import org.apache.tools.ant.Task; - - -/** - * Abstract base class for Ant tasks that interact with the - * emManager/em web application for dynamically deploying and - * undeploying applications. These tasks require Ant 1.4 or later. - * - * @author Craig R. McClanahan - * @version $Revision: 1.2 $ $Date: 2003/10/06 09:04:43 $ - * @since 4.1 - */ - -public abstract class AbstractCatalinaTask extends Task { - - -// - Instance Variables - - -/** - * manager webapp's encoding. - */ -private static String CHARSET = utf-8; - - -// - Properties - - -/** - * The login password for the codeManager/code application. - */ -protected String password = null; - -public String getPassword() { -return (this.password); -} - -public void setPassword(String password) { -this.password = password; -} - - -/** - * The URL of the codeManager/code application to be used. - */ -protected String url = http://localhost:8080/manager;; - -public String getUrl() { -return (this.url); -} - -public void setUrl(String url) { -
Re: [PATCH] Added http proxy support to catalina ant tasks
Aaron Dykstra wrote: Made the modifications to the license. This is not the problem ;) Could you make it that the whole file isn't changed in your diff ? Just the actual lines changed. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 17070] - The Catalina Ant tasks do not allow for 'reusable' build scripts
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17070. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17070 The Catalina Ant tasks do not allow for 'reusable' build scripts --- Additional Comments From [EMAIL PROTECTED] 2003-03-06 10:15 --- Than why don't you attach a patch to this bugreport? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 17070] - The Catalina Ant tasks do not allow for 'reusable' build scripts
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17070. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17070 The Catalina Ant tasks do not allow for 'reusable' build scripts --- Additional Comments From [EMAIL PROTECTED] 2003-03-06 22:59 --- Created an attachment (id=5190) Added a 'ignoreFailure' flag to prevent Ant tasks stopping the build - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 17070] - The Catalina Ant tasks do not allow for 'reusable' build scripts
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17070. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17070 The Catalina Ant tasks do not allow for 'reusable' build scripts --- Additional Comments From [EMAIL PROTECTED] 2003-03-06 23:01 --- Wow - excuse my ignorance in not knowing I was meant/able to do this (I hope your comment wasn't meant harshly?). I have, as instructed, attached a new version of AbstractCatalinaTask that I have found to be useful in my own builds. There will, of course, still need some docs to be updated (if, indeed, you approve my change). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 17070] - The Catalina Ant tasks do not allow for 'reusable' build scripts
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17070. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17070 The Catalina Ant tasks do not allow for 'reusable' build scripts --- Additional Comments From [EMAIL PROTECTED] 2003-03-06 23:44 --- No, my comment wasn't meant harshly. Just a question. Little short maybe. But I don't have commit rights, so I can't do anything with it, but there are other ant developers out there who do these things and the chance is much bigger they do something with a bug report with a patch attached, than one without. :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 17070] - The Catalina Ant tasks do not allow for 'reusable' build scripts
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17070. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17070 The Catalina Ant tasks do not allow for 'reusable' build scripts --- Additional Comments From [EMAIL PROTECTED] 2003-03-06 02:52 --- No response from anybody? Just to encourage you, I've implemented this (very simple) change in my own build scripts and it really is very beneficial... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 17070] New: - The Catalina Ant tasks do not allow for 'reusable' build scripts
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17070. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17070 The Catalina Ant tasks do not allow for 'reusable' build scripts Summary: The Catalina Ant tasks do not allow for 'reusable' build scripts Product: Tomcat 4 Version: 4.1.8 Platform: All OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Dear Sir/Madam, The 'accepted' approach to building and installing WARs using the Catalina Ant tasks, after first starting Tomcat, is... taskdef name=install classname=org.apache.catalina.ant.InstallTask/ install url=${tomcat.manager} username=${tomcat.username} password=${tomcat.password} path=/${tomcat.app} war=file://${builddir}/myapp.war/ ...however this will FAIL on subsequent builds (without restarting Tomcat) with an 'application already installed' BuildException, so the subsequent 'accepted' approach is... taskdef name=install classname=org.apache.catalina.ant.RemoveTask/ taskdef name=install classname=org.apache.catalina.ant.InstallTask/ remove url=${tomcat.manager} username=${tomcat.username} password=${tomcat.password} path=/${tomcat.app}/ install url=${tomcat.manager} username=${tomcat.username} password=${tomcat.password} path=/${tomcat.app} war=file://${builddir}/myapp.war/ It should be noted that, equally, this latter approach will FAIL the first time in (with a 'no application to remove' BuildException). Having to toggle between these two approaches every 'development session' (the former the first time in, the latter all subsequent times before restarting Tomcat) is very unproductive. None of the 'accepted' docs seem to address this problem, so either I am being an idiot (very possible :) or we could really do with a, say, 'ignoreFailure' parameter in AbstractCatalinaTask (that simply catches the Exception, logs it, but does not stop the build for it). That way we could use the latter build script every time, making things much easier for us all :) Many thanks for your time, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 17070] - The Catalina Ant tasks do not allow for 'reusable' build scripts
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17070. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17070 The Catalina Ant tasks do not allow for 'reusable' build scripts --- Additional Comments From [EMAIL PROTECTED] 2003-02-14 04:35 --- (sorry - I messed up my 'taskdefs' in the second Ant script, but it doesn't change the problem) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Catalina Ant tasks
Hi, Am I missing something or do we not have Ant tasks for the functionality available through the /admin application? I have an itch, so if not I will be willing to contribute some code. -- Ryan Hoegg ISIS Networks http://www.isisnetworks.net -- To unsubscribe, e-mail: mailto:tomcat-dev-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org