728x90
반응형

system scope를 가진 dependency 를 pom.xml 에 추가하면서 systemPath 를 설정해야 했는데, 절대경로가 들어가서, 개발자마다 workspace 가 틀리면 문제가 된다.


               <dependency>

<groupId>log4sql</groupId>

<artifactId>log4sql</artifactId>

<version>0.0.1-SNAPSHOT</version>

<scope>system</scope>

<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/log4sql.jar</systemPath>

</dependency>


위와 같이, ${project.basedir} 라는 환경변수를 사용하면 무척 편하다.


[참고] http://maven.apache.org/guides/introduction/introduction-to-the-pom.html


Special Variables
project.basedirThe directory that the current project resides in.
project.baseUriThe directory that the current project resides in, represented as an URI. Since Maven 2.1.0
maven.build.timestampThe timestamp that denotes the start of the build. Since Maven 2.1.0-M1



출처: http://bryan7.tistory.com/115 [민서네집]

728x90
반응형
블로그 이미지

nineDeveloper

안녕하세요 현직 개발자 입니다 ~ 빠르게 변화하는 세상에 뒤쳐지지 않도록 우리모두 열심히 공부합시다 ~! 개발공부는 넘나 재미있는 것~!

,