Is there a way to enable treat "treat warnings as errors" (or something similar that has the same effect) from a central location in eclipse?
I have already found Project Properties -> Errors/Warnings where I can ch开发者_Python百科ange the error level for each individual warning (with corresponding effect in the Problems View). However I'd like to keep warnings being shown as warnings but have them prevent a sucessfull compile.
Have your own ant script for compile and build and check this link (-Werror flag) Javac: Treat warnings as errors
I arrived at this post when I was looking for a solution to treat warnings as errors in my Maven and Gradle Build. This post gave some basic answer to me, but post reading about JAVAC compiler options and maven compiler plugin. I have created a blog post explaining the importance of treating warnings as errors and how anyone could use JAVAC compiler options in their Maven and Gradle builds in my blog post.
Treat Warnings As Errors In JAVA
Treat Warnings As Errors In Spring Boot project
精彩评论