この問題がEclipse環境で表示される場合、これはm2eコネクターがプラグインを~\.m2\
リポジトリーにダウンロードしようとするためです。
これを解決するには、Eclipse設定を開きます。セクションWindow->Preferences
に移動します。Mavenが使用するファイルにまたはが接続されている->Maven->User Settings
かどうかを確認します。Global Settings
User Settings
settings.xml
一般的に: Mavenまたはm2eコネクターは、settings.xmlで構成されたplugin-repositoriesを介してこれらのプラグインをダウンロードしようとします。プロキシーなどの背後にあるため、リポジトリーが不明であるか到達できないため、プラグインを見つけることができません。
08.11.18, 15:54:47 MEZ: [WARN] Failed to build parent project for com.xxx.xxx.xxx:eclipse-plugin:1.0.0-SNAPSHOT
08.11.18, 15:54:47 MEZ: [WARN] Failure to transfer org.apache.maven.plugins:maven-site-plugin/maven-metadata.xml from http://repository.sonatype.org/content/groups/sonatype-public-grid was cached in the local repository, resolution will not be reattempted until the update interval of tycho has elapsed or updates are forced. Original error: Could not transfer metadata org.apache.maven.plugins:maven-site-plugin/maven-metadata.xml from/to tycho (http://repository.sonatype.org/content/groups/sonatype-public-grid): repository.sonatype.org
ファイルに移動して、settings.xml
次を追加します。
ミラー(この例では:central
リポジトリ。それに応じて他のリポジトリに対してもそうします。例tycho
):
<mirror>
<id>central</id>
<name>Our mirror for central repo</name>
<url>http://<your host to>/nexus/content/repositories/central/</url>
<mirrorOf>central</mirrorOf>
</mirror>
リポジトリ:
<repository>
<id>central</id>
<url>http://<your host to>/nexus/content/groups/public/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>
これで問題が解決するはずです。
Eclipse固有:エラーが発生する場合(不明なパッケージなど)、を介してライフサイクルマッピングをWindow->Preferences->Maven->Discovery->Open Catalog
追加し、Tycho Connector
さらに追加することができます。さらにlifecycle-mapping
、Eclipse環境でこれらのライフサイクルマッピングを処理するプラグインを追加できます。eclipsem2eライフサイクルマッピング