728x90
반응형
mvn package 실행시 자바컴파일이 실패되면서 jdk 1.6이상으로 사용하라고 에러 메세지 발생
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.683 s
[INFO] Finished at: 2022-01-07T17:41:38+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project swt-play: Compilation failure: Compilation failure:
[ERROR] error: Source option 5 is no longer supported. Use 6 or later.
[ERROR] error: Target option 1.5 is no longer supported. Use 1.6 or later.
[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/MojoFailureException
이클립스 JRE 설정을 11버전으로 변경, pom.xml 설정에서 maven-compiler-plugin 설정을 변경하여도 해결이 안된다.
해결방법은 간단하다.
pom.xml 에서 maven.compiler.source, maven.compiler.target 속성을 지정해주면 된다.
<properties>
<java.version>11</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<swt.version>4.3</swt.version>
<swt.mainclass>com.wyleedp.swt.play.AppLauncher</swt.mainclass>
</properties>
메이븐에서 자바 컴파일을 실행할때 기본값이 1.5로 설정되어 있어 발생되는 사항으로 파악된다.
728x90
반응형
'개발' 카테고리의 다른 글
아파치 톰캣(Apache Tomcat) 9.0.62 다운로드 및 설치방법(윈도우11) (2) | 2022.04.04 |
---|---|
[젠킨스] 윈도우 10 환경에서 접속포트 변경하는 방법 (0) | 2022.02.11 |
[GitLap] STS를 이용하여 Java/Maven 프로젝트 시작하기 (0) | 2021.05.16 |
[GitLab] 윈도우 개발환경에서 SSH Key 등록하기 (0) | 2021.05.07 |
GitLab CE를 리눅스(Redhat/CentOS)에 설치하는 방법 (0) | 2021.04.25 |