caa*_*os0 9 eclipse m2eclipse maven
我有一个使用Axis生成一些代码的项目.这段代码充满了警告(大多数都缺少泛型),因此,我通常只是配置该源文件夹来忽略警告.
有没有办法使用m2e或其他maven插件?
当更多人开始使用该项目时,会出现这种优势.
我不使用 AXIS,但在使用 JAXB 进行代码生成时遇到了类似的问题。我的解决方案是用 @SuppressWarnings 注释每个类。
对于 JAXB,我使用了 annox 插件。您可以创建包含以下内容的绑定文件:
<jaxb:bindings schemaLocation="YourSchema.xsd"
xmlns:annox="http://annox.dev.java.net" jaxb:extensionBindingPrefixes="annox">
<jaxb:bindings multiple="true" node="/xs:schema/xs:complexType">
<annox:annotate>
<annox:annotateClass annox:class="java.lang.SuppressWarnings">
<annox:annotate annox:field="value">all</annox:annotate>
</annox:annotateClass>
</annox:annotate>
</jaxb:bindings>
Run Code Online (Sandbox Code Playgroud)
所以你不必触及你的模式。
| 归档时间: |
|
| 查看次数: |
501 次 |
| 最近记录: |