简体   繁体   English

如何在Windows中更改Maven的M2_REPO

[英]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. 但是,我遇到了有关设置M2_REPO主页的问题。

At first, M2_REPO is being set default to a local in C such as the below : 首先,将M2_REPO默认设置为C中的本地变量,如下所示: 在此处输入图片说明

However, I want to change M2_REPOT to other local such as : 但是,我想将M2_REPOT更改为其他本地语言,例如: 在此处输入图片说明

I set M2_REPO in the environment but they still don't work as well. 我在环境中设置了M2_REPO,但它们仍然无法正常工作。

Please tell me know to config them ( Supposing I am using Eclipse for our project) 请告诉我知道如何配置它们(假设我在我们的项目中使用Eclipse)

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 此处最简单的解决方法:检查以下屏幕以检查您是否设置正确,要转到此处,只需转到window-> preference并在类型过滤器中键入maven 在此处输入图片说明

Have you tried to restart Eclipse once you modify the M2_REPO variable? 修改M2_REPO变量后,是否尝试过重新启动Eclipse? I think that JVM just reads all environment variables and then just keeps them in memory. 我认为JVM只是读取所有环境变量,然后将它们保留在内存中。

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% 您确定设置正确吗->设置正确后,尝试使用以下命令在命令窗口中将其打印:echo%M2_REPO%

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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