Eclipse 中的 Maven 插件 - Settings.xml 文件丢失
我安装了eclipse的maven插件。然后尝试更新索引并收到以下错误:
Unable to update index forcentral|http://repo1.maven.org/maven2
在尝试通过 windows-preferences-maven-user 设置编辑代理设置时,我意识到有没有这样的文件。我没有单独的 Maven 安装,只有插件。请问有人可以帮忙解决问题吗?非常感谢。
干杯 配置
:Helios 服务版本 1 org.maven.ide.eclipse.feature (0.12.0.20101115-1102)“Eclipse 的 Maven 集成”
I installed the maven plugin for eclipse. Then tried updating the index and got the following error:
Unable to update index for central|http://repo1.maven.org/maven2
While trying to edit the proxy settings through windows-preferences-maven-user settings, I realise there is no such file. I don't have separate maven installation and only the plugin. Please someone could help resolving the problem? Thank you very much.
Cheers
A
Config: Helios Service Release 1
org.maven.ide.eclipse.feature (0.12.0.20101115-1102) "Maven Integration for Eclipse"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
设置文件永远不会自动创建,您必须自己创建它,无论您使用嵌入式还是“真正的”maven。
在以下位置创建它
<您的主文件夹>/.m2/settings.xml
例如,Windows 上的
C:\Users\YourUserName\.m2\settings.xml
或 Linux 上的/home/YourUserName/.m2/settings.xml
这是一个空骨架,您可以使用:
如果你使用Eclipse来编辑它,它会在编辑时给你自动完成。
这是 Maven settings.xml 参考页面
The settings file is never created automatically, you must create it yourself, whether you use embedded or "real" maven.
Create it at the following location
<your home folder>/.m2/settings.xml
e.g.
C:\Users\YourUserName\.m2\settings.xml
on Windows or/home/YourUserName/.m2/settings.xml
on LinuxHere's an empty skeleton you can use:
If you use Eclipse to edit it, it will give you auto-completion when editing it.
And here's the Maven settings.xml Reference page
在 Mac 上工作时,我遵循 Sean Patrick Floyd 的答案,在我的用户文件夹 /Users/user/.m2/ 中放置了一个像上面这样的 settings.xml
但这没有帮助。所以我打开了一个终端并对文件夹执行了 ls -la 操作。这表明
工作人员和所有人至少可以读取该文件。所以我想知道该消息是否没有错误,真正的原因是否是缺乏写入权限。我将文件设置为:
这样就完成了。消息消失了。
Working on Mac I followed the answer of Sean Patrick Floyd placing a settings.xml like above in my user folder /Users/user/.m2/
But this did not help. So I opened a Terminal and did a ls -la on the folder. This was showing
thus staff and everone can at least read the file. So I wondered if the message isn't wrong and if the real cause is the lack of write permissions. I set the file to:
This did it. The message disappeared.