デプロイ方法 - nimbus-org/nimbus GitHub Wiki

事前準備

gpg4winをPC上にインストールし、シークレットキーの登録を行う。

シークレットキーの登録は、GUI画面(Kleopatra)から行う。

github上への公開

settings.xmlの編集

githubの認証情報を.m2/settings.xmlに記載する

  <servers>
    <server>
      <id>github</id>
      <username>user</username>
      <password>pw</password>
    </server>
  </servers>

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


Java11でのパッケージングについて

pom.xmlの以下をJava11設定に変更する。

        <filecontrol.java.version>11</filecontrol.java.version>
        <java.version>11</java.version>
        <compile.target>11</compile.target>

rmicのpulginのdependenciesを外す

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>rmic-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <id>rmi compilation</id>
                        <goals>
                            <goal>rmic</goal>
                        </goals>
                        <configuration>
                            <noLocalStubs>false</noLocalStubs>
                            <verbose>false</verbose>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                  <dependency>
                      <groupId>org.glassfish.corba</groupId>
                      <artifactId>rmic</artifactId>
                      <version>4.2.1</version>
                  </dependency>
                </dependencies>
            </plugin>
⚠️ **GitHub.com Fallback** ⚠️