yum -y install docker
複製代碼
service docker start
docker search nexus
docker pull docker.io/sonatype/nexus
複製代碼
run
就能夠找到如何啓動 複製代碼
admin admin123
複製代碼
* setting.xml設置
複製代碼
* pom文件設置複製代碼
複製代碼
<repositories>
<repository>
<id>nexus</id>
<name>Team Nexus Repository</name>
<url>http://nexus.jetbrains.org.cn/nexus/content/groups/public</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>Team Nexus Repository</name>
<url>http://nexus.jetbrains.org.cn/nexus/content/groups/public</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>複製代碼
複製代碼
<distributionManagement>
<repository>
<id>releases</id>
<name>Nexus Release Repository</name>
<url>http://nexus.jetbrains.org.cn/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>Nexus Snapshot Repository</name>
<url>http://nexus.jetbrains.org.cn/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>複製代碼
備註: pom中上傳的設置id要與maven setting中的id保持一致。複製代碼
-SNAPSHOT
的都會上傳到snaoshots庫。 若是以爲中央倉庫慢的話,能夠用個人私服 只須要配置 repositories
標籤中的內容,下載
依賴, distributionManagement
標籤中的內容爲 上傳
, 無需配置,也不對外開放上傳權限。docker