It\'s possible to set the maven local repository in settings.xml:
${user.home}/.m2/repository
<
If the problem is having to write the options every time when running maven, you can use a feature available since version 3.3.1 that allows you to set command line options in your project (or parent project of your module). Read @Brice's answer: https://stackoverflow.com/a/48583079
So with this feature in mind, you can achieve a similar result by setting up a new settings.xml
with the
pointing to the location you desire and use maven.config
in your project to make maven use the new settings.xml
, which by the way can be anywhere you want.