• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            大龍的博客

            常用鏈接

            統(tǒng)計(jì)

            最新評(píng)論

            安裝Nexus私服

            文章格式不好調(diào),我是現(xiàn)在word里面寫的,貼上來樣式都變了,把原稿提供給大家下載吧,轉(zhuǎn)載的話,請(qǐng)大家提供出處,尊重一下我的勞動(dòng)成果:http://cangzhitao.com/wp-content/uploads/2012/04/Nexus-Install.doc
            1、  下載Nexus:http://www.sonatype.org/downloads/nexus-2.0.3-bundle.tar.gz ,我所下的是帶Web容器的bundle包,解壓后有兩個(gè)目錄nexus-2.0.3為Nexus運(yùn)行時(shí)所需要的文件,sonatype-work包含配置文件、日志文件、倉(cāng)庫(kù)文件等,備份時(shí)我們備份sonatype-work目錄就行了;

            2、  啟動(dòng)Nexus F:\Program Files\nexus-2.0.3\bin\jsw\windows-x86-32\nexus.bat,打開瀏覽器訪問http://localhost:8081/nexus就能看到Nexus界面,默認(rèn)是匿名訪問,管理員默認(rèn)用戶名密碼為admin/admin123;

            3、  用管理員登陸,點(diǎn)擊左邊欄的Views/Repositories中的Repositories,找到Apache Snapshots,將下面的選項(xiàng)卡切換到Configuration,將Download Remote Indexes置為true,同樣將Codehaus Snapshots,Central進(jìn)行相同設(shè)置,保存后,將剛才的三個(gè)倉(cāng)庫(kù),選中repaire index,更新并下載遠(yuǎn)程索引;

            4、  修改<mirror>打開主目錄下的settings.xml,在mirriors節(jié)點(diǎn)下面添加
            <mirror>

            <id>nexus</id>

            <mirrorOf>*</mirrorOf>

            <url>http://localhost:8081/nexus/content/groups/public</url>

            </mirror>

            修改<profiles,在節(jié)點(diǎn)profiles下面添加
            <profile>

            <id>nexus</id>

            <repositories>

            <repository>

            <id>nexus</id>

            <name>Nexus</name>

            <url>http://localhost:8081/nexus/content/groups/public/</url>

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

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

            </repository>

            </repositories>

            <pluginRepositories>

            <pluginRepository>

            <id>nexus</id>

            <name>Nexus</name>

            <url>http://localhost:8081/nexus/content/groups/public/</url>

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

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

            </pluginRepository>

            </pluginRepositories>

            </profile>

            修改<activeProfiles>節(jié)點(diǎn)
            <activeProfiles>

            <activeProfile>nexus</activeProfile>

            </activeProfiles>

            如果要發(fā)布jar包到私服,還需要配置<servers>節(jié)點(diǎn)
            <server>

            <id>releases</id>

            <username>admin</username>

            <password>admin123</password>

            </server>

            <server>

            <id>snapshots</id>

            <username>admin</username>

            <password>admin123</password>

            </server>

            配置完,整個(gè)文件如下(節(jié)省空間,去除了注釋):
            <?xml version=”1.0″ encoding=”UTF-8″?>

            <settings xmlns=”http://maven.apache.org/SETTINGS/1.0.0″

            xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”

            xsi:schemaLocation=”http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd”>

            <pluginGroups>

            </pluginGroups>

            </proxies>

            <servers>

            <server>

            <id>releases</id>

            <username>admin</username>

            <password>admin123</password>

            </server>

            <server>

            <id>snapshots</id>

            <username>admin</username>

            <password>admin123</password>

            </server>

            </servers>

            <mirrors>

            <mirror>

            <id>nexus</id>

            <mirrorOf>*</mirrorOf>

            <url>http://localhost:8081/nexus/content/groups/public</url>

            </mirror>

            </mirrors>

            <profiles>

            <profile>

            <id>nexus</id>

            <repositories>

            <repository>

            <id>nexus</id>

            <name>Nexus</name>

            <url>http://localhost:8081/nexus/content/groups/public/</url>

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

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

            </repository>

            </repositories>

            <pluginRepositories>

            <pluginRepository>

            <id>nexus</id>

            <name>Nexus</name>

            <url>http://localhost:8081/nexus/content/groups/public/</url>

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

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

            </pluginRepository>

            </pluginRepositories>

            </profile>

            </profiles>

            <activeProfiles>

            <activeProfile>nexus</activeProfile>

            </activeProfiles>

            </settings>

            5、  配置完,eclipse首先會(huì)在私服尋找jar包,找不到將回到公共倉(cāng)庫(kù)尋找下載到私服,再下載到本地。如果要發(fā)布jar包到私服,在pom.xml里面加上如下配置:

            <distributionManagement>

            <repository>

            <id>releases</id>

            <name>Nexus Releases Respository</name>

            <url>http://localhost:8081/nexus/content/repositories/releases</url>

            </repository>

            <snapshotRepository>

            <id>snapshots</id>

            <name>Nexus Snapshots Repository</name>

            <url>http://localhost:8081/nexus/content/repositories/snapshots</url>

            </snapshotRepository>

            </distributionManagement>

            maven在項(xiàng)目執(zhí)行clean deploy命令時(shí),將會(huì)部署到私服對(duì)應(yīng)的Releases或Snapshots倉(cāng)庫(kù)

            6、  Nexus的3rd party可以讓我們直接上傳jar包到私服,選擇3rd party倉(cāng)庫(kù),點(diǎn)擊Artifact Upload選項(xiàng)卡,選擇GAV Parameters,填入相關(guān)jar包版本信息,選中上傳后,即可以在maven使用上傳的jar包

            posted on 2012-08-24 02:05 大龍 閱讀(961) 評(píng)論(1)  編輯 收藏 引用

            評(píng)論

            # re: 安裝Nexus私服 2016-08-15 18:24 做有為青年

            謝謝博主。我剛學(xué)搭建nexus,挺不錯(cuò)的。  回復(fù)  更多評(píng)論   


            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            91久久精品国产91性色也| 武侠古典久久婷婷狼人伊人| 精品久久综合1区2区3区激情| 久久久国产精华液| 国产69精品久久久久APP下载| 久久久不卡国产精品一区二区| 国内精品久久九九国产精品| 九九精品99久久久香蕉| 97久久精品无码一区二区| 久久久久AV综合网成人 | 久久夜色精品国产欧美乱| 久久久久亚洲AV无码专区首JN| 久久亚洲av无码精品浪潮| 久久亚洲欧洲国产综合| 漂亮人妻被中出中文字幕久久| 亚洲国产成人精品91久久久| 久久久久一本毛久久久| 一本久久免费视频| 久久久无码一区二区三区| 91精品国产高清久久久久久io| 蜜桃麻豆www久久| 亚洲国产精品无码久久九九 | 久久丝袜精品中文字幕| 午夜精品久久久内射近拍高清 | 精品999久久久久久中文字幕| 免费观看久久精彩视频| 久久无码精品一区二区三区| 亚洲国产另类久久久精品| 青青青国产精品国产精品久久久久| 成人a毛片久久免费播放| 久久久噜噜噜久久| 日韩人妻无码精品久久免费一| 狠狠狠色丁香婷婷综合久久五月| 国产精品无码久久久久| 久久亚洲精品无码VA大香大香| 狠狠干狠狠久久| 久久亚洲AV无码精品色午夜| 97精品伊人久久久大香线蕉| 亚洲人成网亚洲欧洲无码久久 | 久久精品国产亚洲av影院| 久久久久亚洲AV成人网人人软件|