Skip to content

Instantly share code, notes, and snippets.

@ques0942
Created August 26, 2018 10:48
Show Gist options
  • Save ques0942/e387fa9181e26f56c842174b744cafcd to your computer and use it in GitHub Desktop.
Save ques0942/e387fa9181e26f56c842174b744cafcd to your computer and use it in GitHub Desktop.
mavenレポジトリをnexusに移設するメモ(nexusのレポジトリ構成) ref: https://qiita.com/ques0942/items/f60701e02210a32dbf1c
mvn deploy:deploy-file -Dfile=<アップロードするjarのパス> -Durl=<アップロード先mavenレポジトリのURL> -DrepositoryId=<アップロード先レポジトリのID> -DpomFile=<アップロードするjarに対応するpomのパス>
mvn deploy:deploy-file -Dfile=<アップロードするpomのパス> -Durl=<アップロード先mavenレポジトリのURL> -DrepositoryId=<アップロード先レポジトリのID> -DgroupId=<アップロードするpomのgroupId> -DartifactId=<アップロードするpomのartifactId> -Dversion=<アップロードするpomのversion>
<settings>
<servers>
<server>
<id>${snapshotレポジトリのID}</id>
<username>${ログインユーザー}</username>
<password>${ログインユーザーのパスワード}</password>
</server>
<server>
<id>${releaseレポジトリのID}</id>
<username>${ログインユーザー}</username>
<password>${ログインユーザーのパスワード}</password>
</server>
</servers>
</settings>
<distributionManagement>
<snapshotRepository>
<id>${snapshotレポジトリのID}</id>
<url>${snapshotレポジトリのURL}</url>
</snapshotRepository>
<repository>
<id>${releaseレポジトリのID}</id>
<url>${releaseレポジトリのURL}</url>
</repository>
</distributionManagement>
keytool.exe "-J-Djava.net.useSystemProxies=true" -printcert -rfc -sslserver <nexusのホスト名>:443 | Out-File -FilePath cert.pem -Encoding ASCII
keytool.exe -importcert -file cert.pem -alias nexus -storepass changeit -keystore '<JAVA_HOME>\jre\lib\security\cacerts'
mvn dependency:purge-local-repository clean package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment