maven 빌드에 CheckStyle 과 PMD 같은 분석툴을 붙이다보니 pom.xml 이 지저분해지고 있다.

특히 RuleSet을 지정해야 하는 경우에 pom.xml 자체에 경로가 들어가게 되어 추후에 수정이 복잡할 거다.

이럴 때 위의 사항에서 5번 케이스를 적용하면 된다.

properties 태그에 해당 태그를 추가해서 ${ }로 불러다가 쓰면 좋다.

업데이트 해야될 내용이 properties에 모여 있으면, 탐색해서 수정하기 편할 것 같다.

<properties>
  <checkStyleRuleSet>${basedir}/CheckStyle_RuleSet_090512.xml</checkStyleRuleSet>
</properties>


이렇게 정해주면, pom.xml 내 어디서든지 ${checkStyleRuleSet} 으로 value를 호출하여 사용할 수 있다.


출처 : http://maven.apache.org/pom.html#Properties
2009/07/01 19:05 2009/07/01 19:05
Posted by freeism

트랙백 주소 :: http://www.freeism.co.kr/tc/trackback/573

댓글을 달아 주세요

이전페이지 1 ... 83 84 85 86 87 88 89 90 91 ... 181 다음페이지
사이드바 열기