简体   繁体   中英

Eclipse (Java): Central “treat warnings as errors”

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 change 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.

使用自己的 ant 脚本进行编译和构建并检查此链接(-Werror 标志) Javac:将警告视为错误

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM