Maven 2 如何使用cargo-maven2-plugin部署到JBossAS5?
我正在尝试cargo-maven2-plugin,但我没有在jboss5x中部署pom.xmlMaven 2 如何使用cargo-maven2-plugin部署到JBossAS5?,maven-2,jboss,jakarta-ee,cargo,maven-cargo,Maven 2,Jboss,Jakarta Ee,Cargo,Maven Cargo,我正在尝试cargo-maven2-plugin,但我没有在jboss5x中部署pom.xml <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.0.2</version>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0.2</version>
<configuration>
<container>
<containerId>jboss51x</containerId>
<home>E:\JavaWorkingTools\JBoss\jboss-5.1.0.GA</home>
<log>${basedir}/target/jboss5.1.x.logs/cargo.log</log>
<timeout>300000</timeout> <!-- 5 minutes -->
<systemProperties>
<jboss.server.log.threshold>INFO</jboss.server.log.threshold>
</systemProperties>
</container>
<configuration>
<type>existing</type>
<home>${project.build.directory}/target/jboss51x</home>
<properties>
<cargo.jvmargs>-XX:PermSize=512m -XX:MaxPermSize=1024
-XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled
-XX:+CMSClassUnloadingEnabled</cargo.jvmargs>
</properties>
</configuration>
<deployer>
<type>installed</type>
<deployables>
<deployable>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<type>war</type>
<!--
<pingURL>http://localhost:8080/${artifactId}</pingURL>
<pingTimeout>300000</pingTimeout>
-->
<pingURL>http://localhost:8080/${project.artifactId}/index.jsp</pingURL>
<properties>
<context>/${project.artifactId}</context>
</properties>
</deployable>
</deployables>
</deployer>
</configuration>
<executions>
<execution>
<id>start-container</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-container</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
和货物部署器部署
The Deployable state is thus unknown. ->
我读了一篇文章,但我不知道如何在jboss5中部署webapp:(您的配置有点奇怪。由于您使用的是已安装的现有容器,我希望看到它的主目录路径,而不是目标下的目录。以下是我正在使用的配置:
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0.2</version>
<configuration>
<container>
<containerId>jboss51x</containerId>
<append>false</append>
<log>${project.build.directory}/logs/jboss51x.log</log>
<output>${project.build.directory}/logs/jboss51x.out</output>
<timeout>300000</timeout><!-- 5 minutes -->
</container>
<configuration>
<type>existing</type>
<home>/path/to/jboss-5.1.0.GA</home>
<properties>
<cargo.servlet.port>8080</cargo.servlet.port>
<cargo.jboss.configuration>default</cargo.jboss.configuration>
<cargo.rmi.port>1099</cargo.rmi.port>
<cargo.logging>high</cargo.logging>
</properties>
<deployables>
<!-- application to deploy -->
<deployable>
<groupId>${project.groupId}</groupId>
<artifactId>myapp</artifactId>
<type>war</type>
<!--
<properties>
<context>acontext</context>
</properties>
-->
</deployable>
</deployables>
</configuration>
</configuration>
</plugin>
org.codehaus.cargo
cargo-maven2-plugin
1.0.2
jboss51x
假的
${project.build.directory}/logs/jboss51x.log
${project.build.directory}/logs/jboss51x.out
300000
现有的
/path/to/jboss-5.1.0.GA
8080
违约
1099
高的
${project.groupId}
myapp
战争
如果您第一次运行cargo:start running container,第二次运行cargo:deployer deploying webapp in Jboss和最后一个输入地址,您可以访问?我已按照上述步骤操作,浏览器显示404path home我使用绝对路径
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0.2</version>
<configuration>
<container>
<containerId>jboss51x</containerId>
<append>false</append>
<log>${project.build.directory}/logs/jboss51x.log</log>
<output>${project.build.directory}/logs/jboss51x.out</output>
<timeout>300000</timeout><!-- 5 minutes -->
</container>
<configuration>
<type>existing</type>
<home>/path/to/jboss-5.1.0.GA</home>
<properties>
<cargo.servlet.port>8080</cargo.servlet.port>
<cargo.jboss.configuration>default</cargo.jboss.configuration>
<cargo.rmi.port>1099</cargo.rmi.port>
<cargo.logging>high</cargo.logging>
</properties>
<deployables>
<!-- application to deploy -->
<deployable>
<groupId>${project.groupId}</groupId>
<artifactId>myapp</artifactId>
<type>war</type>
<!--
<properties>
<context>acontext</context>
</properties>
-->
</deployable>
</deployables>
</configuration>
</configuration>
</plugin>