尚未设置Maven错误;属性$ {samedir}尚未设置
如何修复Maven CheckStyle插件错误
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.1.2:check (validate) on project yourproject:
Failed during checkstyle execution:
Failed during checkstyle configuration: unable to parse configuration stream:
com.puppycrawl.tools.checkstyle.api.CheckstyleException:
Property ${samedir} has not been set -> [Help 1]
$ {Samedir}是一个与Eclipse插件一起运行良好的属性,需要在CheckStyle配置中提到的相关文件与Eclipse IDE合作。因此,我要么需要一致的替代品,要么我可以告诉Maven定义该物业的
任何想法如何解决此问题?
How to fix the maven checkstyle plugin error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.1.2:check (validate) on project yourproject:
Failed during checkstyle execution:
Failed during checkstyle configuration: unable to parse configuration stream:
com.puppycrawl.tools.checkstyle.api.CheckstyleException:
Property ${samedir} has not been set -> [Help 1]
${samedir} is a property working well with eclipse plugin and is required to get related files mentioned in the checkstyle configuration working well with eclipse IDE. So either I need a consistent replacement, or I can tell maven to define the property
Any ideas how to fix this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将必须通过POM中的插件配置设置这些值。
pom.xml
的示例配置如果您的项目root中有名为checks
的目录:checkstyle_maven.properties
cottents cottents:作为替代方法:
< propertiesLocation>
您也可以使用以下内容,在这种情况下,您不需要.properties
file:这将确保在
checkStyle中确保任何配置。
You will have to set these values via the plugin configuration in your pom.
Example configuration of
pom.xml
if you have a directory namedchecks
in your project root:And the
checkstyle_maven.properties
contents:As an alternative to the
<propertiesLocation>
you can also use the following, in which case you don't need the.properties
file:This will make sure any configuration in
checkstyle.xml
will work like this:See for reference: