It turns out IntelliJ does not pick up added dependencies from the local Maven repository. We have to tell IntelliJ to reimport the pom.xml.
- Open the project view in IntelliJ
- Right click the pom.xml file and select Maven - Reimport
- If this works for you IntelliJ will add the dependencies to the project
- Check the if the dependencies you need are added in
- File - Project Structure - Project Settings - Libraries
- and File - Project Structure - Modules - Dependencies