• <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)計

            最新評論

            安裝Nexus私服

            文章格式不好調(diào),我是現(xiàn)在word里面寫的,貼上來樣式都變了,把原稿提供給大家下載吧,轉(zhuǎn)載的話,請大家提供出處,尊重一下我的勞動成果: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包,解壓后有兩個目錄nexus-2.0.3為Nexus運行時所需要的文件,sonatype-work包含配置文件、日志文件、倉庫文件等,備份時我們備份sonatype-work目錄就行了;

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

            3、  用管理員登陸,點擊左邊欄的Views/Repositories中的Repositories,找到Apache Snapshots,將下面的選項卡切換到Configuration,將Download Remote Indexes置為true,同樣將Codehaus Snapshots,Central進行相同設置,保存后,將剛才的三個倉庫,選中repaire index,更新并下載遠程索引;

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

            <id>nexus</id>

            <mirrorOf>*</mirrorOf>

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

            </mirror>

            修改<profiles,在節(jié)點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é)點
            <activeProfiles>

            <activeProfile>nexus</activeProfile>

            </activeProfiles>

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

            <id>releases</id>

            <username>admin</username>

            <password>admin123</password>

            </server>

            <server>

            <id>snapshots</id>

            <username>admin</username>

            <password>admin123</password>

            </server>

            配置完,整個文件如下(節(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首先會在私服尋找jar包,找不到將回到公共倉庫尋找下載到私服,再下載到本地。如果要發(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在項目執(zhí)行clean deploy命令時,將會部署到私服對應的Releases或Snapshots倉庫

            6、  Nexus的3rd party可以讓我們直接上傳jar包到私服,選擇3rd party倉庫,點擊Artifact Upload選項卡,選擇GAV Parameters,填入相關jar包版本信息,選中上傳后,即可以在maven使用上傳的jar包

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

            評論

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

            謝謝博主。我剛學搭建nexus,挺不錯的。  回復  更多評論   

            国产精品久久午夜夜伦鲁鲁| 国内精品久久久久久中文字幕 | 久久久久国色AV免费看图片| 久久本道久久综合伊人| 国产精品99久久久精品无码| 成人久久久观看免费毛片| 久久夜色精品国产| 精品久久久久香蕉网| 无码任你躁久久久久久| 一本久久久久久久| 亚洲国产精品久久电影欧美| 久久男人AV资源网站| 国产精品久久久亚洲| 久久精品国产亚洲AV忘忧草18| 国产A级毛片久久久精品毛片| 精品久久久中文字幕人妻| 久久一区二区三区免费| 久久99精品久久久久久| 无码专区久久综合久中文字幕 | 久久e热在这里只有国产中文精品99| 无码人妻少妇久久中文字幕蜜桃| 久久99精品九九九久久婷婷| 精品精品国产自在久久高清 | 亚洲国产精品久久| 国产欧美一区二区久久| 国产精品久久久久9999| 久久精品aⅴ无码中文字字幕不卡| 亚洲精品综合久久| 久久久久久亚洲精品不卡| 99久久国产综合精品五月天喷水| 99久久精品日本一区二区免费| 亚洲国产另类久久久精品黑人| 亚洲欧美一级久久精品| 久久综合久久伊人| 中文字幕无码av激情不卡久久| 久久综合给合综合久久| 亚洲精品国产第一综合99久久| 色综合久久天天综线观看| 国产精品久久久久免费a∨| 久久久久久曰本AV免费免费| 四虎国产精品成人免费久久|