簡體   English   中英

Eclipse-無法找到父pom,但是Maven構建實際上可以從Eclipse本身運行

[英]Eclipse - failure to find parent pom, but maven build actually works from Eclipse itself

Eclipse不斷告訴我找不到項目的父pom,但是如果我在項目上運行mvn -U install ,那么從Eclipse開始,構建就可以了。

我正在使用Eclipse Neon.1版本(4.6.1),並將其配置為使用我的外部Maven,即Maven 3.3.9。

這是Eclipse向我顯示的確切標記:

Project build error: Non-resolvable parent POM for nl.travelcard.common:tc-parent-fuse:2.1-SNAPSHOT: Failure to find nl.travelcard.common:tc-parent:pom:12 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at no local POM

這是我pom中的父標簽:

<parent>
    <artifactId>tc-parent</artifactId>
    <groupId>nl.travelcard.common</groupId>
    <version>12</version>
</parent>

為了確保Eclipse使用與Shell中相同的配置和相同的Maven發行版,您必須在Eclipse中配置以下兩項:

  • 在Windows->首選項-> Maven->安裝中,您必須添加自己的Maven發行版。

  • 在Windows->首選項-> Maven->用戶設置中,您必須在全局設置中添加與本地Maven分配所使用的文件相同的文件。

暫無
暫無

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

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