我可以使用格式化程序-maven-plugin 来格式化项目中的单个文件吗?



我想知道是否可以在命令行中使用mvn 格式化程序格式化项目中的单个文件?像这样:

mvn formatter:format /projecet/helloWorld.java

谢谢

文档 https://code.revelc.net/formatter-maven-plugin/format-mojo.html#includes 说有用户属性formatter.includes。因此,请尝试像往常一样传递它mvn -Dformatter.includes=someFilenamePattern ...

最新更新