欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

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

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

成都創(chuàng)新互聯(lián)專注于企業(yè)網(wǎng)絡(luò)營銷推廣、網(wǎng)站重做改版、安達網(wǎng)站定制設(shè)計、自適應(yīng)品牌網(wǎng)站建設(shè)、H5頁面制作商城開發(fā)、集團公司官網(wǎng)建設(shè)、成都外貿(mào)網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁設(shè)計等建站業(yè)務(wù),價格優(yōu)惠性價比高,為安達等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。

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

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

團隊合作開發(fā)時解決maven項目依賴問題;

二、安裝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   # 訪問端口
application-host=0.0.0.0  # 綁定IP
nexus-webapp=${bundleBasedir}/nexus  # 指定nexus程序目錄
nexus-webapp-context-path=/nexus   # 指定訪問的二組目錄

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

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

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

四、啟動nexus

啟動腳本:bin/nexus

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

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

五、管理nexus

1. 默認的用戶:

admin/admin123 
deployment/deployment123

2. 修改用戶信息

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

六、在項目中使用nexus

1. 作為插件庫

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

<!-- 設(shè)定主倉庫,按設(shè)定順序進行查找。 -->
<!-- 設(shè)定主倉庫,按設(shè)定順序進行查找。 -->
  <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庫

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

<!-- 設(shè)定發(fā)布位置,mvn deploy時用到,不設(shè)置時會報錯-->
  <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會報如下錯誤:

[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]

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持創(chuàng)新互聯(lián)。

網(wǎng)站名稱:nexus服務(wù)器搭建的詳細步驟
URL標題:http://www.chinadenli.net/article16/gcisgg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制開發(fā)Google標簽優(yōu)化服務(wù)器托管搜索引擎優(yōu)化營銷型網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都定制網(wǎng)站網(wǎng)頁設(shè)計