日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

9.Nexus私服安装配置

發(fā)布時間:2024/9/27 编程问答 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 9.Nexus私服安装配置 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
第一步:下載nexus-webapp-1.9.2.4.war包,然后拷貝到tomcat下的webapps目錄中

第二步:啟動tomcat

第三步:訪問http://localhost:8080/nexus/顯示如下:

?

第四步:點(diǎn)擊右上角“log in??,輸入usernameadminPasswordadmin123登錄

?

?

?

第五步:登錄成功

第六步:點(diǎn)擊Views/RepositoriesRepositories

?

Nexus內(nèi)置倉庫說明:

1Maven Central:該倉庫代理Maven中央倉庫,其策略為Release,因此只會下載和緩存中央倉庫中的發(fā)布版本構(gòu)件。

2Releases:這是一種策略為Release的宿主類型倉庫,用來部署組織內(nèi)部的發(fā)布版本構(gòu)件。

3Snapshots:這是一個策略為Snapshot的宿主類型倉庫,用來部署組織內(nèi)部的快照版本構(gòu)件。

43rd party:這是一個策略為Release的宿主類型倉庫,用來部署無法從公共倉庫獲得的第三方發(fā)布版本構(gòu)件。

5Public Repositories:該倉庫組將上述所有策略為Release的倉庫聚合并通過一致的地址提供服務(wù)。

第七步:創(chuàng)建宿主目錄和代理倉庫

  • Hosted:本地倉庫,通常我們會部署自己的構(gòu)件到這一類型的倉庫。
    • 包括3rd party倉庫,Releases倉庫,Snapshots倉庫
  • Proxy:代理倉庫,它們被用來代理遠(yuǎn)程的公共倉庫,如maven中央倉庫。
  • Group:倉庫組,用來合并多個hosted/proxy倉庫,通常我們配置maven依賴倉庫組。

第八步:創(chuàng)建倉庫組

????????點(diǎn)擊Public Repositories倉庫,在Configurations欄中選取需要合并的倉庫,點(diǎn)擊箭頭加到左邊保存即可

?

第九步:下載Index索引并進(jìn)行構(gòu)建搜索(GAV搜索)

第十步:配置所有構(gòu)建均從私服下載,在~/.m2/setting.xml中配置如下:

<settings>

?<mirrors>

?????????<mirror>

???????????????????<!--此處配置所有的構(gòu)建均從私有倉庫中下載 *代表所有,也可以寫central -->

???????????????????<id>nexus</id>

???????????????????<mirrorOf>*</mirrorOf>

???????????????????<url>http://192.168.1.100:8000/nexus/content/groups/public</url>

?????????</mirror>

?</mirrors>

?<profiles>

?????????<profile>

???????????????????<id>nexus</id>

???????????????????<!—所有請求均通過鏡像 -->

???????????????????<repositories>

????????????????????????????<repository>

?????????????????????????????????????<id>central</id>

?????????????????????????????????????<url>http://central</url>

?????????????????????????????????????<releases><enabled>true</enabled></releases>

?????????????????????????????????? ?<snapshots><enabled>true</enabled></snapshots>

????????????????????????????</repository>

???????????????????</repositories>

???????????????????<pluginRepositories>

????????????????????????????<pluginRepository>

?????????????????????????????????????<id>central</id>

?????????????????????????????????????<url>http://central</url>

?????????????????????????????????????<releases><enabled>true</enabled></releases>

?????????????????????????????????????<snapshots><enabled>true</enabled></snapshots>

????????????????????????????</pluginRepository>

???????????????????</pluginRepositories>

?????????</profile>

?</profiles>

<activeProfiles>

?<!--make the profile active all the time-->

?<activeProfile>nexus</activeProfile>

?</activeProfiles>

?

?

第十一步:部署構(gòu)建到Nexus,包含ReleaseSnapshot在項(xiàng)目根目錄中pom.xml中配置:

<distributionManagement>

????????<repository>

???????????<id>releases</id>

???????????<name>Internal Releases</name>

???????????<url>http://localhost:8000/nexus/content/repositories/releases/</url>

????????</repository>

????????<snapshotRepository>

??????????? <id>snapshots</id>

???????????<name>Internal Snapshots</name>

???????????<url>http://localhost:8000/nexus/content/repositories/snapshots/</url>

????????</snapshotRepository>

?</distributionManagement>

第十二步:Nexus的訪問權(quán)限控制,在~/m2/setting.xml中配置如下:

<!--設(shè)置發(fā)布時的用戶名 -->

?<servers>

???????<server>

?????????????????<id>releases </id>

<username>admin</username>

<password>admin123</password>

</server>

<server>

<id> snapshots </id>

<username>admin</username>

<password>admin123</password>

?</server>

?</servers>

總結(jié)

以上是生活随笔為你收集整理的9.Nexus私服安装配置的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。