0

cargo maven プラグインを使用してアプリケーションをリモートの wildfly 8.1.0.Final にデプロイしようとしていますが、エラー Operation failed: Could not connect to remote://10.0.0.165:9990 in 5000ms で失敗します。

このアプリケーションは、maven アーキタイプ cargo-archetype-remote-deployment によって生成されるデフォルトのアプリケーションです。このアプリケーションは、pom を変更せずに jboss 7.1.1.Final に正常にデプロイできます。次のプロファイルを pom に追加しました

<profile>
  <id>wildfly8x</id>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.cargo</groupId>
          <artifactId>cargo-maven2-plugin</artifactId>
          <configuration>
            <container>
              <containerId>wildfly8x</containerId>
            </container>
          <properties>
             <!--<cargo.jboss.management-native.port>9999</cargo.jboss.management-native.port>-->
             <cargo.jboss.management-http.port>9990</cargo.jboss.management-http.port>  
          </properties>

          </configuration>
          <!--
            The JBoss remote deployer requires some additional dependencies. Read more on:
            http://cargo.codehaus.org/JBoss+Remote+Deployer
            -->
          <dependencies>
            <dependency>
              <groupId>org.jboss.as</groupId>
              <artifactId>jboss-as-controller-client</artifactId>
              <version>7.0.2.Final</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</profile>

これは、wildfly の変更を含む jboss7x プロファイルのコピーです。

最初のプロパティは、正しいホスト名とユーザー名、およびパスワードに変更されています。http を使用して 10.0.0.165:9990 にログインし、Web インターフェイスにアクセスできます。jboss-cli インターフェイスを使用して 10.0.0.165:9990 にログインし、コマンドラインを使用してアプリケーションをサーバーにデプロイすることもできます。推奨どおりにタイムアウトも増やしましたが、成功しませんでした。

remote:// プロトコルが wildfly で使用できないか、名前が正しくなく、cargo がそれを使用して接続できることを期待しているようです。

過去に Netbeans 8 を接続したときに、wildfly とインターフェイスに加えられた変更に問題がありました。最終的に、ベータ版の 1 つで削除されたネイティブ管理インターフェイスを追加することで、その解決策を見つけました。

これを機能させる方法についての知識はありますか?実際の例からのポンのコピーは良いでしょう。返信する前に、返信が jboss/redhat として指定されたバージョンに関連していることを確認してください。

4

1 に答える 1

2

ハイ、

私はちょうど同じ問題を抱えています、私はあなたがから例をコピーすると思います:

http://cargo.codehaus.org/JBoss+Remote+Deployer

そして、例がJBOSS 7用であることがわかりました...

Wildflyの場合、これが私にとってうまくいきました:

<build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.cargo</groupId>
                <artifactId>cargo-maven2-plugin</artifactId>
                <version>1.4.12</version>
                <configuration>
                    <container>
                        <containerId>wildfly8x</containerId>
                        <type>remote</type>
                    </container>
                    <configuration>
                        <type>runtime</type>
                        <properties>
                            <cargo.remote.username>consoleUser</cargo.remote.username>
                            <cargo.remote.password>consolePassword</cargo.remote.password>
                            <cargo.hostname>IP_ADDRESS</cargo.hostname>
                            <cargo.jboss.management-http.port>9990</cargo.jboss.management-http.port>
                        </properties>
                    </configuration>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.wildfly</groupId>
                        <artifactId>wildfly-controller-client</artifactId>
                        <version>8.2.0.Final</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

これに関する恥ずべきことは、ドキュメンテーションであり、この投稿に回答するJavaユーザーコミュニティがいないことです... .NETの人でなければなりません...なんて残念なことでしょう....

于 2015-02-26T16:17:33.263 に答える