2024年10月31日 星期四

invalid packging for parent POM com.xxxxxx:1.0SNAPSHOT must be "pom" but is "jar"

 出現在專案上面冒紅線, 並有紅字invalid packing......



在本專案的原因是, 這裡有母子專案

有在子專案pom檔中聲明parent

<parent>
<artifactId>heima-leadnews-test</artifactId>
<groupId>com.heima</groupId>
<version>1.0-SNAPSHOT</version>
</parent>

但是母專案pom檔中漏掉

<modules>
<module>freemarker-demo</module>
<module>minio-demo</module>
</modules>

補上後刷新maven就解決了

沒有留言:

張貼留言

2026年新年新目標

從今年開始預計2.5-3年後成為能應徵國際大廠的頂尖工程師 今年在程式上 1 每個月看看能不能都做專案, 一年12專案 2 刷題每周4題 3 跑個人scrum, 並組讀書會 4規律讀英文ex每天早上8:30-9:30 5規律運動7:35-8:30 6減肥97->85 而下班...