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, by default, Eclipse creates a directory under your system disk (c:/),
C:/Documents and settings/danlley/.m2/ Repository
and use it as the 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 as follows:
1. Open Eclipse
2.window-->references--> Java-->build Path-->classpath Variables
3. With the above two actions you will see a variables property named M2_repo
4. Double-click the property or click the Edit button
5. Modify the properties C:/Documents and Settings/danlley/.m2/repository to E:/maven-2.0.4/.m2/repository

OK, and you'll have peace of mind.

Also, if you want to point the post-installation MAVEN2 Data Warehouse to a backup folder simply, you can do so in
e:/maven2/maven2/conf
Below, locate a settings.xml file, open the file, and locate the following node to modify the
<localrepository>e:/maven-2.0.4/.m2/repository</ Localrepository>
Description: The settings here are best as you would in eclipse, in order to consume unnecessary disk space and repeatedly download resources.
But I found that if you download update maven
http://m2eclipse.codehaus.org/update-dev/
You can set my local repo

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.