기존에 연결해뒀던 javaprj의 target 폴더를 들어가보면 pom.xml 파일이 있을 것이다.
해당 파일을 열고 하단의 pom.xml 탭을 열자.
</dependencies>
아래에
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
이렇게 써주자.
이 뜻은 JDK 컴파일러 버전을 1.8로 하겠다는 의미이다.
또 다른 방법은
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
이라고 쓰는 건데, 이게 더 편하니 나는 이것을 사용하려고 한다.
'개발공부 > Maven' 카테고리의 다른 글
8. 라이브러리 오류 (0) | 2022.01.16 |
---|---|
7. 웹 프로젝트로 변경 및 라이브러리 설정 (0) | 2022.01.16 |
5. 이클립스 IDE로 Maven 프로젝트 임포트하기 (0) | 2022.01.16 |
4. Maven - Build LifeCycle, Phase (0) | 2022.01.15 |
3. Maven 컴파일과 실행하기 (0) | 2022.01.15 |