必须设置哪些 Maven XMLBeans 配置才能使用泛型?
有一些 XMLBeans 站点参考利用泛型(和枚举)生成的代码,但是,我似乎找不到要设置的配置选项。
提及 XML Bean 中的泛型的站点:
http://xmlbeans.apache.org/news.html
http://wiki.apache.org/xmlbeans/V2Features
我已经设置了 javaSource
配置为 1.5,但这仍然不会导致生成的源使用泛型。
(参见http://mojo.codehaus.org/xmlbeans- maven-plugin/xmlbeans-mojo.html#javaSource)
一些相关的 Stack Overflow 问题:
There are a few XMLBeans sites that make reference to generated code taking advantage of generics (and enums) however, I can't seem to find the configuration option to set.
Sites mentioning generics in XML Beans:
http://xmlbeans.apache.org/news.html
http://wiki.apache.org/xmlbeans/V2Features
I have set the javaSource
configuration to 1.5 but that still isn't causing the generated source to use generics.
(see http://mojo.codehaus.org/xmlbeans-maven-plugin/xmlbeans-mojo.html#javaSource)
Some related Stack Overflow questions:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
@artbristol 是正确的,只需使用“javaSource”标签即可。
看起来我们正在使用“javasource”(通知案例),这就是问题所在。当案例问题解决后,目标目录没有被正确清理,留下了一些遗留的 Java 1.4 文件,这是编译器警告的原因。
谢谢!
@artbristol was correct, simply use the 'javaSource' tag.
Looks like we were using 'javasource' (notice case) and that was the problem. When the case issue was resolved, the target directory wasn't being cleaned properly, leaving some legacy Java 1.4 files which was the cause of the compiler warnings.
Thanks!