2013/9/2 <[email protected]>: > Author: olamy > Date: Mon Sep 2 06:11:10 2013 > New Revision: 1519353 > > URL: http://svn.apache.org/r1519353 > Log: > display the reason phrase too > > Modified: > > tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/resources/org/apache/tomcat/maven/common/messages/messages.properties > > tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractI18NTomcat6Mojo.java > > tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.java > > Modified: > tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/resources/org/apache/tomcat/maven/common/messages/messages.properties > URL: > http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/resources/org/apache/tomcat/maven/common/messages/messages.properties?rev=1519353&r1=1519352&r2=1519353&view=diff > ============================================================================== > --- > tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/resources/org/apache/tomcat/maven/common/messages/messages.properties > (original) > +++ > tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/resources/org/apache/tomcat/maven/common/messages/messages.properties > Mon Sep 2 06:11:10 2013 > @@ -112,4 +112,4 @@ AbstractI18NTomcat6Mojo.tomcatHttStatusE > > #AbstractTomcat7Mojo > > -AbstractTomcat7Mojo.tomcatHttStatusError = Tomcat return http status error: > {0} > +AbstractTomcat7Mojo.tomcatHttStatusError = Tomcat return http status error: > {0}, Reason Phrase: {1}
1. Typo in message key: s/ Htt / Http / ? 2. The file below references "AbstractI18NTomcat6Mojo.tomcatHttStatusError", but the message above is "Tomcat7" one. Haven't you forgotten to change "Tomcat6" message as well? Best regards, Konstantin Kolinko > > Modified: > tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractI18NTomcat6Mojo.java > URL: > http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractI18NTomcat6Mojo.java?rev=1519353&r1=1519352&r2=1519353&view=diff > ============================================================================== > --- > tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractI18NTomcat6Mojo.java > (original) > +++ > tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractI18NTomcat6Mojo.java > Mon Sep 2 06:11:10 2013 > @@ -68,10 +68,12 @@ public abstract class AbstractI18NTomcat > > if ( statusCode >= 400 ) > { > - getLog().error( messagesProvider.getMessage( > "AbstractI18NTomcat6Mojo.tomcatHttStatusError", statusCode ) ); > + getLog().error( messagesProvider.getMessage( > "AbstractI18NTomcat6Mojo.tomcatHttStatusError", statusCode, > + > tomcatResponse.getReasonPhrase() ) ); > > throw new MojoExecutionException( > - messagesProvider.getMessage( > "AbstractI18NTomcat6Mojo.tomcatHttStatusError", statusCode ) + ": " > + messagesProvider.getMessage( > "AbstractI18NTomcat6Mojo.tomcatHttStatusError", statusCode, > + > tomcatResponse.getReasonPhrase() ) + ": " > + tomcatResponse.getHttpResponseBody() ); > } > } > > Modified: > tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.java > URL: > http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.java?rev=1519353&r1=1519352&r2=1519353&view=diff > ============================================================================== > --- > tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.java > (original) > +++ > tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.java > Mon Sep 2 06:11:10 2013 > @@ -43,7 +43,7 @@ public abstract class AbstractTomcat7Moj > * The webapp context path to use for the web application being run. > This must always start with a forward-slash > * ('/'). > */ > - @Parameter( defaultValue = "/${project.artifactId}", property = > "maven.tomcat.path", required = true ) > + @Parameter(defaultValue = "/${project.artifactId}", property = > "maven.tomcat.path", required = true) > protected String path; > > > @@ -56,7 +56,8 @@ public abstract class AbstractTomcat7Moj > * Check response of Tomcat to know if ok or not. > * > * @param tomcatResponse response of tomcat return by TomcatManager class > - * @throws org.apache.maven.plugin.MojoExecutionException if HTTP status > code greater than 400 (included) > + * @throws org.apache.maven.plugin.MojoExecutionException > + * if HTTP status code greater than 400 (included) > */ > protected void checkTomcatResponse( TomcatManagerResponse tomcatResponse > ) > throws MojoExecutionException > @@ -65,10 +66,12 @@ public abstract class AbstractTomcat7Moj > > if ( statusCode >= 400 ) > { > - getLog().error( messagesProvider.getMessage( > "AbstractTomcat7Mojo.tomcatHttStatusError", statusCode ) ); > + getLog().error( messagesProvider.getMessage( > "AbstractTomcat7Mojo.tomcatHttStatusError", statusCode, > + > tomcatResponse.getReasonPhrase() ) ); > > throw new MojoExecutionException( > - messagesProvider.getMessage( > "AbstractTomcat7Mojo.tomcatHttStatusError", statusCode ) + ": " > + messagesProvider.getMessage( > "AbstractTomcat7Mojo.tomcatHttStatusError", statusCode, > + > tomcatResponse.getReasonPhrase() ) + ": " > + tomcatResponse.getHttpResponseBody() ); > } > } > > > > --------------------------------------------------------------------- > 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]
