2

I'm using Cargo for Integration tests with Maven. I found examples of deploying another war from .m2 repo in pre-integration here . Can somebody guide me on how to deploy current project and another war using Cargo?

Sathish
  • 20,660
  • 24
  • 63
  • 71

1 Answers1

0

Check out the deployables tag for Cargo Plugin's configuration.

This configuration should deploy your current project and the AnotherWAR project.

 <profiles>
      <profile>
          <id>integration-test</id>
          <dependencies>
              <dependency>
                  <groupId>com.me</groupId>
                  <artifactId>AnotherWAR</artifactId>
                  <version>1.2</version>
                  <type>war</type>
              </dependency>
          </dependencies>
          <build>
              <plugins>
                  <plugin>
                    <groupId>org.codehaus.cargo</groupId>
                    <artifactId>cargo-maven2-plugin</artifactId>
                    <version>1.2.4</version>
                    <configuration>
                        <deployables>
                            <deployable>
                                <groupId>com.me</groupId>
                                <artifactId>AnotherWAR</artifactId>
                            </deployable>
                        </deployables>
                    </configuration>
                </plugin>
              </plugins>
          </build>
      </profile>
  </profiles>

Then just call cargo:deploy with the 'integration-test' profile active

rpgFANATIC
  • 190
  • 3
  • 9