본문 바로가기

개발관련/웹개발

메이븐 사용시 자주쓰는 명령어들


====== .m2폴더에 만든 프로젝트 설치(install) ======

pom.xml파일이 있는 폴더로 이동

>> mvn install


====== 프로젝트의 target/target-classes 폴더 삭제하기 ======

pom.xml파일이 있는 폴더로 이동

>> mvn clean


====== 원격 저장소(리포지토리 : nexus) 에 배포 ======

pom.xml 파일이 있는 폴더로 이동

>> mvn deploy

 


====== 이클립스 웹프로젝트로 변환하기 ======

메이븐프로젝트 만든후 웹프로젝트로 인식을 못할 때 이클립스 웹프로젝트로 인식시켜주기

 pom.xml 파일이 있는 폴더 까지 이동

>> mvn eclipse:eclipse -Dwtpversion=2.0


====== 카테고리 파일 생성하기 ======

m2eclipse에서 인식가능하도록 archetype-category.xml 파일을 생성해줌

 .m2 폴더로 이동

>> mvn archetype:crawl


====== 아키타입프로젝트 만들기 ======

> 아래꺼 전부 한줄로 써야됨


mvn archetype:create
-DarchetypeGroupId=org.apache.maven.archetypes
-DarchetypeArtifactId=maven-archetype-archetype
-DarchetypeVersion=1.0
-DgroupId=[그룹]
-DartifactId=[프로젝트명]