발생 에러

터미널에서 maven 빌드시 발생한 에러

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project'프로젝트명': Compilation failure<br>
[ERROR] error: release version 1.8 not supported<br>
[ERROR] <br>
[ERROR] -> [Help 1]<br>
[ERROR] <br>
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.<br>
[ERROR] Re-run Maven using the -X switch to enable full debug logging.<br>
[ERROR] <br>
[ERROR] For more information about the errors and possible solutions, please read the following articles:<br>
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException<br><br><br>

해결법

현재 사용중인 자바 버전이, Maven에서 지원하지 않는다는 오류
실제로 프로젝트 작업 중 서버호환 등의 문제로 몇차례 버전변경을 진행했었고, 그 과정 중에 꼬인것으로 추측됐다

자바 버전을 변경해주거나 컴파일 버전 등을 확인하라는 방법이 찾아졌고, JDK 버전은 이미 원하는 버전으로 설정해놨기에 pom.xml에서 컴파일 플러그인이 자바JDK를 잘 지원하는 버전으로 설정되어 있는지 확인해보았다.

확인 결과 플러그인이

<properties>  
  <java.version>1.8</java.version>  
	<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>  
	 <maven.compiler.source>${java.version}</maven.compiler.source>  
	 <maven.compiler.target>${java.version}</maven.compiler.target>  
	 <maven.compiler.release>${java.version}</maven.compiler.release>  
	 <oracle.jdbc.version>21.1.0.0</oracle.jdbc.version>  
</properties>

... 

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-compiler-plugin</artifactId> 
	<configuration> 
		<fork>true</fork> 
		<source>${maven.compiler.source}</source> 
		<target>${maven.compiler.source}</target> 
		<verbose>true</verbose> 
	</configuration> 
</plugin>

이렇게 설정되어있었고 상단에 적힌 <maven.compiler.target>과 하단에 적힌 <target>의 설정값이 상이한것이 확인됐다 따라서 <target>${maven.compiler.source}</target><maven.compiler.target>와 동일하게 <target>${java.version}</target>로 바꾸어 터미널에 다시 mvn tomcat:redeploy 했을 시 잘 배포됨을 확인했다

Updated: