我将现有的Maven项目下载到了eclipse中.
当我mvn install使用该pom.xml文件运行时,它失败显示以下错误:
mvn install
Error reading settings.xml: Expected root element 'settings' but found 'servers'
(position: START_TAG seen <servers>... @1:10)
Line: 1
Column: 10
Run Code Online (Sandbox Code Playgroud)
我正在使用Maven 2.2.1.并获得M2 Home下的settings.xml文件
我在intellij中遇到此错误(因此警告不是特定于 IDE 的),使用githubspring-data-neo4j-examples/cineasts/pom.xml上的POM 导入了项目
我的settings.xml文件包含以下内容
<server>
<id>LocalTomcat</id>
<username>tomcat</username>
<password>tomcat</password>
</server>
Run Code Online (Sandbox Code Playgroud)
查看http://maven.apache.org/settings.html我发现以下设置模板包含适当的名称空间。
<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>
Run Code Online (Sandbox Code Playgroud)
我将原始<server>设置放入元素中。
运行时不再出现警告mvn compile
| 归档时间: |
|
| 查看次数: |
7397 次 |
| 最近记录: |