Maven 설치 및 설정
주요 기능
다운로드 주소: http://maven.apache.org/download.html
2, maven 설치
JDK:jdk1.5
2.1 D: / software / 와 같은 설치 하고 싶 은 위치 로 maven - 2.0.7 - bin. zip 압축 풀기.
2.2 Maven 시스템 환경 변수 설정, M2HOME=D:/software/maven-2.0.7。
2.3 Maven bin 디 렉 터 리 를 시스템 환경 변수 PATH 에 추가,% M2HOME%\bin。
2.4 Maven 의 설치 확인:
cmd > mvn -version
Maven version 2.0.7 이 설치 되 었 음 을 알려 줍 니 다.
3, Maven 설정
Maven home directory 는 windows 에서 C: \ Documents and Settings \ username \ \. m2 입 니 다.
maven 의 설정 은 세 단계 로 나 눌 수 있 습 니 다:
3.1.project
pom. xml 에 설정 합 니 다.procject configuration 은 현재 procject 에 만 유효 합 니 다.
3.2 .installation
maven 설치 시 설정 합 니 다.
3.3 .user
지정 한 사용자 설정.userconfiguration 은 ${user. home} / m2 / settings. xml 에서 지정 할 수 있 습 니 다.주: 이 파일 은 필수 가 아 닙 니 다. 이 파일 을 찾 을 수 없 을 때 maven 은 기본 설정 을 사용 합 니 다.
이 파일 의 구체 적 인 설정 은 참고 할 수 있 습 니 다. http://maven.apache.org/ref/2.0.4/maven-settings/settings.html
3.4 로 컬 저장 소 설정
로 컬 Repository 의 기본 값 은 ${user. home} /. m2 / reposcory / 입 니 다.user configuration (즉 ${user. home} /. m2 / setting. xml) 에서 로 컬 Repository 를 변경 할 수 있 습 니 다.
설정 은 다음 과 같 습 니 다: < settings > < / settings >
<localRepository>/path/to/local/repo</localRepository>
메모: 로 컬 Repository 는 절대 경로 여야 합 니 다.
3.5 설정 에이전트 maven2.0 , http request 。 user configuration , :
<settings></settings> <proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>www.hc360.com</host>
<port>80</port>
<nonProxyHosts>local.net,some.host.com</nonProxyHosts>
</proxy>
:http://maven.apache.org/guides/mini/guide-proxies.html
3.5 안전 과 배치 설정 project , Repository, <distributionmanagement></distributionmanagement>setting.xml 。 ,
project 。 , server, id, id
project Repository 。
, repository , server element 。
<server>
<id>deploymentRepo</id>
<username>repouser</username>
<password>repopwd</password>
</server>
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
자바 파일 압축 및 압축 풀기파일 의 간단 한 압축 과 압축 해 제 를 실현 하 였 다.주요 테스트 용 에는 급 하 게 쓸 수 있 는 부분 이 있 으 니 불편 한 점 이 있 으 면 아낌없이 가르쳐 주 십시오. 1. 중국어 문 제 를 해 결 했 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.