简体   繁体   中英

How to change the M2_REPO of Maven in windows

Currently,I have to change device(laptop) for working ---> I have to change the environment to be suitbale with my Project.

However, I got an issue relating to setting the M2_REPO home.

At first, M2_REPO is being set default to a local in C such as the below : 在此处输入图片说明

However, I want to change M2_REPOT to other local such as : 在此处输入图片说明

I set M2_REPO in the environment but they still don't work as well.

Please tell me know to config them ( Supposing I am using Eclipse for our project)

Thanks.

Oh. Simplest soltion here : Check the following screen to check if you have the good settings, to go here just go to window->preference and type maven in the type filter 在此处输入图片说明

Have you tried to restart Eclipse once you modify the M2_REPO variable? I think that JVM just reads all environment variables and then just keeps them in memory.

Are you sure you have set it up properly -> once you set it try to print it in the new command window with the following command: echo %M2_REPO%

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM