d:\projects\test
ex)
<groupId>com.max.sample</groupId>
<artifactId>sample-max</artifactId>
<version>1.0.0.M1</version>
2) archetype create 로 템플릿 프로젝트 생성하기
mvn archetype:create-from-project
ex)
<groupId>com.max.sample</groupId>
<artifactId>sample-max-archetype</artifactId>
<version>1.0.0.M1</version>
3) install 로 local repository에 등록하기
mvn clean install
4) archetype generate 로 템플릿 가져오기, (적당한 위치에...)
mvn archetype:generate -DarchetypeGroupId=com.max.sample -DarchetypeArtifactId=sample-max-archetype -DarchetypeVersion=1.0.0.M1
아래와 같은 대화창에 정보를 입력한다.
Define value for property 'groupId': : net.max.test
Define value for property 'artifactId': : max-test
Define value for property 'version': 1.0-SNAPSHOT: : 1.0.0-SNAPSHOT
Define value for property 'package': net.max.test: : <Enter> or net.max.test.sample
...
...
5) Test 확인
- IDE에서 import하고, 예제 Unit Test를 돌려서 확인한다.
덤)
- 만약 원격 저장소에 넣고 싶다면, 3)에서 deploy 하고, 4)에서 -DremoteRepositories={repository url} 을 추가 하면 된다.
- 4)번 명령어가 복잡하다면, mvn archetype:generate -DarchetypeCatalog=local 로 단순하게 할수도있다.
'개발관련' 카테고리의 다른 글
Spring-Test-MVC 및 @Enable 활용방법 세미나 감상문 (0) | 2012.02.23 |
---|---|
Spring Roo Multi Project 예시 (module CLI) (1) | 2011.12.21 |
maven3 archetype 예시 (0) | 2011.11.15 |
Spring Roo에 대한 오해(2) : 생산성이 극대화 된다(?) (0) | 2011.10.17 |
Spring Roo에 대한 오해(1) : 단순한 프로젝트만 가능하다? (0) | 2011.10.11 |
ContentNegotiatingViewResolver + AbstractExcelView 예제 (1) | 2011.09.22 |
댓글을 달아 주세요