GlassFish v3 货物-maven2-插件

发布于 2024-09-25 18:19:13 字数 2941 浏览 4 评论 0原文

我看到它支持 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>

I see that supports GlassFish v3, but the online examples is sparse. I continue to get the same error back from cargo:
Cannot find the GlassFish admin CLI JAR: admin-cli.jar

Here is my 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>

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

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

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

发布评论

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

评论(1

泪眸﹌ 2024-10-02 18:19:13

在 Glassfish 安装中,modules 目录中是否存在 admin-cli.jar 文件?

有关此模块的更多信息,请查看此链接


编辑

您的配置似乎有问题。正如你在这里看到的,有几个< ;home> 节点可以在 Cargo 插件的 中使用。

如果您在 标记内定义 (就像在 pom.xml 中所做的那样),则使用此标记为了:

对于独立配置,这是 Cargo 创建配置的位置,对于现有配置,这是它所在的位置

但是,在您的情况下,您必须将 移动到 < ;容器> 标签。如上面的链接所述,此 用于:

容器安装位置。

In your Glassfish installation, do you have the admin-cli.jar file present in modules directory?

For more information about this module, check this link.


Edit

It seems that you have a problem in your configuration. As you can see here, there are several <home> nodes that can be used in the <configuration> of the Cargo plugin.

If you define the <home> inside the <configuration> tag, like you do in your pom.xml, this tag is used for:

For standalone configuration this is the location where Cargo will create the configuration and for existing configuration this is where it is located

However, in your case, you must move the <home> in the <container> tag. As described in the link above, this <home> is used for:

Location where the container is installed.

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