JavaEE 8 教程,在 hello1 项目上部署失败

2024-05-10

我正在尝试学习 Java EE 8,我遵循了官方指南https://javaee.github.io/tutorial/ https://javaee.github.io/tutorial/但我有这个问题:

--- cargo-maven2-plugin:1.4.4:redeploy (deploy) @ hello1 ---
[DeployerRedeployMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-glassfish:jar:1.4.4 for container glassfish5x
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 4.730s
Finished at: Mon Oct 09 16:16:40 CEST 2017
Final Memory: 18M/183M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy (deploy) on project hello1: Execution deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy failed: Cannot create configuration. There's no registered configuration for the parameters (container [id = [glassfish5x], type = [installed]], configuration type [existing]). Actually there are no valid types registered for this configuration. Maybe you've made a mistake spelling it? -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

我完全按照指南进行操作,所以我不明白错误在哪里......

编辑: 此错误对于 glassfish 5 和 4.1.1 是相同的。 如果我手动部署 war 包,它就可以工作;所以问题是maven和glassfish服务器之间的通信......

编辑2: 我找到了这个https://netbeans.org/bugzilla/show_bug.cgi?id=247746 https://netbeans.org/bugzilla/show_bug.cgi?id=247746但它不起作用...


我遇到了同样的问题,但设法以这种方式解决:

在位于 ../glassfish 5/docs/javaee-tutorial/examples 目录的父 pom 中,我将以下属性更改为

<cargo.plugin.version>1.6.4</cargo.plugin.version>
<glassfish.domain.name>domain1</glassfish.domain.name>       
<glassfish.home>/Users/fgjensen/Java/J2EE8/glassfish5</glassfish.home>
<integration.container.id>glassfish4x</integration.container.id> 

这迫使 Maven 使用最新版本的 Cargo 插件。该插件目前不支持 Glassfish 5 作为集成容器。但是,它无论如何都会构建并安装应用程序。

此后,我还必须在 /glassfish5/glassfish/domains 目录中的 password.properties 文件中设置 asadmin 密码。

我希望这能解决您的问题。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

JavaEE 8 教程,在 hello1 项目上部署失败 的相关文章

随机推荐