How to get the Maven local repo location?

If you want just the local repo, try this:

mvn help:evaluate -Dexpression=settings.localRepository | grep -v '\[INFO\]'

EDIT

I’m revisiting this after years because recent versions of the Maven help plugin introduced a useful parameter for the evaluate goal called forceStdout that allows us to remove the need to grep the output:

mvn help:evaluate -Dexpression=settings.localRepository -q -DforceStdout

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)