Ponowne rozmieszczenie zdalnych ryb szklistych z ładunkiem nie powiedzie się

Obecnie próbuję użyć ładunku do wdrożenia aplikacji na zdalnym szklance 3.1.2 przez bambus atlassian. Jest to środowisko programistyczne, więc ta sama aplikacja z innym numerem wersji będzie za każdym razem wdrażana w tym samym kontekście root.

Ale za każdym razem wykonuję zadanie z celem Maven:

org.codehaus.cargo:cargo-maven2-plugin:redeploy

Ciągle otrzymuję błąd:

11-Jun-2013 15:13:48    Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.2:redeploy failed: Deployment has failed: Action failed Deploying application to target server failed; Error occurred during deployment: Application with name myapp-1.4.8 is already registered. Either specify that redeployment must be forced, or redeploy the application. Or if this is a new deployment, pick a different name. Please see server.log for more details.
11-Jun-2013 15:13:48    
11-Jun-2013 15:13:48            at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
11-Jun-2013 15:13:48            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
11-Jun-2013 15:13:48            ... 19 more
11-Jun-2013 15:13:48    Caused by: org.codehaus.cargo.util.CargoException: Deployment has failed: Action failed Deploying application to target server failed; Error occurred during deployment: Application with name myapp-1.4.8 is already registered. Either specify that redeployment must be forced, or redeploy the application. Or if this is a new deployment, pick a different name. Please see server.log for more details.
11-Jun-2013 15:13:48    
11-Jun-2013 15:13:48            at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.waitForProgressObject(AbstractJsr88Deployer.java:285)
11-Jun-2013 15:13:48            at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.deploy(AbstractJsr88Deployer.java:123)
11-Jun-2013 15:13:48            at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:207)
11-Jun-2013 15:13:48            at org.codehaus.cargo.maven2.DeployerRedeployMojo.performDeployerActionOnSingleDeployable(DeployerRedeployMojo.java:50)
11-Jun-2013 15:13:48            at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables(AbstractDeployerMojo.java:180)
11-Jun-2013 15:13:48            at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDeployerMojo.java:97)
11-Jun-2013 15:13:48            at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:432)
11-Jun-2013 15:13:48            at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
11-Jun-2013 15:13:48            ... 20 more
11-Jun-2013 15:13:48    [ERROR] 
11-Jun-2013 15:13:48    [ERROR] 
11-Jun-2013 15:13:48    [ERROR] For more information about the errors and possible solutions, please read the following articles:
11-Jun-2013 15:13:48    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
11-Jun-2013 15:13:48    [ERROR] 
11-Jun-2013 15:13:48    [ERROR] After correcting the problems, you can resume the build with the command

Potrzebuję wtyczki cargo, aby wymusić ponowne wdrożenie bez względu na to, że aplikacja (starsza wersja) już istnieje dla tego kontekstowego katalogu głównego.

Gdybym uruchamiał ręcznie polecenie asadmin, mógłbym łatwo dodać parametr --force i zadziałałoby.

Mam dodatkowe ograniczenie, nie mogę zainstalować lokalnej wersji glassfish na serwerze, na którym znajduje się instancja bambusa, więc nie mogę używać rzeczy takich jak wtyczka maven sh do ręcznego budowania polecenia asadmin.

Poniżej znajduje się odpowiedni fragment pom.xml:

<build>
        <finalName>myapp-${project.version}</finalName>
        <plugins>
            <plugin>
                <groupId>org.codehaus.cargo</groupId>
                <artifactId>cargo-maven2-plugin</artifactId>
                <version>1.4.2</version>
                <configuration>
                    <container>
                        <containerId>glassfish3x</containerId>
                        <type>remote</type>
                    </container>
                    <configuration>
                        <type>runtime</type>
                        <properties>
                            <cargo.remote.username>${cargo.remote.username}</cargo.remote.username>
                            <cargo.remote.password>${cargo.remote.password}</cargo.remote.password>
                            <cargo.glassfish.admin.port>${cargo.glassfish.admin.port}</cargo.glassfish.admin.port>
                            <cargo.hostname>${cargo.hostname}</cargo.hostname>
                        </properties>
                    </configuration>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.glassfish.deployment</groupId>
                        <artifactId>deployment-client</artifactId>
                        <version>3.1.1</version>

                    </dependency>
                </dependencies>
            </plugin>

Jakieś pomysły?

questionAnswers(4)

yourAnswerToTheQuestion