Monday 15 August 2011

Is there a command line or Maven plugin to optimize/organize Java imports? -


There are plugins for formatting code using Eclipse Formatters from Maven, and it does not get instructions to run from command Line. However, this formater does not adjust / optimize the import statement.

The reason for this is that I have prepared a code, using a pass on a template. It will be difficult to come out that what is not necessary for imports and what is not, so I am importing a lot of things which are not being used. A formatter which clears unused imports, will solve this problem smoothly later.

Specifically, I want to remove unused imports automatically, but not within the IDE. How can I do this?


No comments:

Post a Comment