If `mvn package` works well for you, then it’s IDE...
# build-tools
s
If
mvn package
works well for you, then it’s IDEA issue - try to reimport project