Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minor Annoyance: edu.emory.mathcs.backport.java.util

Tags:

maven

I know this is trivial, but I bet I am not the only developer being annoyed by this issue:

I have a maven project building a Spring Hibernate frameowrk for a webapp. I am building using Eclipse.

I use Eclipse shortcuts to import dependencies and often do so almost subconsciously.

Somewhere in my project dependencies I have a jar that includes the following package.

edu.emory.mathcs.backport.java.util

I often accidentally import this package instead of java.util and get compile or runtime errors.

QUESTION: How can I find out which dependency includes this package so I can (hopefully) exclude it using the Maven enforcer plugin.

like image 567
Jake Avatar asked Oct 22 '25 13:10

Jake


1 Answers

This does not directly answer your question but may help you prevent the accidental import in the first place:

In Eclipse you can add a type filter in PreferencesJavaAppearanceType Filters.

From the description there:

All types whose fully qualified name matches the selected filter strings will not be shown in the 'Open Type' dialog. They will also be ignored in content assist or quick fix proposals and when organizing imports. For example 'java.awt.*' will hide all types from the awt packages.

like image 189
siegi Avatar answered Oct 24 '25 03:10

siegi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!