Error Executing Maven - Non-parseable settings settings.xml

12,843

Close xml tag should be </tagName>

  <localRepository>Users/qz/.m2/repository 
 </localRepository>
 <interactiveMode>true</interactiveMode>

You can have empty tag in single tag as <tagName/> or you can remove it

   <activeProfiles/>
Share:
12,843

Related videos on Youtube

zagoo2000
Author by

zagoo2000

Updated on June 04, 2022

Comments

  • zagoo2000
    zagoo2000 almost 2 years

    I'm new to Maven. I have converted my Cucumber project to Maven and I'm getting execution error when I try to run Maven Clean or 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
    

    Snap of Maven Installation and Configuration My settings.xml file have some problem too as under Eclipse > Windows > Preferences > Maven > User Settings, I can see an error 'Could not read settings.xml'

    I have tried deleting my repository folder and rebuilding it but that wasn't effective. It may be something to do with my Eclipse-Maven integration.

    Edit-1: adding 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: corrected .xml and updated the error message

    • ernest_k
      ernest_k over 5 years
      Did you check the physical file that maven is complaining about (C:\Users\qz\.m2\settings.xml)? Does it contain valid xml?
    • zagoo2000
      zagoo2000 over 5 years
      Hi @ernest_k, yes the file is present under the location. I have just added it too.
    • ernest_k
      ernest_k over 5 years
      Your xml is invalid. On this line: <localRepository>Users/qz/.m2/repository<localRepository/>, <localRepository/> should be </localRepository>
    • zagoo2000
      zagoo2000 over 5 years
      Well spotted @ernest_k! I missed it some how. I have corrected it and the error is slightly different now. I have updated that too
    • ernest_k
      ernest_k over 5 years
      <profiles><profiles/>, and <activeProfiles><activeProfiles/> have the same problem
    • zagoo2000
      zagoo2000 over 5 years
      Sorry, I have just removed them and it's a BUILD SUCCESS. Thanks again @ernest_k