2

GlassFish v3をサポートしているようですが、オンラインの例はまばらです。貨物から同じエラーが引き続き発生します:GlassFish管理CLI JARが見つかりません:admin-cli.jar

これが私のpomです

<plugin>
    <groupId>org.codehaus.cargo</groupId>
    <artifactId>cargo-maven2-plugin</artifactId>
    <version>1.0.3</version>
    <configuration>
        <container>
            <containerId>glassfish3x</containerId>
            <type>installed</type>
        </container>
        <configuration>
            <type>standalone</type>
            <home>C:\glassfishv3</home>
            <properties>
                <cargo.hostname>localhost</cargo.hostname>
                <cargo.servlet.port>8082</cargo.servlet.port>
                <cargo.remote.username></cargo.remote.username>
                <cargo.remote.password></cargo.remote.password>
            </properties>
        </configuration>
        <deployer>
            <type>installed</type>
            <deployables>
                <deployable>
                    <groupId>${groupId}</groupId>
                    <artifactId>${artifactId}</artifactId>
                    <type>war</type>
                </deployable>
            </deployables>
        </deployer>
    </configuration>
</plugin>

修正されたPom:

<plugin>
    <groupId>org.codehaus.cargo</groupId>
    <artifactId>cargo-maven2-plugin</artifactId>
    <version>1.0.3</version>
    <configuration>
        <container>
            <containerId>glassfish3x</containerId>
            <type>installed</type>
            <home>C:\glassfishv3</home>
        </container>
        <configuration>
            <type>standalone</type>
            <properties>
                <cargo.hostname>localhost</cargo.hostname>
                <cargo.servlet.port>8082</cargo.servlet.port>
                <!-- if no username/password don't use these, it will fail
                <cargo.remote.username></cargo.remote.username>
                <cargo.remote.password></cargo.remote.password> -->
            </properties>
        </configuration>
        <deployer>
            <type>installed</type>
            <deployables>
                <deployable>
                    <groupId>${groupId}</groupId>
                    <artifactId>${artifactId}</artifactId>
                    <type>war</type>
                </deployable>
            </deployables>
        </deployer>
    </configuration>
</plugin>
4

1 に答える 1

4

Glassfish のインストールで、ディレクトリにadmin-cli.jarファイルが存在しmodulesますか?

このモジュールの詳細については、このリンクを確認してください。


編集

設定に問題があるようです。ここでわかるように、Cargo プラグインで<home>使用できるノードがいくつかあります。<configuration>

で行うように、 タグ<home>内でを定義すると、このタグは次の目的で使用されます。<configuration>pom.xml

スタンドアロン構成の場合、これは Cargo が構成を作成する場所であり、既存の構成の場合、これは配置されている場所です。

ただし、あなたの場合、タグ<home>内を移動する必要があります。<container>上記のリンクで説明されているように、これ<home>は次の目的で使用されます。

コンテナがインストールされている場所。

于 2010-09-30T17:35:44.860 に答える