check maven local path code example
Example: maven print repository location
RESULT=$(mvn help:evaluate -Dexpression=settings.localRepository -q -DforceStdout)
RESULT=$(mvn help:evaluate -Dexpression=settings.localRepository -q -DforceStdout)