#19 Maven 개발 환경 셋팅 (로컬 Nexus 사용시)
star
Tasks
프로젝트 pom.xml에 참조할 nexus와 배포할 nexus를 셋팅#
- 주의:
id
는 ~/.m2/settings.xml server별 id, username, password 설정의 id와 동일하게 정의 해야함.
<repositories>
<repository>
<id>nexus</id>
<name>maven-public</name>
<layout>default</layout>
<url>http://localhost:48183/repository/maven-public</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>nexus</id>
<name>Releases</name>
<url>hhttp://localhost:48183/repository/maven-releases</url>
</repository>
<snapshotRepository>
<id>nexus</id>
<name>Snapshot</name>
<url>hhttp://localhost:48183/repository/maven-snapshots</url>
</snapshotRepository>
</distributionManagement>
~/.m2/settings.xml#
<servers>
<!--// pom.xml에서 사용하는 id에 대한 nexus계정 username, password 설정 //-->
<server>
<id>nexus</id>
<username>test</username>
<password>test1234</password>
</server>
<!--// nexus계정 username, password 으로 "central" 이라는 id를 추가로 설정 //-->
<server>
<id>central</id>
<username>test</username>
<password>test1234</password>
</server>
</servers>
<!--// central에 대한 미러 서버 정보를 추가 설정 //-->
<mirrors>
<mirror>
<id>central</id>
<name>central</name>
<url>http://localhost:48183/repository/maven-public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>maven-default-http-blocker</id>
<url>http://0.0.0.0/</url>
<mirrorOf>external:dot-match-anything-mate:*</mirrorOf>
<blocked>false</blocked>
</mirror>
</mirrors>
Comment 0
Add a comment
Comment 0