如何将Maven警告视为错误?不只是编译器警告,而是所有警告。例如,我希望将这些警告视为将使构建失败的错误:
[WARNING]
[WARNING] Some problems were encountered while building the effective model for <>
[WARNING] 'dependencies.dependency.systemPath' for <> should not point at files within the project directory, <> will be unresolvable by dependent projects @ line <>, column <>
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.codehaus.mojo:cobertura-maven-plugin @ line <>, column <>
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]