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.basedir | The directory that the current project resides in. |
project.baseUri | The directory that the current project resides in, represented as an URI. Since Maven 2.1.0 |
maven.build.timestamp | The timestamp that denotes the start of the build. Since Maven 2.1.0-M1 |