0

Cargoを使用して、Mavenで生成されwarたファイルをすでに実行されているリモートJBossServerにデプロイしたいと思います。

私は次のように構成pom.xmlしました:

    ...
        <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>

            <dependencies>
                <dependency>
                    <groupId>org.jboss.as</groupId>
                    <artifactId>jboss-as-controller-client</artifactId>
                    <version>7.1.0.Final</version>
                </dependency>
            </dependencies>

            <configuration>
                <!-- Container configuration -->
                <container>
                    <timeout>300000</timeout> <!-- 5 minutes -->
                    <containerId>jboss71x</containerId>
                    <type>remote</type>
                </container>

                <!-- Configuration to use with the container -->
                <configuration>
                    <type>runtime</type>
                    <properties>
                        <cargo.hostname><myIP></cargo.hostname>
                        <cargo.jboss.management.port>9999</cargo.jboss.management.port>
                        <cargo.remote.username><myUser></cargo.remote.username>
                        <cargo.remote.password><myPass></cargo.remote.password>
                    </properties>
                </configuration>
                <!-- Deployer configuration -->
                <deployer>
                    <type>remote</type>
                </deployer>

                <!-- Deployables configuration -->
                <deployables>
                    <deployable>
                        <groupId>de.<myGroup></groupId>
                        <artifactId><myArtifact></artifactId>
                        <type>war</type>
                        <pingURL>http://<myIP>:8080/<myContextPath></pingURL>
                        <pingTimeout>60000</pingTimeout>
                    </deployable>
                </deployables>

            </configuration>
        </plugin>
    ...

もちろん、フォーム< my...>のすべての変数は実際の値で埋められます。

これをmavenコマンドで実行すると:

mvn -X cargo:deploy

Mavenコンソールは次のように述べています。

...
Sep 12, 2012 5:06:12 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.3.GA
Sep 12, 2012 5:06:12 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.2.GA
[DEBUG] [swordCallbackHandler] Responded to a RealmCallback
[DEBUG] [swordCallbackHandler] Responded to a NameCallback
[DEBUG] [swordCallbackHandler] Responded to a PasswordCallback
[INFO] [Boss7xRemoteDeployer] The deployment has failed: org.codehaus.cargo.util.CargoException: Cannot deploy deployable org.codehaus.cargo.container.jboss.deployable.JBossWAR[myWar.war]
...

実行中のJBossサーバーでは、コンソールに次のようなログメッセージが表示されます。

17:07:24,197 ERROR [org.jboss.remoting.remote.connection] (Remoting "pc09:MANAGEMENT" read-1) JBREM000200: Remote connection failed: java.io.IOException: Eine vorhandene Verbindung wurde vom Remotehost geschlossen.

(ログ内のドイツ語については申し訳ありません。基本的には、既存の接続がリモートホストによって閉じられました。)

誰かが何が間違っている可能性があるのか​​、または問題が正確に何であるかを見つけるために貨物からより多くのデバッグ情報を取得する方法を知っていますか?

ところで:私はArquillianテストにそのJbossサーバーへのJBoss CLIアクセスを使用したので、CLIを介したそのJbossサーバーへのアクセスは問題ないはずです。

編集: 最初にアンデプロイする必要があるようです。CLIへのアクセスが機能することを確認するために、を使用してCLIに接続しましたjboss-cli.bat。それから私は偶然に既存の戦争を展開解除し、その後貨物を介した展開が機能し始めました。(この質問を閉じるか、何らかの方法で解決済みとしてマークすることはできますか?)

4

0 に答える 0