最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

nexus服務(wù)器搭建的詳細(xì)步驟

 更新時(shí)間:2018年09月17日 11:54:15   作者:一個(gè)CD包  
這篇文章主要介紹了nexus服務(wù)器搭建的詳細(xì)步驟,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧

一、搭建nexus服務(wù)的意義

作為內(nèi)網(wǎng)的統(tǒng)一代理,團(tuán)隊(duì)合作開(kāi)發(fā)時(shí)不用每人都去外網(wǎng)下載一次;

解決部分變態(tài)公司內(nèi)網(wǎng)管制無(wú)法訪問(wèn)外網(wǎng)的問(wèn)題,選一臺(tái)有外網(wǎng)權(quán)限的機(jī)器搭建服務(wù)器,其余人直接內(nèi)網(wǎng)訪問(wèn)此服務(wù);

團(tuán)隊(duì)合作開(kāi)發(fā)時(shí)解決maven項(xiàng)目依賴(lài)問(wèn)題;

二、安裝nexus

# 下載安裝包:
wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.14.4-03-bundle.tar.gz

# 解壓
mkdir /data/apps
cd /data/apps
tar -zxvf ~/nexus-2.14.4-03-bundle.tar.gz

三、配置nexus

編輯配置文件:vim conf/nexus.properties

# Jetty section
application-port=8081   # 訪問(wèn)端口
application-host=0.0.0.0  # 綁定IP
nexus-webapp=${bundleBasedir}/nexus  # 指定nexus程序目錄
nexus-webapp-context-path=/nexus   # 指定訪問(wèn)的二組目錄

# Nexus section
nexus-work=${bundleBasedir}/../sonatype-work/nexus
runtime=${bundleBasedir}/nexus/WEB-INF

以上都是默認(rèn)配置,對(duì)應(yīng)的訪問(wèn)地址為: http://x.x.x.x:8081/nexus

如果要改為http://x.x.x.x:8081,則修改nexus-webapp-context-path=/即可

四、啟動(dòng)nexus

啟動(dòng)腳本:bin/nexus

# 啟動(dòng)腳本有如下參數(shù)可選
[root@ci-gitlab nexus-2.14.4-03]# bin/nexus
Usage: ./nexus { console | start | stop | restart | status | dump }

注意:nexus采用wrapper做為WEB容器,nexus只是shell腳本,最終會(huì)調(diào)用jsw目錄下對(duì)應(yīng)平臺(tái)中的wrapper二進(jìn)制文件

五、管理nexus

1. 默認(rèn)的用戶(hù):

admin/admin123 
deployment/deployment123

2. 修改用戶(hù)信息

admin登陸后,點(diǎn)擊左側(cè)【Security–Users】,在列表中選擇用戶(hù),右鍵可更改密碼和重圍密碼, 底部表格中可修改用戶(hù)其余信息

六、在項(xiàng)目中使用nexus

1. 作為插件庫(kù)

點(diǎn)擊左側(cè)【Views/Repositories–Repositories】,選擇【Public Repositories】,復(fù)制其Repository Path字段
編輯pom.xml文件,添加如下段:

<!-- 設(shè)定主倉(cāng)庫(kù),按設(shè)定順序進(jìn)行查找。 -->
<!-- 設(shè)定主倉(cāng)庫(kù),按設(shè)定順序進(jìn)行查找。 -->
  <repositories>
    <repository>
      <id>releases</id>
      <name>Team Nexus Repository</name>
      <url>${Repository Path}</url>
    </repository>

    <repository>
      <id>snapshots</id>
      <name>Team Nexus Repository</name>
      <url>${Repository Path}</url>
    </repository>
  </repositories>

2. 作為deploy庫(kù)

點(diǎn)擊左側(cè)【Views/Repositories–Repositories】,選擇【 Release 或 Snapshots】,復(fù)制其Repository Path字段
編輯pom.xml文件,添加如下段:

<!-- 設(shè)定發(fā)布位置,mvn deploy時(shí)用到,不設(shè)置時(shí)會(huì)報(bào)錯(cuò)-->
  <distributionManagement>
    <repository>
      <id>ci-releases</id>
      <name>Gigold Nexus Repository</name>
      <url>http://ci-gitlab:8081/content/repositories/releases</url>
    </repository>
    <snapshotRepository>
      <id>ci-snapshots</id>
      <name>Gigold Nexus Repository</name>
      <url>http://ci-gitlab:8081/content/repositories/snapshots/</url>
    </snapshotRepository>
  </distributionManagement>

注意:不設(shè)置distributionManagement段,執(zhí)行mvn deploy會(huì)報(bào)如下錯(cuò)誤:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project helloworld-a: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論

改则县| 泸西县| 寿光市| 涪陵区| 玛纳斯县| 永康市| 蒙阴县| 尖扎县| 清涧县| 吉首市| 射阳县| 大兴区| 蓬溪县| 沁源县| 当雄县| 桃源县| 清新县| 广昌县| 大连市| 克什克腾旗| 新乡县| 环江| 临江市| 阜南县| 中山市| 晋中市| 汾西县| 惠东县| 阿拉尔市| 安达市| 威远县| 寿光市| 三门县| 平潭县| 峨山| 新源县| 剑阁县| 达孜县| 扶沟县| 彝良县| 宝鸡市|