問題のI.説明
- あなたが痘を設定するとき、私が表示されていることを、ばねブートプログラムを作成するとき、それは間違っています
Project build error: Non-resolvable parent POM for com.example:spring-boot:0.0.1-SNAPSHOT:
Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.2.2.RELEASE from http://repo2.maven.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of repo2 has elapsed or updates are forced. Original error:
Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.2.2.RELEASE from/to repo2 (http://repo2.maven.org/maven2/): repo2.maven.org and 'parent.relativePath' points at no local POM
- 主な2つのエラー:
Non-resolvable parent POM for com.example:spring-boot:0.0.1-SNAPSHOT
repo2.maven.org and 'parent.relativePath' points at no local POM
第二に、問題が解決され
- その理由は、プロジェクトがあなたを見つけることができないということですポックスバージョンの依存関係にファイル対応を
- これは私の痘コード、問題です。
<version>2.2.2.RELEASE</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
1、道
インターネットは私の目的は彼を書くことではない、それはMavenのローカルリポジトリを更新することで、より一般的です
2.第二の方法
あなたが初めて使用するときは、Mavenのない場合の方法は、あなたの問題を解決しないかもしれない、あなたは、このメソッドを使用することができます
- あなたのポンポンファイルの依存関係によっては、ローカルリポジトリ内のファイルを検索します
<groupId>org.springframework.boot</groupId>
<version>2.2.2.RELEASE</version>
- 2つのパッケージファイルは、図赤枠で表示され、それを使用することができます
それは使用されません
- 地元の既存のバージョンにポンポンファイルのバージョン
2. 3つの方法
ローカルアドレスの設定を介して中央倉庫ビンを適応させます、あなたが正常に更新することができますので、
<!-- 阿里镜像 -->
<mirrors>
<mirror>
<id>nexus-aliyun</id>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!-- ibiblio镜像 -->
<mirror>
<id>ibiblio</id>
<name>Mirror from Maven ibiblio</name>
<url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<!-- 开源中国镜像 -->
<id>CN</id>
<name>OSChina Central</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
- 良いポンポンファイル編集後、保存し、ローカルリポジトリが自動的に更新されます