前提・実現したいこと
Springbootの学習のために下記URLを参考にVScodeでHelloWorldを表示させたい。
発生している問題・エラーメッセージ
VScodeでSpring Mavenプロジェクトを作成後、pom.xmlの <parent>でエラーが発生しています。
Project build error: Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.4.2 from/to central (https://repo.maven.apache.org/maven2): C:\Users\xxxx.m2\repository\org\springframework\boot\spring-boot-starter-parent\2.4.2\aether-9f8c020e-bb36-436b-b3ed-73730c8f5abc-spring-boot-starter-parent-2.4.2.pom-in-progress (指定されたパスが見つかりません。) and 'parent.relativePath' points at no local POMJava(0)
該当のソースコード
pom
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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4 <modelVersion>4.0.0</modelVersion> 5 <parent> 6 <groupId>org.springframework.boot</groupId> 7 <artifactId>spring-boot-starter-parent</artifactId> 8 <version>2.4.2</version> 9 <relativePath/> <!-- lookup parent from repository --> 10 </parent> 11
試したこと
Java開発環境の見直し(Java -versionで確認済み)
PCを変えて、環境の構築~Mavenプロジェクト作成
補足情報
Java:11
Spring:2.4.2
VScode:1.52.1
Java Extension Pack:v0.12.1
Spring Boot Extension Pack:v0.0.8
原因、対処法がわかる方ご教授お願い致します。
追記
setting.xml
1<?xml version="1.0" encoding="UTF-8"?> 2 3<!-- 4Licensed to the Apache Software Foundation (ASF) under one 5or more contributor license agreements. See the NOTICE file 6distributed with this work for additional information 7regarding copyright ownership. The ASF licenses this file 8to you under the Apache License, Version 2.0 (the 9"License"); you may not use this file except in compliance 10with the License. You may obtain a copy of the License at 11 12 http://www.apache.org/licenses/LICENSE-2.0 13 14Unless required by applicable law or agreed to in writing, 15software distributed under the License is distributed on an 16"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17KIND, either express or implied. See the License for the 18specific language governing permissions and limitations 19under the License. 20--> 21 22<!-- 23 | This is the configuration file for Maven. It can be specified at two levels: 24 | 25 | 1. User Level. This settings.xml file provides configuration for a single user, 26 | and is normally provided in ${user.home}/.m2/settings.xml. 27 | 28 | NOTE: This location can be overridden with the CLI option: 29 | 30 | -s /path/to/user/settings.xml 31 | 32 | 2. Global Level. This settings.xml file provides configuration for all Maven 33 | users on a machine (assuming they're all using the same Maven 34 | installation). It's normally provided in 35 | ${maven.conf}/settings.xml. 36 | 37 | NOTE: This location can be overridden with the CLI option: 38 | 39 | -gs /path/to/global/settings.xml 40 | 41 | The sections in this sample file are intended to give you a running start at 42 | getting the most out of your Maven installation. Where appropriate, the default 43 | values (values used when the setting is not specified) are provided. 44 | 45 |--> 46<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 47 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 48 xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> 49 <!-- localRepository 50 | The path to the local repository maven will use to store artifacts. 51 | 52 | Default: ${user.home}/.m2/repository 53 <localRepository>/path/to/local/repo</localRepository> 54 --> 55 56 <!-- interactiveMode 57 | This will determine whether maven prompts you when it needs input. If set to false, 58 | maven will use a sensible default value, perhaps based on some other setting, for 59 | the parameter in question. 60 | 61 | Default: true 62 <interactiveMode>true</interactiveMode> 63 --> 64 65 <!-- offline 66 | Determines whether maven should attempt to connect to the network when executing a build. 67 | This will have an effect on artifact downloads, artifact deployment, and others. 68 | 69 | Default: false 70 <offline>false</offline> 71 --> 72 73 <!-- pluginGroups 74 | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e. 75 | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers 76 | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list. 77 |--> 78 <pluginGroups> 79 <!-- pluginGroup 80 | Specifies a further group identifier to use for plugin lookup. 81 <pluginGroup>com.your.plugins</pluginGroup> 82 --> 83 </pluginGroups> 84 85 <!-- proxies 86 | This is a list of proxies which can be used on this machine to connect to the network. 87 | Unless otherwise specified (by system property or command-line switch), the first proxy 88 | specification in this list marked as active will be used. 89 |--> 90 <proxies> 91 92 【省略・・・】 93 94
あなたの回答
tips
プレビュー