Modify settings.xml and default repository save addresses in eclipse

Source: Internet
Author: User

1. Open Eclipse

2.window-->references-->maven0-->user Settings: Modify User settings,browse to re-select new Location D:\gongsi\ Apache-maven-3.1.0\conf\settings.xml.


When you integrate maven2 in Eclipse, Eclipse creates a directory under your system disk (c:/) by default.
C:/Documents and Settings/danlley/.m2/repository
and use it as a data Warehouse directory. If one day when you are unfortunate need to redo the system, and can not be maven2 warehouse directory in time to transfer the data, you have done to maven2 warehouse all maintenance will mean naught. In order to minimize your loss in maven2, improve the safety factor of your so-called labor outcomes, it is recommended that you migrate your data warehouse in the following ways:
1. Open Eclipse
2.window-->references-->java-->build Path-->classpath variables
3. Through the above two operations you will see a variables property named M2_repo
4. Double-click the attribute or click the Edit button
5. Modify Properties C:/Documents and Settings/danlley/.m2/repository to E:/maven-2.0.4/.m2/repository

OK, from now on you can rest assured!

In addition, if you want to put the post-installation maven2 Data Warehouse simply point to a backup folder, you can
E:/maven2/maven2/conf
Below, locate a settings.xml file, open the file, and locate the following node to modify it.
<localRepository>E:/maven-2.0.4/.m2/repository</localRepository>
Note: The settings here are best configured in the same way as in eclipse, so that you can consume unnecessary disk space and repeatedly download resources.
But I found that if you download update maven at the address
http://m2eclipse.codehaus.org/update-dev/
You can set up my local repo.

Modify settings.xml and default repository save addresses in eclipse

Related Article

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.