Skip to content

mvnd 换源 #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kimtomgo opened this issue Mar 21, 2025 · 2 comments
Open

mvnd 换源 #183

kimtomgo opened this issue Mar 21, 2025 · 2 comments
Labels
pl_target pl target

Comments

@kimtomgo
Copy link

描述新的换源目标

https://github.com/apache/maven-mvnd

请尽可能提供可参考的换源方法

与maven相同。配置在~/.m2/settings.xml

请尽可能提供已有镜像站

与maven一致

@ccmywish ccmywish added the pl_target pl target label Mar 25, 2025
@ccmywish
Copy link
Contributor

你好,@kimtomgo

没用过 mvnd,具体的配置项是什么?是完全和 maven 一模一样吗?

查了一下,根据:https://blog.csdn.net/lonelymanontheway/article/details/141477428

于是,找到mvnd安装目录conf下的mvnd.properties配置文件。分析此文件,不难发现最后一个配置项maven.settings,用于指定settings.xml文件路径

也就是说,mvnd 最终可以使用 maven 的配置文件?从而只用在 maven 的配置文件里添加镜像源就行了(就不需要额外在 mvnd 的配置文件里添加了?),我是这么理解的。不知道有没有问题?

@kimtomgo
Copy link
Author

@ccmywish 是的,默认就是用maven的配置,只需要配置在~/.m2/settings.xml。mvnd完全兼容mvn的命令,若习惯用mvn命令,也可以新建mvn软链到mvnd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pl_target pl target
Projects
None yet
Development

No branches or pull requests

2 participants