Reputation: 33
When running "mvn test" on command prompt, error was encountered. I need to run "mvn test" to test report JUnit plugin with Maven and Java.
Command prompt:
[ERROR] Error executing Maven. [ERROR] 1 problem was encountered while building the effective settings [FATAL] Non-parseable settings C:\Program Files\apache-maven-3.6.0\bin..\conf\settings.xml: end tag name must match start tag name from line 102 \n -->\n... @254:12> @ C:\Program Files\apache-maven-3.6.0\bin..\conf\settings.xml, line 254, column 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>
Upvotes: 1
Views: 1505
Reputation: 1689
Non-parseable settings
C:\Program Files\apache-maven-3.6.0\bin..\conf\settings.xml: end tag name must match start tag name from line 102
Your settings.xml file has some syntax errors, try the below content:
<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 | The path to the local repository maven will use to
store artifacts. | | Default: ${user.home}/.m2/repository -->
<localRepository>C:\Users\hiddenuser\.m2\repository</localRepository>
<!-- interactiveMode | This will determine whether maven prompts you when
it needs input. If set to false, | maven will use a sensible default value,
perhaps based on some other setting, for | the parameter in question. | |
Default: true <interactiveMode>true</interactiveMode> -->
<!-- offline | Determines whether maven should attempt to connect to the
network when executing a build. | This will have an effect on artifact downloads,
artifact deployment, and others. | | Default: false <offline>false</offline> -->
<!-- pluginGroups | This is a list of additional group identifiers that
will be searched when resolving plugins by their prefix, i.e. | when invoking
a command line like "mvn prefix:goal". Maven will automatically add the group
identifiers | "org.apache.maven.plugins" and "org.codehaus.mojo" if these
are not already contained in the list. | -->
<pluginGroups>
<!-- pluginGroup | Specifies a further group identifier to use for plugin
lookup. <pluginGroup>com.your.plugins</pluginGroup> -->
</pluginGroups>
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<!-- <username></username> <password></password> -->
<host>hidden only</host>
<port>hidden only</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
</proxies>
<!-- servers | This is a list of authentication profiles, keyed by the server-id
used within the system. | Authentication profiles can be used whenever maven
must make a connection to a remote server. | -->
<servers>
</servers>
</settings>
You haven't specified the ending matching /servers and /settings in the settings.xml file, that's why you are getting 'Non-parseable settings' error.
Upvotes: 0
Reputation: 688
At line no : 92
you just comment the opening of <servers>
and at line no 102
it's closing <servers>
, the error says itself that, you pass the unnecessary comment on the tag please remove the comment sign..
end tag name must match start tag name from line 102
So update the file and execute it again and let us know that this solution is helped you or not
for reference visit the official site for more information
https://maven.apache.org/settings.html
for more refrence
Upvotes: 1