我正在尝试学习JavaEE8,我遵循了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,但它不工作...
发布于 2017-10-12 18:04:44
我也有同样的问题,但还是设法这样解决了:
在位于../glassfish5 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作为集成容器。但是,它无论如何都会构建和安装应用程序。
在此之后,我还必须在/glassfish 5/glassfish/domain目录中的password.properties文件中设置asadmin密码。
我希望这能解决你的问题。
发布于 2017-10-13 20:29:08
弗莱明·G·詹森曾说过:
我也有同样的问题,但还是设法这样解决了:
在位于../glassfish5 5/docs/javaee-tutorial/examples目录中的父pom中,我将以下属性更改为
1.6.4 domain1 /Users/fgjensen/Java/J2EE8/glassfish5 glassfish4x
这迫使Maven使用最新版本的cargo插件。插件目前不支持Glassfish 5作为集成容器。但是,它无论如何都会构建和安装应用程序。
在此之后,我还必须在/glassfish 5/glassfish/domain目录中的password.properties文件中设置asadmin密码。
我希望这能解决你的问题。
您还可以在主目录中创建指向GlassFish和JDK的符号链接,而不是修改行
<glassfish.home>/Users/fgjensen/Java/J2EE8/glassfish5</glassfish.home>发布于 2018-07-26 16:56:19
尝试只编辑父pom (在我的示例中为C:\Program Files\Java\glassfish4\docs\javaee-tutorial\pom.xml)并更改此行
<glassfish.home>${glassfish.home.prefix}/glassfish4</glassfish.home>一条绝对路线。
在我的例子中:
<glassfish.home>C:\Program Files\Java\glassfish4</glassfish.home>这对我很管用。祝好运。
https://stackoverflow.com/questions/46648971
复制相似问题