我在maven货物上找到了这个设置:
<plugin>
<inherited>false</inherited>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven3-plugin</artifactId>
<configuration>
<container>
<containerId>wildfly10x</containerId>
<zipUrlInstaller>
<url>http://download.jboss.org/wildfly/10.1.0.Final/wildfly-10.1.0.Final.zip</url>
<downloadDir>${project.basedir}/.cargo/downloads</downloadDir>
<extractDir>${project.basedir}
/.cargo/extracts</extractDir>
</zipUrlInstaller>
</container>
</configuration>
<executions>
<execution>
<id>install-cargo</id>
<phase>process-test-resources</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
但这似乎不起作用。
任何人都可以为我提供正确的配置。
另外我想添加一个用户。怎么做?
答案 0 :(得分:0)
这对我有用:
<profiles>
<!-- mvn clean package cargo:run -->
<profile>
<id>wildfly-standalone</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>${cargo-maven2-plugin.version}</version>
<configuration>
<container>
<containerId>wildfly10x</containerId>
<zipUrlInstaller>
<url>http://download.jboss.org/wildfly/10.1.0.Final/wildfly-10.1.0.Final.zip</url>
</zipUrlInstaller>
</container>
<configuration>
<properties>
<cargo.hostname>127.0.0.1</cargo.hostname>
<cargo.jboss.management-http.port>9990</cargo.jboss.management-http.port>
<cargo.servlet.users>testUser:admin1234!</cargo.servlet.users>
</properties>
</configuration>
</configuration>
</plugin>
</plugins>
</build>
</profile>
要下载并安装运行以下命令所需的设置:
mvn clean package cargo:run