前提・実現したいこと
Spring Bootを勉強するため、以下の手順でWindows10に環境構築をしています。
- Eclipse
pleiades-4.7.3-java-win-64bit-jre_20180411.zipをダウンロード、解凍してCドライブ直下に配置(C:\pleiades\eclipse...)
- Ecripse マーケットプレース
Spring ツール(aka Spring IDE and Spring Tool Suite)3.9.5.RELEASEをインストール
2. Spring Boot > Spring スターター・プロジェクトの作成
eclipseのパッケージ・エクスプローラ上で右クリックメニューから
新規 > その他 > Spring Boot > Spring スターター・プロジェクト
を選択してサンプルプロジェクトを作成。
設定項目名 | 設定値 |
---|---|
サービスURL | https://start.spring.io |
名前 | demo-1 |
型 | Maven |
パッケージング | Jar |
Javaバージョン | 8 |
言語 | java |
グループ | com.example |
成果物 | demo-1 |
バージョン | 0.0.1-SNAPSHOT |
説明 | Demo project for Spring Boot |
パッケージ | com.example.demo |
ここまで実施した所、以下のエラーが発生してつまづいています。
原因・解決方法、または不足している手順等がありましたらご教示頂ければと思います。
発生している問題・エラーメッセージ
pom.xml上の<parent>タグ部分に以下のエラーメッセージが表示されています。
プロジェクト・ビルド・エラー: Non-resolvable parent POM for com.example:demo-1:0.0.1-SNAPSHOT: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.0.3.RELEASE from 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. オリジナル・エラー: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.3.RELEASE from/to central (https://repo.maven.apache.org/maven2): Failed to connect to repo.maven.apache.org/151.101.40.215:443 and 'parent.relativePath' points at no local POM
該当のソースコード(pom.xml)
pom.xml
1<?xml version="1.0" encoding="UTF-8"?> 2<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4 <modelVersion>4.0.0</modelVersion> 5 6 <groupId>com.example</groupId> 7 <artifactId>demo-1</artifactId> 8 <version>0.0.1-SNAPSHOT</version> 9 <packaging>jar</packaging> 10 11 <name>demo-1</name> 12 <description>Demo project for Spring Boot</description> 13 14 <parent> 15 <groupId>org.springframework.boot</groupId> 16 <artifactId>spring-boot-starter-parent</artifactId> 17 <version>2.0.3.RELEASE</version> 18 <relativePath/> <!-- lookup parent from repository --> 19 </parent> 20 21 <properties> 22 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 23 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> 24 <java.version>1.8</java.version> 25 </properties> 26 27 <dependencies> 28 <dependency> 29 <groupId>org.springframework.boot</groupId> 30 <artifactId>spring-boot-starter</artifactId> 31 </dependency> 32 33 <dependency> 34 <groupId>org.springframework.boot</groupId> 35 <artifactId>spring-boot-starter-test</artifactId> 36 <scope>test</scope> 37 </dependency> 38 </dependencies> 39 40 <build> 41 <plugins> 42 <plugin> 43 <groupId>org.springframework.boot</groupId> 44 <artifactId>spring-boot-maven-plugin</artifactId> 45 </plugin> 46 </plugins> 47 </build> 48 49</project>
試したこと
- C:\Users[アカウント].m2\repository配下を全て削除
- Maven cleanを実行すると以下のエラーが発生。
[FATAL] Non-resolvable parent POM for com.example:demo-1:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.3.RELEASE from/to central (https://repo.maven.apache.org/maven2): Failed to connect to repo.maven.apache.org/151.101.24.215:443 and 'parent.relativePath' points at no local POM @ line 14, column 10
補足情報(FW/ツールのバージョンなど)
実行環境:Windows10 64bit
eclipse:pleiades-4.7.3-java-win-64bit-jre_20180411.zip
STS:Spring ツール(aka Spring IDE and Spring Tool Suite)3.9.5.RELEASE
回答1件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
また依頼した内容が修正された場合は、修正依頼を取り消すようにしましょう。
2018/10/05 08:20