Maven package works but Intellij's build fails
I know this is late but executing mvn idea:idea
solves the issue.
Try to delete all .iml and your POM. Then copy and paste your POM again to your project and re-open and re-import it.
I've found out that my .iml file and pom were conflicting and causing the issue.