inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

예제로 배우는 스프링 입문 (개정판)

프로젝트 설정

maven plugin 에러 해결 도와주세요.

2208

tobe1205

작성한 질문수 1

0

[ERROR] Failed to execute goal io.spring.javaformat:spring-javaformat-maven-plugin:0.0.31:validate (default) on project spring-petclinic: Execution default

 of goal io.spring.javaformat:spring-javaformat-maven-plugin:0.0.31:validate failed: An API incompatibility was encountered while executing io.spring.javaf

ormat:spring-javaformat-maven-plugin:0.0.31:validate: java.lang.UnsupportedClassVersionError: io/spring/javaformat/eclipse/jdt/jdk11/internal/formatter/Def

aultCodeFormatter has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognize

s class file versions up to 52.0

[ERROR] -----------------------------------------------------

[ERROR] realm =    plugin>io.spring.javaformat:spring-javaformat-maven-plugin:0.0.31

[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

[ERROR] urls[0] = file:/C:/Users/Gunwoo/.m2/repository/io/spring/javaformat/spring-javaformat-maven-plugin/0.0.31/spring-javaformat-maven-plugin-0.0.31.jar

[ERROR] urls[1] = file:/C:/Users/Gunwoo/.m2/repository/io/spring/javaformat/spring-javaformat-formatter/0.0.31/spring-javaformat-formatter-0.0.31.jar

[ERROR] urls[2] = file:/C:/Users/Gunwoo/.m2/repository/io/spring/javaformat/spring-javaformat-config/0.0.31/spring-javaformat-config-0.0.31.jar

[ERROR] urls[3] = file:/C:/Users/Gunwoo/.m2/repository/io/spring/javaformat/spring-javaformat-formatter-eclipse-jdt-jdk8/0.0.31/spring-javaformat-formatter

-eclipse-jdt-jdk8-0.0.31.jar

[ERROR] urls[4] = file:/C:/Users/Gunwoo/.m2/repository/io/spring/javaformat/spring-javaformat-formatter-eclipse-jdt-jdk11/0.0.31/spring-javaformat-formatte

r-eclipse-jdt-jdk11-0.0.31.jar

[ERROR] urls[5] = file:/C:/Users/Gunwoo/.m2/repository/io/spring/javaformat/spring-javaformat-formatter-eclipse-runtime/0.0.31/spring-javaformat-formatter-

eclipse-runtime-0.0.31.jar

[ERROR] urls[6] = file:/C:/Users/Gunwoo/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.24/plexus-utils-3.0.24.jar

[ERROR] urls[7] = file:/C:/Users/Gunwoo/.m2/repository/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar

[ERROR] urls[8] = file:/C:/Users/Gunwoo/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar

[ERROR] urls[9] = file:/C:/Users/Gunwoo/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.3/org.eclipse.sisu.inject-0.3.3.jar

[ERROR] urls[10] = file:/C:/Users/Gunwoo/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar

[ERROR] Number of foreign imports: 1

[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

[ERROR]

[ERROR] -----------------------------------------------------

[ERROR]

[ERROR] -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

이런식으로 플러그인 에러가 나고있습니다. ㅠㅠ..현재 java8버전을 사용하고있는데 11이상버전으로 해야하는걸까요?..

spring java

답변 4

2

안준우

해결하셨지만 혹시 이 링크를 타고 들어오시는분들위해 설명드립니다!

올려주신 에러 부분 4번째 문단에 보면 아래와 같이 되어 있습니다.

aultCodeFormatter has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognize

s class file versions up to 52.0

대충 번역하자면 자바 런타임 버전 55가 필요한데 지금 당신의 버전은 52다 라는 의미입니다.

자바는 버전별로 major version 번호라는게 있는데

자바 1.2 = 46

자바 1.3 = 47

...

자바 8 = 52

자바 9 =53

자바 10 = 54

자바 11 = 55

위와 같은 식입니다.

따라서 필요한 건 자바11인데 현재 자바8 을 사용하셔서 생기는 문제이고, 자바11을 사용하시면 해결됩니다.!

현재 자신의 자바버전 확인하는 법은

인텔리제이 하단의 'Terminal' 쪽으로 가셔서 콘솔창에 java -version 이라고 입력하셨을때

openjdk version "1.8 ~~~~~" 이런식으로 나오면 자바8인거고

openjdk version "11.0.~~~~" 이런식으로나오면 자바11인겁니다.

따라서 자바11 설치하시고 콘솔창에 java -version 입력을 통해 확실히 바꾸고 나시면 해결하실 수 있을겁니다.

 

1

존오비미켈

23년 3월 기준 자바 17버전 이상에서 동작한다고 pet clinic 깃허브 readme에 되어있네요.

Petclinic is a Spring Boot application built using Maven or Gradle. You can build a jar file and run it from the command line (it should work just as well with Java 17 or newer):

1

gon023415

잘모르겠지만 최근에 의존성문제로 jdk를 11에서 17로 바꾸니까 빌드되는 현상도있네요? 저도 잘 참고햇습니다

0

tobe1205

해결완료했습니다..ㅜㅜ!

0

이호준

혹시 어떻게 해결하셨는지 공유좀 부탁드려도 될까요?

0

dog3218

저도 궁금한데 답변 가능한가요?

jar 안되는 분들 참고하세요

0

377

1

mvnw 오류

0

483

1

./mvnw package 오류

0

440

2

java -jar target/*.jar 명령어 오류..

0

457

2

./mvnw package 오류

0

284

0

./mvnw package 오류

0

222

1

실행 상태에서 변경내용이 바로 반영되나요 ??

0

232

1

도와주세용 ㅜㅜ

0

216

1

./mvnw package 오류

0

326

1

클론 받은 내용과 수업내용이

0

405

1

./mvnw package 오류

0

1155

2

순환참조와 bean 주입에 대한 질문입니다!

0

414

1

jdk 버전이 자꾸 낮다면서 오류가 발생합니다.

0

899

1

age가 화면에 표시가 안됩니다.

0

399

0

에러가 뜨는데 어떻게 해야할지 도저히 모르겠어요

0

1646

1

PetClinicApplication() 함수에서 run 을 하고 싶습니다...

0

522

0

h2와 hsqldb가 어떤차이가 있는건지 궁금합니다

0

1255

0

예제가 이전과 다르네요

0

373

0

메이븐으로 설정했는데 그래들이 같이 보일수 있나요?

0

582

1

LogAspect

0

329

1

구현체가 2개 이상일때 생성자 주입

0

371

1

의존성 주입 방법들 장단점

0

495

1

인스턴스의 생명주기와 제어권

0

314

1

IoC 컨테이너 안에 있는 객체들끼리만 의존성 주입

0

374

1