00059 20081111 Maven m2eclipse 설치 하기 - doortts/blog GitHub Wiki
number: 59
id: 408
title: Maven + m2eclipse 설치 하기
type: BOARD_POST
author:
loginId: doortts
name: doortts
email: [email protected]
createdAt: '2008-11-11T23:47:39+0900'
updatedAt: '2008-11-11T23:47:39+0900'
owner: doortts
projectName: blog
attachments:
- id: 775
name: zrclip_010n5e65c383.png
hash: d1abd03cf7a8b5faf256da486ca22550c6114756
containerType: BOARD_POST
mimeType: image/png
size: 5814
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 776
name: zrclip_019paf8ec5e.png
hash: c1920fb1eb18990e28182eb6134ec78024ec0484
containerType: BOARD_POST
mimeType: image/png
size: 14136
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 777
name: zrclip_023p78b70f76.png
hash: b31632bad2532023f266cf943dea3103facecd32
containerType: BOARD_POST
mimeType: image/png
size: 12768
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 778
name: zrclip_009n7c8aab3e.png
hash: b59000091a5bc525c1343b7ee01404de7273c1c2
containerType: BOARD_POST
mimeType: image/png
size: 17841
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 779
name: zrclip_003p135a31f6.png
hash: 927b5c6e00a9491585952fb45281f3809d75fa3e
containerType: BOARD_POST
mimeType: image/png
size: 18297
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 780
name: zrclip_006n287ab6f8.png
hash: 1948810d8d76903f9303877fd46a97783d561f79
containerType: BOARD_POST
mimeType: image/png
size: 14649
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 781
name: zrclip_005p79348c18.png
hash: 179ece7fcb99d6d7c567f2629b4d6501082e705a
containerType: BOARD_POST
mimeType: image/png
size: 12882
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 782
name: zrclip_002p38aa0822.png
hash: 336e93642822771c9cd23c5cf1d00d85f76b0df2
containerType: BOARD_POST
mimeType: image/png
size: 18126
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 783
name: zrclip_007p6dc200c9.png
hash: 715323dfc5356d02a5e2784af94b5c86c56c7992
containerType: BOARD_POST
mimeType: image/png
size: 15219
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 784
name: zrclip_022p331e0b23.png
hash: 6f2dcab3db63df738105e4c11de6b5812557de23
containerType: BOARD_POST
mimeType: image/png
size: 18126
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 785
name: zrclip_031n78aa0cbd.png
hash: 7e25d2b57d4629175ae747600085cd6053cb7893
containerType: BOARD_POST
mimeType: image/png
size: 1938
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 786
name: zrclip_030p77f8178d.png
hash: f6ea63e3918cf855e1d830f889ad116ce3e54d7e
containerType: BOARD_POST
mimeType: image/png
size: 8778
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 787
name: zrclip_015n8c381f9.png
hash: f0f8a26d91ea977b8f0eaf14bb0b7ab05582240b
containerType: BOARD_POST
mimeType: image/png
size: 15789
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 788
name: zrclip_012n53080ac7.png
hash: dd50aff7c597c570a036a4010db796b863f1fa8e
containerType: BOARD_POST
mimeType: image/png
size: 16644
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 789
name: zrclip_013p463cb981.png
hash: ad14bc047ebf64a7f81b9cc3369381078b207460
containerType: BOARD_POST
mimeType: image/png
size: 12711
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 790
name: zrclip_021n39642bbf.png
hash: 6d69ef7d90c0e2a0bc5b5f5584db0cb1d22a9985
containerType: BOARD_POST
mimeType: image/png
size: 36765
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 791
name: zrclip_001n315983ce.png
hash: ce04eaa5ed5b39bd2b9ee2ce9d9d53d0b946d978
containerType: BOARD_POST
mimeType: image/png
size: 78489
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 792
name: zrclip_027n67a02154.png
hash: 75d5e179f24086b66af5a221d71cc60903223578
containerType: BOARD_POST
mimeType: image/png
size: 23712
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 793
name: zrclip_016n2cd30614.png
hash: ef1b1320e6f178f6c7b5a410f7cbd3b1cb96ae57
containerType: BOARD_POST
mimeType: image/png
size: 23541
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 794
name: zrclip_028n6409f02.png
hash: 3307a6d03b657521261f61a1a3796d452f8ae527
containerType: BOARD_POST
mimeType: image/png
size: 11286
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 795
name: zrclip_032n2e1ec4f3.png
hash: e9f4b81de28b6dc53cf15c90aec6c1e52e3ee853
containerType: BOARD_POST
mimeType: image/png
size: 8949
containerId: '408'
createdDate: 1479184938000
ownerLoginId: doortts
- id: 797
name: zrclip_033p235872ff.png
hash: 9c03c326cf4ce3d493c928cf8d28be5db738b5f5
containerType: BOARD_POST
mimeType: image/png
size: 1140
containerId: '408'
createdDate: 1479184939000
ownerLoginId: doortts
- id: 800
name: zrclip_035p5447b371.png
hash: 30b8e12c457e3fb1c6021f9fde2efa0356ab9c66
containerType: BOARD_POST
mimeType: image/png
size: 13851
containerId: '408'
createdDate: 1479184939000
ownerLoginId: doortts
- id: 801
name: zrclip_034n175c398d.png
hash: 1d448f7d284f880a56fed8970a874ff160221872
containerType: BOARD_POST
mimeType: image/png
size: 15504
containerId: '408'
createdDate: 1479184939000
ownerLoginId: doortts
- id: 802
name: zrclip_037p2ab8fd67.png
hash: 1853af5e21cd0b86e10dc0b61893b315de19709b
containerType: BOARD_POST
mimeType: image/png
size: 21945
containerId: '408'
createdDate: 1479184939000
ownerLoginId: doortts
- id: 803
name: zrclip_038pc3b1fa0.png
hash: b84697b0867581610fd0b454d1bceba57b051f6b
containerType: BOARD_POST
mimeType: image/png
size: 5871
containerId: '408'
createdDate: 1479184939000
ownerLoginId: doortts
- id: 808
name: zrclip_029n55bc2094.png
hash: 5342076bda507a63b1e1b5423b0c5af507c5b4fb
containerType: BOARD_POST
mimeType: image/png
size: 21318
containerId: '408'
createdDate: 1479184939000
ownerLoginId: doortts
doortts | 2008-11-11 화요일 오후 11:47 | Better SW Development | 원본
Maven + m2eclipse 설치 하기
Maven 설치하기
})
메이븐 사이트(maven.apache.org) 접속
})
})
압축파일을 적당한 폴더에 푼다.
})
PATH에 환경 변수로 JAVA_HOME과 M2_HOME 을 잡아준다.
})
그 다음엔 PATH 에 %M2_HOME%\bin 을 추가
cmd 창에서 mvn -version 을 통해 확인한다.
})
이제 테스트 프로젝트를 한 번 만들어 보자.
적당한 디렉터리로 이동. (참고로 전 d:\development 로 이동했습니다)
})
http://maven.apache.org/guides/mini/guide-creating-archetypes.html
프로젝트 생성 명령어의 축약형은 위와 같습니다. 전, 제 마음대로 아래와 같이 타이핑 하였습니다.
mvn archetype:create -DgroupId=com.doortts.maventest -DartifactId=maventest
})
이후 필요한 파일들을 maven central repository 로 부터 내려 받습니다. (대략 100년쯤 걸립니다...)
멍하니 있지 말고 남는 시간을 이용해 eclipse 용 플러그인 m2eclipse 를 설치해 봅니다.
m2eclipse 설치하기
})
})
다음 주소를 이클립스 업데이트 사이트로 등록해야 한다.
http://m2eclipse.sonatype.org/update/
})
})
})
사이트가 추가되었으면 필요한 만큼 선택 후 Install 버튼 클릭. 이후 계속 진행.
인스톨 완료 후 이클립스 재시작
})
경고 메시지 확인
})
이클립스 설정 선택
})
필터에 jre 라고 타이핑
})
})
디렉터리를 선택해서 JDK 가 설치된 곳을 선택하여 JRE 위치가 변경되는 것을 확인한다.
})
바로가기를 만들어서 -vm %JAVA_HOME%\bin\ 를 대상에 추가
다시 이클립스를 재 실행하여서 다른 경고 메시지가 없는지 확인한다.
다시 이제 아까의 cmd 창을 보면 대략 완료 되었을 겁니다.
})
})
pom.xml 도 열어보고, 하위 폴더로 이동해서 구조를 살펴봅니다.
})
이클립스에서 프로젝트로 읽어 들일수 있도록 아래와 같이 타이핑 합니다.
})
메이븐 기본 문법은 "mvn 플러그인이름:목표" 이며 각각 plugin과 goal 이라고 부릅니다. 플로그인 이름과 골 이름을 같이 쓰는건 해당 플러그인의 Default Action 을 의미합니다.
})
다시 보면 이클립스에서 import 할 수 있도록 파일이 두 개 더 생긴걸 볼 수 있습니다.
})
이클립스에서 Existing Projects into workspace 를 선택하고 Next
})
Browse를 선택해서 좀전에 생긴 폴더를 선택하고 Finish !!
})
패키지 익스플로러에 정상적으로 생성된것을 확인하면 최종 완료 입니다!! (^_^)/