簡體   English   中英

執行Maven時出錯-不可解析的設置settings.xml

[英]Error Executing Maven - Non-parseable settings settings.xml

我是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安裝和配置的快照我的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>

編輯2:更正了.xml,並更新了錯誤消息

關閉xml標記應為</tagName>

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

您可以在單個標簽中將空標簽作為<tagName/>或將其刪除

   <activeProfiles/>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM