我是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>首选项> Maven>用户设置下,我看到一个错误“无法读取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并更新了错误消息
答案 0 :(得分:1)
关闭xml标签应为</tagName>
<localRepository>Users/qz/.m2/repository
</localRepository>
<interactiveMode>true</interactiveMode>
您可以在单个标签中将空标签设为<tagName/>
,也可以将其删除
<activeProfiles/>