Is there a command line tool to Optimize Imports on Java project?
问题 I'm looking for a tool that will automate the process of optimizing the imports on a code base. This tool is available in most IDEs (IntelliJ for instance) which removes unused imports and expands any .* imports into the those specifically used by the code. I'd like to add this as a MVN goal, or Ant Task, or just something I can run before my commit/push. Perhaps there is a way run IntelliJ at the command line to specifically execute this feature, but I haven't found such a command. 回答1: If