We're updating the issue view to help you get more done. 

Bug fix CARGO-27 is incompatible with Maven, since we are expected to call goal redeploy followed by start

Description

I get an error if execute goal redeploy followed by start due to an unrealistic constraint implemented in bug CARGO-27.

Naturally, after "redeploy" the folder is not empty anymore, so start is failing. Any constraint added to the framework should have a flag to disable it.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 [ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.1.4:start (start-container) on project solr: Execution start-container of goal org.codehaus.cargo:cargo-maven2-plugin:1.1.4:start failed: Failed to create a Tomcat 7.x standalone configuration: Invalid configuration dir [C:\repos\git\ops\solr\target/tomcat7x]. When using standalone configurations, the configuration dir must point to an empty directory. Note that everything in that dir will get deleted by Cargo. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.1.4:start (start-container) on project solr: Execution start-container of goal org.codehaus.cargo:cargo-maven2-plugin:1.1.4:start failed: Failed to create a Tomcat 7.x standalone configuration at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) 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.PluginExecutionException: Execution start-container of goal org.codehaus.cargo:cargo-maven2-plugin:1.1.4:start failed: Failed to create a Tomcat 7.x standalone configuration at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 <plugin> <!-- [mvn install cargo:deploy] see http://cargo.codehaus.org/Deploying+to+a+running+container --> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.1.4</version> <configuration> <container> <containerId>tomcat7x</containerId> <home>C:/Program Files/Apache Software Foundation/Tomcat 7.0_Tomcat7FunctionalTest</home> <timeout>240000</timeout> </container> <configuration> <!-- Configuration to use with the container --> <home>${project.build.directory}/tomcat7x</home> <type>standalone</type> <properties> <cargo.servlet.port>${web.server.port}</cargo.servlet.port> <cargo.rmi.port>85</cargo.rmi.port> <cargo.tomcat.ajp.port>89</cargo.tomcat.ajp.port> <cargo.jvmargs>-XX:PermSize=512m -XX:MaxPermSize=512m -Xmx2048m -Xms1024m</cargo.jvmargs> <cargo.tomcat.copywars>true</cargo.tomcat.copywars> </properties> </configuration> <deployer> <deployables> <deployable> <groupId>com.onassignment.ops</groupId> <artifactId>ops</artifactId> <type>war</type> <properties> <context>/</context> </properties> </deployable> </deployables> </deployer> </configuration> <executions> <execution> <id>start-container</id> <phase>pre-integration-test</phase> <goals> <goal>redeploy</goal> <goal>start</goal> </goals> </execution> <execution> <id>stop-container</id> <phase>post-integration-test</phase> <goals> <goal>stop</goal> </goals> </execution> <execution> <id>stop-container-before-cleaning</id> <phase>package</phase> <goals> <goal>stop</goal> </goals> </execution> </executions> </plugin>

Status

Assignee

Unassigned

Reporter

Sebastien Tardif

Components

Fix versions

Affects versions

1.1.4

Priority

Major