Details
Description
I have been using the codhaus version of the tomcat-maven-plugin and am trying to switch to the latest Apache Tomcat Maven Plugin.
Deploy works with the codhaus version using 'mvn tomcat:redeploy -Pdev02`. The username/password are normally in my profile settings.
Deploy fails with apache version using: 'mvn tomcat6:redeploy -Pdev02'. I've specified a <server/> entry in the settings.xml, and specified the same value in the <server /> section of the the plugin <configuration /> to avoid "[DEBUG] No server specified for authentication - using defaults" errors.
Below is my maven profile. I've tried changing the URL when running the tomcat6:deploy/redeploy targets with and without a trailing '/text'. I get a 404 with the '/text' and "Cannot invoke Tomcat manager" if I ommit the '/text'.
Although, without the '/text' in the URL, it appears to upload the war as it shows a progress indicator then fails with the error below:
<!-***************PROFILE****************->
<profile>
<id>dev02</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat6-maven-plugin</artifactId>
<version>2.0-beta-1</version>
<configuration>
<mode>war</mode>
<url>http://10.12.4.2/manager</url>
<failOnError>true</failOnError>
<charset>UTF-8</charset>
<uriEncoding>UTF-8</uriEncoding>
<protocol>HTTP/1.1</protocol>
<update>true</update>
<server>dev02</server>
</configuration>
</plugin>
</plugins>
</build>
</profile>
//----------------------------- MAVEN OUTPUT ----------------------------
[DEBUG] Configuring mojo org.apache.tomcat.maven:tomcat6-maven-plugin:2.0-beta-1:redeploy from plugin realm ClassRealm[plugin>org.apache.tomcat.maven:tomcat6-maven-plugin:2.0-beta-1, parent: sun.misc.Launcher$AppClassLoader@3326b249]
[DEBUG] Configuring mojo 'org.apache.tomcat.maven:tomcat6-maven-plugin:2.0-beta-1:redeploy' with basic configurator -->
[DEBUG] (f) charset = UTF-8
[DEBUG] (f) contextFile = C:\Users\jvincent\Dev\Java\Domain\target\Domain-2012.04.04-SNAPSHOT\META-INF\context.xml
[DEBUG] (f) ignorePackaging = false
[DEBUG] (f) mode = war
[DEBUG] (f) packaging = war
[DEBUG] (f) path = /Domain
[DEBUG] (f) server = dev02
[DEBUG] (f) update = true
[DEBUG] (f) url = http://10.12.4.2/manager
[DEBUG] (f) version = 2.0-beta-1
[DEBUG] (f) warFile = C:\Users\jvincent\Dev\Java\Domain\target\Domain-2012.04.04-SNAPSHOT.war
[DEBUG] – end configuration –
[INFO] Deploying war to http://10.12.4.2/Domain
Uploading: http://10.12.4.2/manager/deploy?path=%2FDomain&update=true
[Progress Indicator......]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.490s
[INFO] Finished at: Tue Apr 17 17:51:59 MDT 2012
[INFO] Final Memory: 8M/244M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat6-maven-plugin:2.0-beta-1:redeploy (default-cli) on project Domain: Cannot invoke Tomcat manager: ClientProtocolException: Cannot retry request with a non-repeatable request entity. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.tomcat.maven:tomcat6-maven-plugin:2.0-beta-1:redeploy (default-cli) on project Domain: Cannot invoke Tomcat manager
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot invoke Tomcat manager
at org.apache.tomcat.maven.plugin.tomcat6.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:152)
at org.apache.tomcat.maven.plugin.tomcat6.AbstractWarCatalinaMojo.execute(AbstractWarCatalinaMojo.java:71)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.http.client.ClientProtocolException
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:926)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822)
at org.apache.tomcat.maven.common.deployer.TomcatManager.invoke(TomcatManager.java:718)
at org.apache.tomcat.maven.common.deployer.TomcatManager.deployImpl(TomcatManager.java:681)
at org.apache.tomcat.maven.common.deployer.TomcatManager.deploy(TomcatManager.java:363)
at org.apache.tomcat.maven.plugin.tomcat6.AbstractDeployWarMojo.deployWar(AbstractDeployWarMojo.java:87)
at org.apache.tomcat.maven.plugin.tomcat6.AbstractDeployMojo.invokeManager(AbstractDeployMojo.java:86)
at org.apache.tomcat.maven.plugin.tomcat6.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:143)
... 22 more
Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity.
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:686)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:515)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:923)
... 29 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Attachments
Issue Links
- is duplicated by
-
MTOMCAT-149 Error deploying on Tomcat 6
- Closed