Skip to content

デプロイ方法

ishidam edited this page May 24, 2018 · 5 revisions

github上への公開

pom.xmlの編集

・distributionManagementのGithub repository用コメントアウトを外す

 repositoryの以下の設定を有効にする

  release-nimbus.github.io

  snapshot-nimbus.github.io

  nimbus.github.io

・pluginのGithub repository用コメントアウトを外す

 以下のpluginを有効にする

  maven-site-plugin

  maven-deploy-plugin

  maven-release-plugin

  site-maven-plugin

SNAPSHOTで作成したい場合は

pom.xmlの以下の2点を修正

X.X.X

SNAPSHOT

実行コマンド

mvn -DdryRun=false -Dgithub.site.skip=false clean deploy

※パラメータ無しのデフォルトのdeployではgithub上のリポジトリには後悔しないようにしている。

Maven Central Repositoryへの公開

pom.xmlの編集

・distributionManagementのMaven central repository用コメントアウトを外す

 repositoryの以下の設定を有効にする

  https://oss.sonatype.org/content/repositories/snapshots

  https://oss.sonatype.org/service/local/staging/deploy/maven2/

・pluginのGithub repository用コメントアウトを外す

 以下のpluginを有効にする

  nexus-staging-maven-plugin

実行コマンド

mvn clean package javadoc:jar deploy

Clone this wiki locally