gpt4 book ai didi

java - 新的 GWT Maven 插件 (net.ltgt.gwt.maven) : no picking up of gwt. 来自 src/main/resources 的 xml(仅 src/main/java)

转载 作者:行者123 更新时间:2023-11-30 10:25:48 26 4
gpt4 key购买 nike

我有一个简单的 GWT 项目;我读过 here那:

NOTICE There is a new plugin (archetypes and eclipse integration), a fresh start that correctly support multi-module projects, it is not version-bounded with GWT, support multiples GWT versions and other fixes, improvements and best practices. This plugin is now considered the legacy GWT maven plugin (aka mojo GWT maven plugin) and the new one is considered the new generation GWT maven plugin (aka tbroyer GWT maven plugin). The legacy maven plugin is still supported but it is strongly encouraged to use the new one for new projects.

引用的插件是:

<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>

我正在尝试更新我的项目以使用新插件。我有以下问题:

  • 没有模块自动发现;使用旧的 Maven 插件,不需要指定模块名称;一个会自动为您发现(对我来说效果很好)。您知道新插件是否有等效项吗?
  • 如果我将我的 gwt.xml 文件放在 src/main/resources 而不是 src/main/java 下(这是 Maven 标准),找不到文件,我收到“模块没有定义入口点”错误。这是预期的行为吗?有什么原因吗?

所以我要么缺少一些允许我做我想做的配置,要么插件还很年轻,仍然缺少一些东西。但如果问题出在插件本身,那么为什么旧的插件页面会说“旧版 maven 插件仍然受支持但强烈建议在新项目中使用新插件。”?看来这些家伙有点着急了。

最佳答案

这个插件已经有好几年了,尽管它是 RC 版本控制,但已经可以生产了(免责声明:这里是插件作者;版本控制就像那样不提交向前兼容的配置,一些版本已经稳定了)

你是对的,你必须显式配置模块名称(和短名称,用于过时检查)。另一种方法是将您的模块放在 src/main/module.gwt.xml它将被重命名(并附加 rename-to="")到适当的名称和路径。

你有没有关注https://tbroyer.github.io/gwt-maven-plugin/migrating.html并设置 <skipModule>true</skipModule> ?否则会生成一个虚拟模块(实际上来自 src/main/module.gwt.xml,可能不存在)并且可能会覆盖您的模块。这实际上是在最终发布之前仍可能更改的行为的一部分。

关于java - 新的 GWT Maven 插件 (net.ltgt.gwt.maven) : no picking up of gwt. 来自 src/main/resources 的 xml(仅 src/main/java),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45942308/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com