tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1212877 - in /tomcat/maven-plugin/trunk: common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/ tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/ tomcat7-maven-plugin/src/main/java/org/ap...
Date Sat, 10 Dec 2011 21:07:36 GMT
Author: olamy
Date: Sat Dec 10 21:07:36 2011
New Revision: 1212877

URL: http://svn.apache.org/viewvc?rev=1212877&view=rev
Log:
log http status code and reason phrase returned after a deployment

Modified:
    tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java
    tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.java
    tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/deploy/AbstractDeployWarMojo.java

Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java?rev=1212877&r1=1212876&r2=1212877&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java
(original)
+++ tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java
Sat Dec 10 21:07:36 2011
@@ -38,6 +38,7 @@ import org.apache.http.impl.client.Basic
 import org.apache.http.impl.client.DefaultHttpClient;
 import org.apache.http.impl.conn.BasicClientConnectionManager;
 import org.apache.http.protocol.BasicHttpContext;
+import org.apache.maven.plugin.logging.Log;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -96,8 +97,14 @@ public class TomcatManager
      */
     private String userAgent;
 
+    /**
+     * @since 2.0
+     */
     private DefaultHttpClient httpClient;
 
+    /**
+     * @since 2.0
+     */
     private BasicHttpContext localContext;
 
     // ----------------------------------------------------------------------
@@ -896,11 +903,10 @@ public class TomcatManager
             }
         }
 
-        protected long toKB( long bytes )
+        private long toKB( long bytes )
         {
             return ( bytes + 1023 ) / 1024;
         }
 
-
     }
 }

Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.java?rev=1212877&r1=1212876&r2=1212877&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.java
(original)
+++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.java
Sat Dec 10 21:07:36 2011
@@ -225,7 +225,6 @@ public abstract class AbstractCatalinaMo
             {
                 userName = this.username;
                 password = this.password == null ? "" : this.password;
-                //getLog( ).debug( "user user/password " + userName + "/" + password );
             }
 
             manager = new TomcatManager( url, userName, password, charset );

Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/deploy/AbstractDeployWarMojo.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/deploy/AbstractDeployWarMojo.java?rev=1212877&r1=1212876&r2=1212877&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/deploy/AbstractDeployWarMojo.java
(original)
+++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/deploy/AbstractDeployWarMojo.java
Sat Dec 10 21:07:36 2011
@@ -21,6 +21,7 @@ package org.apache.tomcat.maven.plugin.t
 
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.tomcat.maven.common.deployer.TomcatManagerException;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerResponse;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -84,7 +85,12 @@ public class AbstractDeployWarMojo
 
         getLog().info( messagesProvider.getMessage( "AbstractDeployMojo.deployingWar", getDeployedURL()
) );
 
-        log( getManager().deploy( getPath(), new FileInputStream( warFile ), isUpdate(),
getTag(),
-                                  warFile.length() ).getHttpResponseBody() );
+        TomcatManagerResponse tomcatManagerResponse =
+            getManager().deploy( getPath(), new FileInputStream( warFile ), isUpdate(), getTag(),
warFile.length() );
+
+        getLog().info( "tomcatManager status code:" + tomcatManagerResponse.getStatusCode()
+ ", ReasonPhrase:"
+                           + tomcatManagerResponse.getReasonPhrase() );
+
+        log( tomcatManagerResponse.getHttpResponseBody() );
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message