• <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,挺不錯的。  回復  更多評論   

            一本色综合久久| 天天综合久久一二三区| 精品久久久久久无码专区| 久久亚洲美女精品国产精品| 青青草原综合久久| 99久久免费国产精品特黄| 狠狠色丁香久久婷婷综合五月 | 伊人久久大香线蕉无码麻豆| 久久99精品久久久久久动态图 | 精品久久久中文字幕人妻| 成人免费网站久久久| 一本大道久久东京热无码AV| 久久综合久久综合久久| 国内精品人妻无码久久久影院导航 | 99久久精品午夜一区二区| 亚洲а∨天堂久久精品| 久久成人影院精品777| 婷婷综合久久中文字幕蜜桃三电影| 国内精品久久久久久久coent| 色婷婷综合久久久久中文一区二区| 久久精品中文字幕第23页| 狠狠干狠狠久久| 久久香蕉综合色一综合色88| 狠狠色丁香久久婷婷综合| 久久人人爽人人爽人人片AV东京热| 国产精品九九久久免费视频| 久久综合欧美成人| 久久久国产精品福利免费| 国产精品免费看久久久| 久久精品九九亚洲精品| 国产午夜福利精品久久2021| 亚洲精品国精品久久99热一| 五月丁香综合激情六月久久| 麻豆成人久久精品二区三区免费| 久久伊人五月丁香狠狠色| 久久久久亚洲AV成人网人人网站 | 久久人人爽人人爽人人AV东京热 | 伊人色综合久久天天网| 久久国产色av免费看| 无码人妻精品一区二区三区久久 | 久久久久高潮毛片免费全部播放|