【发布时间】:2011-04-28 06:09:00
【问题描述】:
我有自定义 checkstyle 检查文件(称为 checks.xml),我正在尝试在 maven 和 eclipse 中使用相同的文件。除了SuppressionFilter,一切都很好。
在这个 checks.xml 文件中,我有
<module name="SuppressionFilter">
<property name="file" value="src/main/resources/checkstyle/checkstyle-suppressions.xml"/>
</module>
这在我运行 maven 时有效。但是,当我通过eclipse运行时,我需要将配置更改为
<module name="SuppressionFilter">
<property name="file" value="${basedir}/src/main/resources/checkstyle/checkstyle-suppressions.xml"/>
</module>
如果我使用 maven 使用 ${basedir} 属性运行,我会收到属性 ${basedir} 尚未设置的错误。
有没有办法在 Maven 和 Eclipse 中使用相同的配置文件?我觉得应该有,但我只是缺少有关如何正确填充抑制过滤器的内容。
谢谢, 杰夫
【问题讨论】:
-
我认为我的建议无关紧要,因此我将其删除。
标签: eclipse maven-2 checkstyle