Reputation: 520
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"
Upvotes: 34
Views: 122319
Reputation: 5173
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
-rw-r--r--@
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:
-rw-r--rw-@
This did it. The message disappeared.
Upvotes: 1
Reputation: 298818
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 Linux
Here's an empty skeleton you can use:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers/>
<mirrors/>
<proxies/>
<profiles/>
<activeProfiles/>
</settings>
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
Upvotes: 84