[M2 cargo plugin] org.codehaus.cargo.container.ContainerException: Failed to deploy

View: New views
1 Messages — Rating Filter:   Alert me  

[M2 cargo plugin] org.codehaus.cargo.container.ContainerException: Failed to deploy

by Mathieu Hicauber-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

I try to deploy my webapp to a remote tomcat 5x using maven cargo plugin.
The stacktrace I get is pasted att the bottom of the message, under my pom file.
Basically, the error I get seems to be coming from the tomcat manager itself, not cargo. It looks like cargo is telling tomcat to deploy in the root path ('/'). Indeed, I managed to get the webapp deployed in the root directory of tomcat webapps once. Well anyway, I don't want it in the root context, but in the xxxxxxx context.
Looks like the porperty 'context' of my pom file isn't transfered to tomcat. Is there anything wrong in my pom ?

Thank you,

Mathieu.


============= POM file ====================
            <plugin>
                <groupId>org.codehaus.cargo</
groupId>
                <artifactId>cargo-maven2-plugin</artifactId>
                <version>1.0</version>
                <configuration>
                    <wait>false</wait>
                    <container>
                        <containerId>tomcat5x</containerId>
                        <type>remote</type>
                        <append>true</append>
                    </container>
                    <configuration>
                        <type>runtime</type>
                        <properties>
                            <cargo.hostname>192.168.10.249</cargo.hostname>
                            <cargo.remote.username>XXXX</cargo.remote.username>
                            <cargo.remote.password>XXXX</cargo.remote.password>
                            <cargo.logging>high</cargo.logging>
                            <cargo.servlet.port>9090</cargo.servlet.port>
                            <cargo.tomcat.manager.url>http://192.168.10.249:9090/manager</cargo.tomcat.manager.url>
                        </properties>
                    </configuration>
                    <deployer>
                        <deployables>
                            <deployable>
                                <groupId>${project.groupId}</groupId>
                                <artifactId>xxxxxxx</artifactId>
                                <type>war</type>
                                <pingURL>http://192.168.10.249:9090/xxxxxxx</pingURL>
                                <pingTimeout>300000</pingTimeout>
                                <properties>
                                    <context>xxxxxxx</context>
                                </properties>
                            </deployable>
                        </deployables>
                    </deployer>
                </configuration>
                <executions>
                    <execution>
                        <id>deploy</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>redeploy</goal>
                        </goals>
                        <configuration>
                            <deployer>
                                <deployables>
                                    <deployable>
                                        <groupId>${project.groupId}</groupId>
                                        <artifactId>xxxxxxx</artifactId>
                                        <type>war</type>
                                        <pingURL>http://192.168.10.249:9090/xxxxxxx</pingURL>
                                        <pingTimeout>300000</pingTimeout>
                                        <properties>
                                            <context>xxxxxxx</context>
                                        </properties>
                                    </deployable>
                                </deployables>
                            </deployer>
                        </configuration>
                    </execution>
                    <execution>
                        <id>undeploy</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>undeploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>










============= Maven trace =================
mhicauber@cdsi-wps:~/java/workspaces/workspace/cofParent/tests_fonctionnels$ mvn clean integration-test
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building testsSelenium
[INFO]    task-segment: [clean, integration-test]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /home/mhicauber/java/workspaces/workspace/cofParent/tests_fonctionnels/target
[INFO] [compiler:testCompile {execution: default}]
[INFO] Compiling 2 source files to /home/mhicauber/java/workspaces/workspace/cofParent/tests_fonctionnels/target/test-classes
[INFO] [site:attach-descriptor]
[INFO] [cargo:redeploy {execution: deploy}]
[INFO] [mcat5xRemoteDeployer] Redeploying [/home/mhicauber/java/apache-maven-2.1.0/repository/com/sqli/xxxxxxx/xxxxxxx/1.0.1-SNAPSHOT/xxxxxxx-1.0.1-SNAPSHOT.war]
[INFO] [mcat5xRemoteDeployer] Undeploying [/home/mhicauber/java/apache-maven-2.1.0/repository/com/sqli/xxxxxxx/xxxxxxx/1.0.1-SNAPSHOT/xxxxxxx-1.0.1-SNAPSHOT.war]
[INFO] [mcat5xRemoteDeployer] Deploying [/home/mhicauber/java/apache-maven-2.1.0/repository/com/sqli/xxxxxxx/xxxxxxx/1.0.1-SNAPSHOT/xxxxxxx-1.0.1-SNAPSHOT.war]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to deploy [/home/mhicauber/java/apache-maven-2.1.0/repository/com/sqli/xxxxxxx/xxxxxxx/1.0.1-SNAPSHOT/xxxxxxx-1.0.1-SNAPSHOT.war]
ECHEC - l'application existe déjà dans le chemin /

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.codehaus.cargo.container.ContainerException: Failed to deploy [/home/mhicauber/java/apache-maven-2.1.0/repository/com/sqli/xxxxxxx/xxxxxxx/1.0.1-SNAPSHOT/xxxxxxx-1.0.1-SNAPSHOT.war]
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:105)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:179)
    at org.codehaus.cargo.maven2.DeployerRedeployMojo.performDeployerActionOnSingleDeployable(DeployerRedeployMojo.java:39)
    at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables(AbstractDeployerMojo.java:104)
    at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDeployerMojo.java:47)
    at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:255)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
    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.codehaus.cargo.container.tomcat.internal.TomcatManagerException: ECHEC - l'application existe déjà dans le chemin /

    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:525)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deployImpl(TomcatManager.java:565)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:273)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:256)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:240)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:101)
    ... 23 more
org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: ECHEC - l'application existe déjà dans le chemin /

    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:525)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deployImpl(TomcatManager.java:565)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:273)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:256)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:240)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:101)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.ja