Skip to main content

Need a way to fail on deprecation warning

1 reply [Last post]
Joined: 2003-06-13


I'm looking for a tool or technique that I can use to fail a build if a deprecation warning is found. The code in question is part of a tutorial and examplar suite that we want to ensure is always up-to-date and that we never release it with deprecated methods or classes being used.

So far I can find no way to configure javac to fail on warning, nor can I find a scanning tool that I can slot into the build process. Any suggestions welcome!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-11


If you use Ant to build your software, you can check some conditions and according the conditions you decide when it has to fail.

Beside this the javac task supports the deprecation mode.

Have a look here...

I hope this helps.