[opencms-dev] maven-plugin deploy to remote server

Rodriguez, Adrian A.Rodriguez at comundus.com
Mon Apr 26 12:41:52 CEST 2010


Hello  Marc,

 

tomcat:exploded copies the directory target/webapp from the webapp project into the tomcat/webapps directory. This cannot be done into a remote machine.

On the other hand, tomcat:deploy uploads and installs the file target/webapp.war, but this file does not have all the resources required.

What can be done is the following procedure from the parent project:

mvn  clean

mvn package

mvn war:war

mvn tomcat:deploy

 

This should work. Calling mvn war:war zips the contents of target/webapp into target/webapp.war

 

Greetings

 _________________________________________ 

   

Adrián Rodríguez

Junior IT-Berater

    

comundus GmbH

Schüttelgrabenring 3, D-71332 Waiblingen

Telefon +49 7151-50028-20

E-Mail a.rodriguez at comundus.com

Internet www.comundus.com

 

Geschäftsführer Klaus Hillemeier  

Amtsgericht Stuttgart, HRB 264290

         

comundus ist ein Unternehmen der IT EXCELLENCE Group

_________________________________________

 

 

 

 

Die Kundenzufriedenheit bei comundus wieder verbessert -
Durchschnittsnote jetzt 1,7.

 

 

 

From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Marc Johnen
Sent: Wednesday, April 21, 2010 4:09 PM
To: opencms-dev at opencms.org
Subject: [opencms-dev] maven-plugin deploy to remote server

 

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 ********************** org.codehaus.mojo tomcat-maven-plugin http://192.168.134.253:8080/manager /opencms-basic ********************************************* 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 

________________________________

View this message in context: maven-plugin deploy to remote server <http://old.nabble.com/maven-plugin-deploy-to-remote-server-tp28288035p28288035.html> 
Sent from the OpenCMS - Dev mailing list archive <http://old.nabble.com/OpenCMS---Dev-f654.html>  at Nabble.com.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20100426/07a03424/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 1701 bytes
Desc: image001.jpg
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20100426/07a03424/attachment.jpg>


More information about the opencms-dev mailing list