1. Nexus 다운로드
- Nexus 홈페이지에서 다운로드하기
- 전자정부 프레임워크에서 다운로드하기
전자정부 프레임워크를 사용하면 전자정부 홈페이지에서 다운로드할 수 있다. 전자정부 홈페이지에 들어가 원하는 버전의 서버용 개발환경 다운로드를 클릭하면 eGovCI 파일을 다운로드할 수 있다.
2. Nexus 서버 구동
압축 해제 후 start-nexus라는 windows 배치 파일을 관리자 권한으로 실행해 주자.
3. Nexus Repository Maven 설정
http://127.0.0.1:8081/nexus/
초기 아이디 : admin
초기 비밀번호 : admin123
- Nexus Maven 라이브러리 설정
Central repository의 configuration -> remote repository access -> download remote indexes 값 false -> true로 변경 후 save 버튼 클릭
4. Eclipse 설정
외부망에서 Nexus 설치와 구동이 끝났으면 이제 내부망(폐쇄망) 환경에서 개발툴의 maven 설정만 해주면 된다.
- settings.xml 설정
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<name>Local nexus repository</name>
<url>http://xxx.xxx.x.xxx:8081/nexus/content/groups/public</url>
</mirror>
- 프로젝트의 pom.xml 설정
<repositories>
<repository>
<id>public</id>
<url>http://xxx.xxx.x.xxx:8081/nexus/content/groups/public</url> //nexus가 구동중인 외부망 주소
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://xxx.xxx.x.xxx:8081/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
※ 위 설정으로도 안된다면 방화벽 포트 확인이나 Preferences -> maven의 offline모드가 체크 해제 되어 있는지 확인해봐야 한다. maven의 offline모드가 체크되어 있다면 인터넷 연결이 불가능해 당연히 못 가져온다.
댓글