简体   繁体   中英

Maven, break build on autovalue package usage

Autovalue includes a shadowed version of guava for the annotation processor stuff. The problem is that autocomplete will often pull the autovalue guava version of a package in instead of the actual guava package.

What is the best way to prevent this from happening? So far we have caught most of the problems, but I fear we may miss one.

You can prevent this from happening by filtering out certain types from auto complete. For example, in Eclipse this can be done in Preferences under Java -> Appearance -> Type Filters

To avoid the problem with the shadowed version I added *.shaded.* as a type filter, this will filter out all types with at least one super package called shaded .

This feature is also useful if, for example, you use SWT and don't want to be bothered by autocompletion suggesting AWT/Swing types. For that I added java.awt.* and java.swing.* as type filters.

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