LoginSignup
0
0

More than 3 years have passed since last update.

GoMintサーバーをセットアップする

Last updated at Posted at 2019-03-20
1 / 2

はじめに

 試しに作ってみたGoMintのプラグインをいざ実行してみようとサーバーを建てたらかなりハマったので、簡単に方法をまとめてみました。

TL;DR

  • Jenkinsがダウンしているので自分でビルド
  • 環境をそろえるのが大変
  • 初心者にはちょっと厳しい

環境

  • Windows 10 Home
  • JDK 11(11.0.2)
  • GoMint 1.0.0-SNAPSHOT

セットアップ

 現在Jenkinsのサーバーが502でダウンしているので、諦めて自分でビルドしましょう。

大まかな手順

  1. GitHubからソースコードをクローンまたはダウンロード
  2. mvn clean install でビルド

つまづきポイント

  • GoMintをビルドするためにはJDK11以上が必要
  • 執筆時(2019/3/21)でMavenリポジトリのSSLサーバー証明書が切れているのでpom.xmlの編集が必要

ビルド

前提

 JDK11はこちらの手順に従ってインストールしてください。
 ビルドする際はMavenも必要になります。こちらの手順に従ってインストールしてください。

ビルド手順

 まず、適当なディレクトリにソースコードをクローンします。SSLサーバー証明書の期限が切れていた場合はクローンされたフォルダを開いたところにあるpom.xmlを以下のように変更します。

    <repositories>
        <repository>
            <id>gomint-repo</id>
            <name>GoMint Public Repository</name>
            <!-- ↓ここ -->
            <url>https://repo.gomint.io/content/groups/public/</url>
        </repository>
    </repositories>

    <distributionManagement>
        <repository>
            <id>gomint-releases</id>
            <!-- ↓ここ -->
            <url>https://repo.gomint.io/content/repositories/releases/</url>
        </repository>
        <snapshotRepository>
            <id>gomint-snapshots</id>
            <!-- ↓ここ -->
            <url>https://repo.gomint.io/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

 を

    <repositories>
        <repository>
            <id>gomint-repo</id>
            <name>GoMint Public Repository</name>
            <url>http://repo.gomint.io/content/groups/public/</url>
        </repository>
    </repositories>

    <distributionManagement>
        <repository>
            <id>gomint-releases</id>
            <url>http://repo.gomint.io/content/repositories/releases/</url>
        </repository>
        <snapshotRepository>
            <id>gomint-snapshots</id>
            <url>http://repo.gomint.io/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

 という風に、該当の部分のURIスキームをhttps://からhttp://に変えてください。

 次に、pom.xmlがあるディレクトリでコマンドプロンプトからmvn clean install を実行してビルドを開始してください。完了までに数分かかるかもしれないので気長に待ちます。

 ビルドが完了したら、pom.xmlがあるディレクトリからgomint-server/targetに移り、そこにあるGoMint.jarをわかりやすいディレクトリに移動させましょう。移動先と同じディレクトリにstart.cmdを作成し、中身を

java -jar GoMint.jar

と書けば一通り終了です。お疲れさまでした。

起動

 start.cmdを叩いてあげればGoMintが起動します。

さいごに

 GoMintは今までのサーバーソフトより質が高く、プラグインもかなり楽に書けるのでとてもおすすめです。僕もプラグインをちょくちょく配布していくので、興味がある方はプラグインをのぞいてみたりサーバーを建ててみたりしてみてはいかがでしょうか。

スペシャルサンクス

WhiteGrouseさん

 夜遅くまで丁寧にわかりやすくご指導していただきありがとうございます! めちゃくちゃ助かりました!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0