Goto Settings -> Build, Execution, Deployment -> Build Tools -> Maven and make sure Use settings from .mvn/maven. config chebox is checked.
Settings -> Build, Execution, Deployment -> Build Tools -> Maven
Use settings from .mvn/maven. config