执行 Maven 时出错 - 不可解析的设置 settings.xml
Error Executing Maven - Non-parseable settings settings.xml
我是 Maven 新手。我已将我的 Cucumber 项目转换为 Maven,当我尝试 运行 Maven Clean 或 Maven Build 时出现执行错误。
[ERROR] Error executing Maven.
[ERROR] 1 problem was encountered while building the effective settings
[FATAL] Non-parseable settings C:\Users\qz\.m2\settings.xml: end tag name </settings> must match start tag name <activeProfiles> from line 10 (position: TEXT seen ...</pluginManagement> \r\n</build>\r\n</settings>... @21:12) @ C:\Users\qz\.m2\settings.xml, line 21, column 12
Maven Installation and Configuration 的快照
我的 settings.xml 文件也有一些问题,在 Eclipse > Windows > Preferences > Maven > User Settings 下,我可以看到一个错误 'Could not read settings.xml'
我试过删除我的存储库文件夹并重建它,但这没有效果。这可能与我的 Eclipse-Maven 集成有关。
Edit-1:添加 settings.xml
<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>Users/qz/.m2/repository</localRepository>
<interactiveMode>true</interactiveMode>
<offline>false</offline>
<profiles><profiles/>
<activeProfiles><activeProfiles/>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</settings>
Edit-2:更正了 .xml 并更新了错误消息
关闭 xml 标签应该是 </tagName>
<localRepository>Users/qz/.m2/repository
</localRepository>
<interactiveMode>true</interactiveMode>
您可以在单个标签中使用空标签作为 <tagName/>
或者您可以删除它
<activeProfiles/>
我是 Maven 新手。我已将我的 Cucumber 项目转换为 Maven,当我尝试 运行 Maven Clean 或 Maven Build 时出现执行错误。
[ERROR] Error executing Maven.
[ERROR] 1 problem was encountered while building the effective settings
[FATAL] Non-parseable settings C:\Users\qz\.m2\settings.xml: end tag name </settings> must match start tag name <activeProfiles> from line 10 (position: TEXT seen ...</pluginManagement> \r\n</build>\r\n</settings>... @21:12) @ C:\Users\qz\.m2\settings.xml, line 21, column 12
Maven Installation and Configuration 的快照 我的 settings.xml 文件也有一些问题,在 Eclipse > Windows > Preferences > Maven > User Settings 下,我可以看到一个错误 'Could not read settings.xml'
我试过删除我的存储库文件夹并重建它,但这没有效果。这可能与我的 Eclipse-Maven 集成有关。
Edit-1:添加 settings.xml
<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>Users/qz/.m2/repository</localRepository>
<interactiveMode>true</interactiveMode>
<offline>false</offline>
<profiles><profiles/>
<activeProfiles><activeProfiles/>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</settings>
Edit-2:更正了 .xml 并更新了错误消息
关闭 xml 标签应该是 </tagName>
<localRepository>Users/qz/.m2/repository
</localRepository>
<interactiveMode>true</interactiveMode>
您可以在单个标签中使用空标签作为 <tagName/>
或者您可以删除它
<activeProfiles/>