英文:
How to resolve/disable -Werrors in java projects?
问题
在我的Java maven项目中,当我尝试在IntelliJ中编译项目时,它会出现以下错误:
错误:发现java警告,并且指定了-Werror
我发现,-Werror 是因为警告被视为错误而引起的。有没有办法禁用这个功能呢?
英文:
In my Java maven project, when I try compiling the project in IntelliJ , it gives the error
Error: java warnings found and -Werror specified
I have found that -Werrors are caused due to warnings being shown as errors. Is there a way to disable this?
答案1
得分: 3
你正在使用-Werror标志构建你的项目。该标志将警告视为错误,因此会导致构建失败。你可以从构建选项中删除该标志,或者解决这些警告。
英文:
You are building your project with the -Werror flag. That flag treats warnings as errors and therefore makes the build fail. You can either remove the flag from your build options or solve the warnings.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论