Preslav's Thoughts and Ramblings

Maven Helpers in IntelliJ

27 August 2015 | intellij, gif, maven, ide

IntelliJ offers brilliant Maven support that makes editing your projects' pom.xml way less tedious, and your day more productive. Besides seamless autocompletion, the Maven integration automatically focuses the pointer on the places that need to be filled-in first. Not only that, but it is smart enough to start a search for the needed dependencies, as one types them, and based on the name of the selected dependency, it provides smart suggestions about its groupId and version.

Once a dependency has been injected, it makes sense to extract its version number into a Maven property, in order to reduce copying the same version number over to multiple dependencies. Once again, the Maven integration comes to the rescue. Though it takes about 20 seconds create a property, using the automatic refactoring in IntelliJ takes only about 5. Though these seem like tiny time gains, they add up over the course of work, and will reduce one's time spent on doing boilerplate work.

NOTE: Keep in mind that these features are not particularly unique for IntelliJ. Any other modern Java IDE, such as Eclipse, for instance, offers similar functionality as well.