【发布时间】:2019-06-21 02:53:14
【问题描述】:
在命令提示符下运行“mvn test”时遇到错误。我需要运行“mvn test”来使用 Maven 和 Java 测试报告 JUnit 插件。
命令提示符:
[错误] 执行 Maven 时出错。 [错误] 遇到 1 个问题,同时 构建有效设置 [致命] 不可解析的设置 C:\Program Files\apache-maven-3.6.0\bin..\conf\settings.xml:结束标记 名称必须与第 102 行的开始标签名称匹配 \n -->\n... @254:12> @C:\程序 Files\apache-maven-3.6.0\bin..\conf\settings.xml,第 254 行,第 12 列
settings.xml
46<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
47 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
48 xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
49 <!-- localRepository
50 | The path to the local repository maven will use to store artifacts.
51 |
52 | Default: ${user.home}/.m2/repository
53 -->
54 <localRepository>C:\Users\hiddenuser\.m2\repository</localRepository>
55
56 <!-- interactiveMode
57 | This will determine whether maven prompts you when it needs input. If set to false,
58 | maven will use a sensible default value, perhaps based on some other setting, for
59 | the parameter in question.
60 |
61 | Default: true
62 <interactiveMode>true</interactiveMode>
63 -->
64
65 <!-- offline
66 | Determines whether maven should attempt to connect to the network when executing a build.
67 | This will have an effect on artifact downloads, artifact deployment, and others.
68 |
69 | Default: false
70 <offline>false</offline>
71 -->
72
73 <!-- pluginGroups
74 | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
75 | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
76 | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
77 |-->
78 <pluginGroups>
79 <!-- pluginGroup
80 | Specifies a further group identifier to use for plugin lookup.
81 <pluginGroup>com.your.plugins</pluginGroup>
82 -->
83 </pluginGroups>
84
85 <proxies>
86 <proxy>
87 <id>optional</id>
88 <active>true</active>
89 <protocol>http</protocol>
90 <!-- <username></username>
91 <password></password> -->
92 <host>hidden only</host>
93 <port>hidden only</port>
94 <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
95 </proxy>
96 <proxies>
97
98 <!-- servers
99 | This is a list of authentication profiles, keyed by the server-id used within the system.
100 | Authentication profiles can be used whenever maven must make a connection to a remote server.
101 |-->
102 <servers>
【问题讨论】:
标签: eclipse maven selenium automation command-prompt