运行mvn包时出现Google web toolkit错误

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了运行mvn包时出现Google web toolkit错误相关的知识,希望对你有一定的参考价值。

我有一个使用gwt编写的项目,运行“mvn package”时出现以下错误:

[INFO] --- gwt-maven-plugin:1.0-rc-8:compile (default) @ Ifrs9-Web ---
[INFO] Compiling module iason.ifrs9.web.client.Ifrs9EntryPoint
[INFO]    Tracing compile failure path for type 'com.smartgwt.client.bean.types.EnumValueType'
[INFO]       [ERROR] Errors in 'jar:file:/C:/Users/andrea/.m2/repository/com/smartgwt/smartgwt/4.0/smartgwt-4.0.jar!/com/smartgwt/client/bean/types/EnumValueType.java'
[INFO]          [ERROR] Line 26: Name clash: The method registerValueType(Class<T>) of type EnumValueType<ValueType> has the same erasure as registerValueType(Class<T>) of type OtherValueType<ValueType> but does not hide it
[INFO]    Tracing compile failure path for type 'com.smartgwt.client.bean.types.JsoValueType'
[INFO]       [ERROR] Errors in 'jar:file:/C:/Users/andrea/.m2/repository/com/smartgwt/smartgwt/4.0/smartgwt-4.0.jar!/com/smartgwt/client/bean/types/JsoValueType.java'
[INFO]          [ERROR] Line 31: Name clash: The method registerValueType(Class<T>) of type JsoValueType<ValueType> has the same erasure as registerValueType(Class<T>) of type OtherValueType<ValueType> but does not hide it
[INFO]    Finding entry point classes
[INFO]       [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:15 min
[INFO] Finished at: 2019-04-24T11:47:23+02:00
[INFO] Final Memory: 20M/212M

你能帮我解决一下这个错误吗?

答案

这已在SmartGWT论坛中得到解答:https://forums.smartclient.com/forum/smart-gwt-technical-q-a/30377-cannot-compile-smartgwt-4-0-with-gwt-2-6-and-jdk-1-7

升级到最新版本。可在此处构建:https://www.smartclient.com/builds/index.jsp

以上是关于运行mvn包时出现Google web toolkit错误的主要内容,如果未能解决你的问题,请参考以下文章

运行“mvn clean javadoc:jar package”时出现错误“未正确定义 JAVA_HOME 环境变量”

运行动态Web项目tomcat时出现问题“只能导入一个类型。 org.hibernate.cfg.Configuration解析为一个包“

尝试添加包时出现错误“重复条目:com/google/android/gms/internal/zzble.class”

在 jar 中加载 Web 图像时出现安全异常

解决 Maven项目进行编译( mvn compile )时出现的错误

在idea中,创建Maven工程后,写Java项目,测试时出现错误,怎么解决?