如何使用cargo-maven2-plugin部署到jboss as5?

发布于 2024-09-09 03:23:31 字数 3888 浏览 10 评论 0原文

我尝试cargo-maven2-plugin,但我没有在jboss5x中部署我的pom.xml是

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

我运行cargo:deployer-start或cargodeployer-deploy是错误

cargo:deployer-start错误消息是:

Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.0.2:deployer-start (default-cli) on project SSH2Maven: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.0.2:deployer-start failed: Not supported -> [Help 1]

和cargodeployer-deploy

The Deployable state is thus unknown. ->

我读a 部署到正在运行的容器但我不知道如何jboss5 中的 depoly webapp :(

I trying cargo-maven2-plugin, but I don't deploy in jboss5x I pom.xml is

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

I run a cargo:deployer-start or cargodeployer-deploy is error

cargo:deployer-start Error message is:

Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.0.2:deployer-start (default-cli) on project SSH2Maven: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.0.2:deployer-start failed: Not supported -> [Help 1]

and cargodeployer-deploy

The Deployable state is thus unknown. ->

I read a Deploying to a running container but I dont't know how to depoly webapp in jboss5 :(

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一场信仰旅途 2024-09-16 03:23:31

您的配置有一些奇怪的地方。由于您使用的是已安装的现有容器,因此我希望看到其主目录的路径,而不是目标下目录的路径。这是我正在使用的配置:

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

There is something strange with your configuration. Since you're using an installed existing container, I'd expect to see the path to its home, not to a directory under target. Here is a configuration I'm using:

  <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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文