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

            大龍的博客

            常用鏈接

            統計

            最新評論

            安裝Nexus私服

            文章格式不好調,我是現在word里面寫的,貼上來樣式都變了,把原稿提供給大家下載吧,轉載的話,請大家提供出處,尊重一下我的勞動成果: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節點下面添加
            <mirror>

            <id>nexus</id>

            <mirrorOf>*</mirrorOf>

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

            </mirror>

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

            <activeProfile>nexus</activeProfile>

            </activeProfiles>

            如果要發布jar包到私服,還需要配置<servers>節點
            <server>

            <id>releases</id>

            <username>admin</username>

            <password>admin123</password>

            </server>

            <server>

            <id>snapshots</id>

            <username>admin</username>

            <password>admin123</password>

            </server>

            配置完,整個文件如下(節省空間,去除了注釋):
            <?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包,找不到將回到公共倉庫尋找下載到私服,再下載到本地。如果要發布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在項目執行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 大龍 閱讀(960) 評論(1)  編輯 收藏 引用

            評論

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

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

            www亚洲欲色成人久久精品| 久久精品免费一区二区| 久久久综合九色合综国产| 久久91亚洲人成电影网站| 久久天天躁狠狠躁夜夜av浪潮 | 久久国内免费视频| 久久夜色精品国产噜噜噜亚洲AV| 国产午夜福利精品久久2021| 精品久久人人做人人爽综合| 国产成人精品久久| 91精品久久久久久无码| 国色天香久久久久久久小说 | 亚洲精品无码久久不卡| 精品熟女少妇a∨免费久久| 亚洲国产成人精品91久久久| 精品久久久久久中文字幕| 亚洲综合熟女久久久30p| 久久久久亚洲AV无码专区网站| 亚洲AV无一区二区三区久久| 久久精品国产99国产精品| 久久久久亚洲AV无码专区体验| 欧美国产精品久久高清| A级毛片无码久久精品免费| 国产精品久久久久久吹潮| 777午夜精品久久av蜜臀| 日韩电影久久久被窝网| 久久久久久久国产免费看| 伊人色综合久久| 国产亚洲色婷婷久久99精品91| 精品久久久久久久久午夜福利| AV无码久久久久不卡蜜桃| 欧美精品乱码99久久蜜桃| 久久久久免费精品国产| 久久天天躁狠狠躁夜夜不卡| 久久毛片一区二区| 99蜜桃臀久久久欧美精品网站 | 日本精品久久久久中文字幕8| 久久精品中文字幕无码绿巨人| 久久国产热精品波多野结衣AV| 亚洲欧美成人综合久久久| 久久水蜜桃亚洲av无码精品麻豆|