[opencms-dev] maven-plugin deploy to remote server
Marc Johnen
opencms at johnen.biz
Wed Apr 21 19:04:59 CEST 2010
Hello everyone,
we are developing a site in a team using a server in the local net.
I would like to use the maven-plugin for that.
I managed to successfully run "mvn clean" and "mvn package",
but am stuck with "mvn tomcat:exploded".
The tomcat-user is configured correctly as I can access it via
web and also the command "mvn tomcat:info" executes without error.
When executing "mvn -e tomcat:exploded", I get an error-message
(see Error-Message 1). When I first create the corresponding directory
"opencms-basic" in the webapps-folder, I get a different error-message
(see Error-Message 2).
Below you can also find the configuration of the tomcat-plugin.
Has anyone successfully run a similar configuration.
Thankful for any hints.
Greetings
Marc Johnen
**********************
Configuration
**********************
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<url>http://192.168.134.253:8080/manager</url>
<path>/opencms-basic</path>
</configuration>
</plugin>
*********************************************
Error-Message 1
*********************************************
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] OpenCms Parent
[INFO] OpenCms Webapp
[INFO] OpenCms System
[INFO] OpenCms Content
[INFO] OpenCms Orgunits
[INFO]
------------------------------------------------------------------------
[INFO] Building OpenCms Parent
[INFO] task-segment: [tomcat:exploded]
[INFO]
------------------------------------------------------------------------
[INFO] [tomcat:exploded {execution: default-cli}]
[INFO] Skipping non-war project
[INFO]
------------------------------------------------------------------------
[INFO] Building OpenCms Webapp
[INFO] task-segment: [tomcat:exploded]
[INFO]
------------------------------------------------------------------------
[INFO] [tomcat:exploded {execution: default-cli}]
[INFO] Deploying war to http://192.168.134.253:8080/opencms-basic
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Cannot invoke Tomcat manager: FAIL - Failed to deploy application
at context path /opencms-basic
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Cannot invoke
Tomcat manager: FAIL - Failed to deploy application at context path
/opencms-basic
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot invoke
Tomcat manager: FAIL - Failed to deploy application at context path
/opencms-basic
at
org.codehaus.mojo.tomcat.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:145)
at
org.codehaus.mojo.tomcat.AbstractWarCatalinaMojo.execute(AbstractWarCatalinaMojo.java:63)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Wed Apr 21 16:04:50 CEST 2010
[INFO] Final Memory: 13M/171M
[INFO]
------------------------------------------------------------------------
*********************************************
Error-Message 2
*********************************************
[INFO] Cannot invoke Tomcat manager: FAIL - Application already exists at
path /opencms-basic
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Cannot invoke
Tomcat manager: FAIL - Application already exists at path /opencms-basic
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot invoke
Tomcat manager: FAIL - Application already exists at path /opencms-basic
at
org.codehaus.mojo.tomcat.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:145)
at
org.codehaus.mojo.tomcat.AbstractWarCatalinaMojo.execute(AbstractWarCatalinaMojo.java:63)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
More information about the opencms-dev
mailing list