eclipse maven POM 第一行提示異常Could not initialize class org.apache.maven.plugin.war.util.WebappStructureSerializer


 

eclipse從2021-03版本更新為2021-06版本后,有些項目的POM文件第一行有Could not initialize class org.apache.maven.plugin.war.util.WebappStructureSerializer錯誤。

原因:POM中包含有maven-war-plugin插件,插件版本太低

<plugin>
  <groupId>org.apache.maven.plugins</groupId>   <artifactId>maven-war-plugin</artifactId>   <version>2.4</version>   <configuration>     <failOnMissingWebXml>false</failOnMissingWebXml>   </configuration> </plugin>

解決:將插件的版本更新

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-war-plugin</artifactId>
  <version>3.3.1</version>
  <configuration>
    <failOnMissingWebXml>false</failOnMissingWebXml>
  </configuration>
</plugin>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM