eclipse中maven項目pom.xml首行報錯(工程能正常運行,problems裏error只有undefined)的解決方案

eclipse中maven項目pom.xml首行報錯,工程能正常運行,problems裏error只有undefined。如下圖所示:

從送sample開始,就被客戶催着問報錯,真真浪費我很多時間,調查時間一把心酸類,修改只要一分鐘。

項目搭建初期,能正常運行,就沒空管這個小錯誤。

後面被客戶各種問,各種查資料,說修改哪裏的都有,經本人不厭其煩的測試,結果都無效。

只能找公司替他項目不報錯的pom跟我這般差分,一行一行加着試,終於找到了,加上下面這行代碼就好了。

<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.5.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>jp.co.pia.ticket.sports.hawks.seasonseat.common</groupId>
    <artifactId>util</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>
    <name>util</name>

    <properties>
        <java.version>11</java.version>
        <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
    </properties>
    <dependencies>
        ......
    </dependencies>
</project>

反過來分析原因,maven的插件版本與eclipse版本(Version: 2018-12 (4.10.0) Build id: 20181214-0600)存在衝突。

這點事爲什麼在problems裏不能顯示出來。

希望幫到遇到同樣問題的小夥伴。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章