I downloaded an existing Maven project into eclipse.
When I ran mvn install
using the pom.xml
file it failed showing the following error:
mvn install
Error reading settings.xml: Expected root element 'settings' but found 'servers'
(position: START_TAG seen <servers>... @1:10)
Line: 1
Column: 10
I am using Maven 2.2.1 . and got settings.xml file under the M2 Home
I got this error in intellij (so the warning is not IDE specific) having imported a project using the POM at spring-data-neo4j-examples/cineasts/pom.xml
on github
My settings.xml
file contained the following
<server>
<id>LocalTomcat</id>
<username>tomcat</username>
<password>tomcat</password>
</server>
Looking at http://maven.apache.org/settings.html I found the following settings template which contains the appropriate namespaces.
<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>
I dropped in the original <server>
settings into the element.
The warning no longer occurred upon running mvn compile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With