pom.xml 첫줄 에러 & <parent> 에러 해결 방법 입니다.
원인 : Eclipse에서 나타는 버그로 maven이 jar을 다운 받으면서 도중에 꼬인 것이라고 한다.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>egovframework.msa.sample</groupId>
<artifactId>Catalogs</artifactId>
<version>1.0.0</version>
<name>Catalogs</name>
<description>MSA Sample Project</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
1. 프로젝트 우클릭 Run As -> Maven install
2. 프로젝트 우클릭 Maven -> Update Project
3.pom.xml 수정
<properties>
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
<java.version>1.8</java.version>
</properties>
properties에 <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version> 추가
3번 수정 하시고 에러 뜨시면 1 or 2번 다시 해봅시다
'springboot' 카테고리의 다른 글
스프링부트 설치하기 (0) | 2022.08.25 |
---|