Uploaded image for project: 'Codehaus Cargo'
  1. CARGO-1074

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

    Details

    • Type: Bug
    • Status: Closed (View workflow)
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.1.4
    • Fix Version/s: 1.2.1
    • Component/s: Core
    • Labels:
      None
    • Environment:

      Windows 64 bit, Java 6.x 64 bit

      Description

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

      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.

      [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
      
      <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>
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebastientardif Sebastien Tardif (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: