Modifying the location and confusion of the MAVEN local repository

Source: Internet
Author: User

MAVEN's default warehouse under the ~/.m2/repository, this is under the C drive, many system programs are in the C drive, and the C disk space is sometimes not large enough, so often to modify the local repository location, I made the following changes:

Set up a repository:d:\mavenrepository on D drive

Then add <localRepository>D:/mavenrepository</localRepository> in the Conf setting.xml file in the MAVEN installation directory

and put the modified copy in the D:\mavenrepository.

The above steps to complete the modification of the MAVEN warehouse, the use of their own temporarily did not find the problem, but the reference online content, found that there are many different


Other references:

Manually create a storage path for the local repository, for example: D:\mavenrepository;
A new user variable, M2_repo, is added to the Windows environment variable, with a value of D:\mavenrepository (the local storage path of the MAVEN repository), and the variable is added to the path variable;

I did not do the above steps, but still can use normal, do not know what the problem, if you know, please enlighten.

PS: Online Check the reason, said M2_repo is a used to define the MAVEN 2 warehouse in the hard disk storage location, I now use Maven3, estimated maven3 not so troublesome.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.