开发者

Deploy current project AND another WAR using Cargo

I'm using Cargo for Integration tests with Maven. I found examples of deploying another war from .m2 repo in pre-integra开发者_如何转开发tion here . Can somebody guide me on how to deploy current project and another war using Cargo?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜