TesterHQ - The Evil Tester Blog Aggregator

Sep 18, 2013 - 1 minute read - IntelliJ Java For Testers Maven

Do "Enable Auto-Import" in IntelliJ for "Maven projects need to be imported"

Original Blog Posting on [blog.javafortesters.com]

If you see the “Maven projects need to be imported” popup in IntelliJ, then do click “Enable Auto-Import”.

You very often see this when you first create new projects and it is easy to miss. But many of my “Why isn’t it finding this class” and “Why didn’t it import that” queries, are because I haven’t noticed the popup sitting patiently in the top right, waiting for me to respond.

Very often the first time you type @Test and you know you added JUnit as a dependency, and it runs fine from the command line, but IntelliJ doesn’t like it.

If you miss the popup then you can still set the properties using the IntelliJ options: