Use alternate local maven repository

When I imported a maven project I had been working on in JBDS, it couldn't find a lot of the artifacts that it was looking for in the local repository. I have my $MAVEN_HOME set to a directory on my D: drive and the global settings.xml file there specifies that repo as the one to use. IntelliJ was using the .m2 directory in my home directory for the repository (this is the default for maven on windows.) So I deleted that direcdtory and it still wants to use that.

Where do I tell IntelliJ to use a different path for the local maven repository?

Thanks,
SE

2 comments
Comment actions Permalink

File > Settings > Project Settings > Maven

For the "Local Repository", check the override box and set the desired location. Alternatively, you can override the "User settings file" to use your alternative settings.xnl file that specifies the alternate repo.

To make this change as part of the template for all new projects so future projects have it in place, do the same thing under File > Other Settings > Template Settings > TemplateProject Settings > Maven

3
Comment actions Permalink

Thanks. I have no idea how I missed that.

1

Please sign in to leave a comment.