LinuxでNexus 3私服倉庫を構築します。

1985 ワード

uuntuインストールnexus-3.0.2-02ダウンロードアドレスhttps://www.sonatype.com/download-oss-sonatype 参考資料http://www.cnblogs.com/qq27271609/p/5497815.html
インストール
解凍インストールパッケージ
tar -xvf nexus-3.0.2-02-unix.tar.gz
rootアカウントの起動nexusは環境変数RUN_を設定する必要があります。ASUS ER=root
export RUN_AS_USER=root
開始nexus
./bin/nexus start
ブラウザ入力http://ip:8081
admin/admin 123で登録し、展開戦略を開始する。
settings.xml


  C:\Users\Kosh\.m2\repository
    
        
          nexus
          admin
          admin123
        
    

    
        
          nexus
          http://139.196.8.178:8081/repository/maven-public/
          central
        
    

pom.xml

    
        nexus
        Nexus Release
        http://139.196.8.178:8081/repository/maven-releases/
    
    
        nexus
        Nexus Snapshot
        http://139.196.8.178:8081/repository/maven-snapshots/
    

第三者パッケージを公開する
次のコマンドを入力します。
mvn deploy:deploy-file -DgroupId=log4j -DartifactId=log4j -Dversion=1.2.17 -Dpackaging=jar -DrepositoryId=3rdparty -Dfile=E:\IDEA\log4j-1.2.17.jar -Durl=http://localhost:8081/repository/3rdparty/ -DgeneratePom=false
このうち、groupId artfractId versionは、実際の状況に応じてrepositoryIdとsettings.xmlの中で同じままurlを記入し、repositoryの設定で見ることができます。