我是 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 下,我可以看到错误“无法读取 settings.xml”
我尝试删除我的存储库文件夹并重建它,但这没有效果。这可能与我的 Eclipse-Maven 集成有关。
编辑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/>
关于java - 执行 Maven 时出错 - 不可解析的设置 settings.xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53562194/