반응형
필자는 Oracle JDK로 build할때는 문제가 없었으나 Open JDK로 build path를 변경하니 이 오류가 발생했습니다.
방법은 아래와 같이 두 가지가 있는데 두 가지 방법 모두 eclipse, intellij에서 build할때는 상관없지만 jenkins로 build할 때 2번 방법은 빌드가 되지 않습니다.
방법 1. pom.xml에 추가
<properties>
<webapp.lib>${basedir}/src/main/webapp/WEB-INF/lib</webapp.lib>
</properties>
<repositories>
<dependency>
<groupId>whatever</groupId>
<artifactId>esapi</artifactId>
<version>whatever</version>
<scope>system</scope>
<systemPath>${webapp.lib}/esapi-2.1.0.1.jar</systemPath>
</dependency>
<dependency>
<groupId>whatever</groupId>
<artifactId>jxl</artifactId>
<version>whatever</version>
<scope>system</scope>
<systemPath>${webapp.lib}/jxl.jar</systemPath>
</dependency>
</repositories>
방법 2. JRE System Library에 외부 라이브러리를 추가
- 프로젝트에서 마우스 오른쪽 클릭 > Build Path > Libraries로 이동
- JRE System Library 더블클릭
- Alternate JRE에서 java 선택 후 Installed JREs... 버튼 클릭
- Java 선택 후 Edit... 버튼 클릭
- Add External Jars... 버튼 클릭 후 필요한 jar 파일 추가
728x90
반응형