Tambourine作業メモ

主にスキル習得のためにやった作業のメモ。他人には基本的に無用のものです。

Google CloudでLinux学習用にVMを作りたい

「入門モダンLinux」を教材にした勉強会を部署内ですることにした。まあ、私がそもそもLinuxに疎い(Unixに疎いかというとそうでもないんだが・・・)というのもあるし、若者があんまりUnixに触れてないというのもある。Linuxマシンはなおさらだが、IaaSも最近はそんなに使わなかったりするのだ。

というわけで、手元に古いPCが転がっているロートルとは違う、若者がとりあえずの学習用のLinux OSを準備する方法を確認したい。AWSやAzureは飽きたので、Google Cloudにする。まったく触ったことがない。使ったことがないので無料枠があるし、VMも一番小さいのは無料だと書いてある(が、本当にそうなのかはわからない)。

というわけで、やったことをメモっておく

Google Cloudにログインする

やたら、「無料で始める」 ボタンがあるが、それを押せばいいようだ。普段、使っているGoogle アカウントで入れるし、それにはクレジットカードが紐付いてしまっているが、この状態で無料枠を使い切ったら課金されるのかどうかはよくわからない。この「フルアカウントを有効化」て奴を押さなければいいの?ホント?

もうとにかく、この商用系のクラウドサービスは何もはっきりわからない。はっきり書かないことが戦略化している

Compute Engine

「VMを作る」とかいうパネルを押すと、Compute Engineのコンソールに行く。一番ちっこいe2-microを作る。ググるとコイツは無料枠だという記事が見つかるが、このコンソールから見た感じ、普通に起動しっぱなすと月額$7って出てる。真実はいずこ。まあ、遊ぶときだけ起動すればいいし、なんなら月額7ドルぐらいは払ってもいいだろう。

接続

sshでログインできれば何の不満もない。最近使っているAzureだと、VMを作ると管理ユーザーのSSHの認証キーがkey vaultにできて、それを使ってsshできる。

しかし、見渡した感じ、そんな感じはない。Webのシェルからログインは出来る。まあ、勉強用ならこれで問題は無いかもしれない。

ヘルプを読むと、gcloudコマンドで入れると書いてある。インストールしてみるか・・・

gcloud CLI

brewでインストール出来る。brew install --cask gcloud-cliする

・・・エラーになる。python 3.9はサポートされていませんと。そうですか。

pyenvのglobalは3.10になっているんだが、それは使ってくれないっぽい。まあ、3.10もいい加減古いので、pyenvで3.12.11を入れる。その上で、which pythonして出てくるpyenvのpythonのパスをCLOUDSDK_PYTHONという環境変数にセットする。環境変数名にセンスなくない?

あとは、/opt/homebrew/share/google-cloud-sdk/binをPATHに加えて、gcloud componets reinstallすると、インストール完了になった。

gcloudでssh

あとは、gcloud compute ssh (インスタンス名)でssh出来るらしい。google cloudのコンソールからインスタンス名を調べて実行してみると、認証してくださいと言われる。それはそうだろう。

gcloud auth loginするとブラウザが立ち上がってgoogleの認証になる。

これでOKかとおもいきや、「プロジェクトを指定しろ」と言われる。デフォルトのプロジェクトが作られているので、コンソールのプロジェクトを探して、IDを見つける。それをgcloud config set project project-xxxxxxxx-xxxx-xxxx-xxxという感じで指定すると、なんかconfigに項目がないぞ、つくるぞあーだこーだと表示される。エラーではないようなのでシカトして、再度 gcloud compute ssh instance-20260228-xxxxxxてな感じで実行すると、~/.sshに鍵が作られ、ログインできた。

落としておく

停止させると、「固定IPとディスクの分は課金すんぞ」っていうメッセージが出るが、グローバルのIPは外されたように見える。課金されるのかな?

iPhoneの着信音を変える

昔、着メロという文化があった。

この一文だけで感極まって泣きそうになっている老人がたくさんいると思われるが、それはさておく。イマドキもみんな自分のスマホを好みの着信音に変えたりしているのだろうか。あまり周囲でそういったことをしている人を見かけないし、あんまり見かけないので私もすっかりそんなことをするという発想を失っていたのだが、ひさしぶりにやってみようと思った。一種の逃避行動である。大量のコードレビューを抱えて忙しいのだ。

着メロは音楽配信サービスの先駆けとなり、音楽配信サービスはサブスクに取って代わられ、いまや着信音はどのように扱われているのだろうか。

ぱっと見た感じは往時の面影もなく、とても雑な事になっているようである。

まず、iPhoneの着信音は設定から変えられる。どこから変えられるかはお手元のSiriに訊けばいいだろう・・・と思ったが、手元のiPhoneは「そのお手伝いはできません」と表示するのみ。それが出来なくてお前の存在意義はなんだと思わざるをえないが、Geminiに訊いたらあっさり教えてくれた。Siriはゴミ箱に捨てていただきたい。そのうち中身がGeminiになって蘇ることが預言されている。

ともあれ、尋ねたとおりに着信音の設定に行くと着信音を変えられるわけだ。アラームのようにここで自分のMusicのライブラリから好きなものを選べてもよさそうなものだが、そうはならない。なぜか。なぜだかはよくわからないが、iPhoneでは着信音に設定出来るのは通常のAACの楽曲であるm4a形式ではなく、m4r形式だけだからだ。自分のライブラリのm4rだけが選択肢に上がってくる。このページにはiTune Store(お久しぶり!)へのリンクがあり、お好みの着信音を購入できる。が、みなさんがお察しの通り、iTune Storeの着信音のラインナップはとても場末感溢れるさびれっぷりであり、ここで255円払って着信音を買おうとする物好きは、まあいない。私の着信音の設定ページには標準のサウンド以外に登録されているのは「ピタゴラスイッチ」だけで、これはiTune Storeですごーく昔に試しに買ったんだと思う。忘れた。そして、今現在のiTune Storeの着信音ランキングにもピタゴラスイッチは2位に君臨している。このランキングがちょっとやそっとでは動かない感じがすごい。ちなみに1位がなんなのかは自分で確認してくれ。

では、iTune Storeにないサウンドを着信音にしたい場合はどうすればいいか。ポイントは

  1. m4rファイルを作る
  2. それをiPhoneに転送する

の2つである。どちらも簡単で、なんだか難しい。

まず、m4rファイルを作ろう。

m4rとは何か。実はm4aとまったく同じ形式なのだそうだ。拡張子を変えればいいだけ。m4rには「30秒ぐらいの長さじゃないとだめ」というルールがあるだけなのである。ただし、Apple Musicのサブスクリプションでダウンロードしたファイルはm4pだ。これはDRMという「買った人しか聴かせないよ」という闇テクノロジがかかっているので使えない。ま、何らかの方法でm4aの曲を入手していただきたい。私のような老人は秘蔵のCDを秘蔵のBD外付けドライブを使ってMacのMusicアプリでリッピングするだけの話で簡単だが、みなさんは外付け光学ディスクドライブはお持ちなのだろうか。

そのように首尾良く好きな楽曲のm4aファイルが手に入ったとして、それはたぶん30秒を大幅に超えた長さだと思われるので短くする必要がある。

おもむろにGarageBandを立ち上げる。Macに標準で入っている音楽製作アプリである。使ったことがない?私も今回が初めてだ。

空のプロジェクトを選び、「マイクまたはライン」を選ぶ。たぶん、どれを選んでもよいのだと思う。

画面上部のテンポが出ているところメニューが選ばれているが、これでタイムを選ぶ。そして、「07_人畜」というトラックがあるが、この場所に私が楽曲ファイルをドラッグアンドドロップしたのでこうなっている。みなさんも自分の好きな曲をここに置く。あとは30秒付近の切りがいいところまで再生して、その辺りで右クリックして「再生ヘッド位置で分割」を選び、分割されたら後ろ部分を消す。メニューから「共有」 -> 「曲をディスクに書き出す」を選び、AAC形式を選んで書き出す。

最後にファイル名の拡張子をm4rに変えればファイルはできあがり。簡単っちゃ簡単だが、ディスクドライブを用意したりGarageBandを臆せず操作したりが難しい。

次にiPhoneに転送する。恐るべきことにMaciPhoneをケーブルで繋げる必要がある。iTunesの時代に逆戻りだ。パスコードをいれたりなんなりしてお互いに認識するようにしてやると、Musicアプリの左側にiTunesの時とおなじようにiPhoneが現れ、かつてのようにここでiPhoneのバックアップを取ることが出来る。今ではみんなiCloudにバックアップを取るので、やったことがない人もいるだろう。で、この現れたiPhoneにm4rをドラッグアンドドロップすれば、着信音のところに送ったサウンドが現れる・・・ハズなのだが、ドラッグアンドドロップしてもなんのリアクションもしてこないし、すぐには反映されないようだ。何回か試して、「うーん・・・」となっていると、いつの間にか出てくるようになった。そこはかとなく難しい。

というわけで、iPhoneの着信音を「人畜」に変えることができた。「人畜」って何だよと思われる方のためにリンクを付けておく。往時を偲んで欲しい。この冒頭のピアノは着信音にぴったりじゃね?

人畜

人畜

  • provided courtesy of iTunes
music.apple.com

WindowsマシンにAntを入れる

Wingetでは入らない。バイナリをダウンロードして、適当なフォルダに入れて環境変数をセットアップする。

というわけで、ポイントは環境変数の設定の仕方である。

インストール方法は、Installing Apache Antにある。

環境変数の確認の仕方はこう。

PS C:\Users\tambourine> $env:JAVA_HOME
C:\Program Files\Eclipse Adoptium\jdk-21.0.3.9-hotspot\

ダウンロードしてきたバイナリパッケージを、ホームディレクトリのbinの下に入れて、ANT_HOMEを設定する。

PS C:\Users\tambourine> [System.Environment]::SetEnvironmentVariable('ANT_HOME', 'C:\Users\tambourine\bin\apache-ant-1.10.15', 'User')

セットした値を使うので、新しいターミナルを開いて次にPATHを設定する。

PS C:\Users\tambourine> $p = $Env:PATH
PS C:\Users\tambourine> $a = $Env:ANT_HOME
PS C:\Users\tambourine> $p += ';' + $a + '\bin'
PS C:\Users\tambourine> $p
C:\Program Files\PowerShell\7;(中略);C:\Users\tambourine\bin\apache-ant-1.10.15\bin
PS C:\Users\tambourine> [System.Environment]::SetEnvironmentVariable('PATH', $p, 'User')

さらに、新しいターミナルを開くとantコマンドが使えるようになっているので、fetch.xmlを実行する

PS C:\Users\tambourine> ant -v
Apache Ant(TM) version 1.10.15 compiled on August 25 2024
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed
PS C:\Users\tambourine> cd .\bin\apache-ant-1.10.15
PS C:\Users\tambourine\bin\apache-ant-1.10.15> ls

    Directory: C:\Users\tambourine\bin\apache-ant-1.10.15

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          2025/12/21     0:06                bin
d----          2025/12/21     0:06                etc
d----          2025/12/21     0:06                lib
d----          2025/12/21     0:07                manual
-----          2024/08/25    20:18           7099 CONTRIBUTORS
-----          2024/08/25    20:18          35708 contributors.xml
-----          2024/08/25    20:18          13517 fetch.xml
-----          2024/08/25    20:18           4466 get-m2.xml
-----          2024/08/25    20:18            138 INSTALL
-----          2024/08/25    20:18          99327 KEYS
-----          2024/08/25    20:18          15291 LICENSE
-----          2024/08/25    20:18            306 NOTICE
-----          2024/08/25    20:18           1916 patch.xml
-----          2024/08/25    20:18           4371 README
-----          2024/08/25    20:18         272804 WHATSNEW

PS C:\Users\tambourine\bin\apache-ant-1.10.15> ant -f fetch.xml -Ddest=system
Buildfile: C:\Users\tambourine\bin\apache-ant-1.10.15\fetch.xml

pick-dest:
     [echo] Downloading to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

probe-m2:

download-m2:
     [echo] Downloading to C:\Users\tambourine\bin\apache-ant-1.10.15\lib
      [get] Getting: https://repo1.maven.org/maven2/org/apache/maven/resolver/maven-resolver-ant-tasks/1.4.0/maven-resolver-ant-tasks-1.4.0-uber.jar
      [get] To: C:\Users\tambourine\bin\apache-ant-1.10.15\lib\maven-resolver-ant-tasks-1.4.0-uber.jar
      [get] ....................................................
      [get] ....................................................
      [get] ....................................................
      [get] ....................................................
      [get] ....................................................
      [get] ....................................................
      [get] .............................

dont-validate-m2-checksum:

validate-m2-checksum:

checksum-mismatch:

checksum-match:

get-m2:

macros:

init:

antunit:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.4.1/ant-antunit-1.4.1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.4.1/ant-antunit-1.4.1.pom (4 KB at 5.6 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.4.1/ant-antunit-1.4.1.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.4.1/ant-antunit-1.4.1.jar (60 KB at 93.6 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

ivy:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.5.2/ivy-2.5.2.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.5.2/ivy-2.5.2.pom (7 KB at 62.8 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apache/apache/7/apache-7.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apache/apache/7/apache-7.pom (15 KB at 223.7 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.5.2/ivy-2.5.2.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.5.2/ivy-2.5.2.jar (1373 KB at 7186.8 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

logging:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/log4j/log4j/1.2.14/log4j-1.2.14.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/log4j/log4j/1.2.14/log4j-1.2.14.pom (3 KB at 16.1 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/log4j/log4j/1.2.14/log4j-1.2.14.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/log4j/log4j/1.2.14/log4j-1.2.14.jar (359 KB at 2228.8 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib
[resolver:resolve] Downloading https://repo1.maven.org/maven2/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.pom (6 KB at 43.2 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar (44 KB at 359.9 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

junit:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/junit/junit/4.13.2/junit-4.13.2.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/junit/junit/4.13.2/junit-4.13.2.pom (27 KB at 239.9 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom (766 B at 9.7 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/hamcrest/hamcrest-parent/1.3/hamcrest-parent-1.3.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/hamcrest/hamcrest-parent/1.3/hamcrest-parent-1.3.pom (2 KB at 27.5 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/junit/junit/4.13.2/junit-4.13.2.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar (44 KB at 369.5 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/junit/junit/4.13.2/junit-4.13.2.jar (376 KB at 2957.2 KB/sec)
     [copy] Copying 2 files to C:\Users\tambourine\bin\apache-ant-1.10.15\lib
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.pom (820 B at 6.5 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar (52 KB at 435.5 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

junitlauncher:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/junit/platform/junit-platform-launcher/1.10.2/junit-platform-launcher-1.10.2.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/junit/platform/junit-platform-launcher/1.10.2/junit-platform-launcher-1.10.2.pom (3 KB at 9.5 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/junit/junit-bom/5.10.2/junit-bom-5.10.2.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/junit/junit-bom/5.10.2/junit-bom-5.10.2.pom (6 KB at 62.7 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/junit/platform/junit-platform-engine/1.10.2/junit-platform-engine-1.10.2.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/junit/platform/junit-platform-engine/1.10.2/junit-platform-engine-1.10.2.pom (4 KB at 13.0 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/opentest4j/opentest4j/1.3.0/opentest4j-1.3.0.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/opentest4j/opentest4j/1.3.0/opentest4j-1.3.0.pom (2 KB at 19.9 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/junit/platform/junit-platform-commons/1.10.2/junit-platform-commons-1.10.2.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/junit/platform/junit-platform-commons/1.10.2/junit-platform-commons-1.10.2.pom (3 KB at 30.4 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.pom (2 KB at 20.4 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/junit/platform/junit-platform-launcher/1.10.2/junit-platform-launcher-1.10.2.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/junit/platform/junit-platform-engine/1.10.2/junit-platform-engine-1.10.2.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/junit/platform/junit-platform-commons/1.10.2/junit-platform-commons-1.10.2.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/opentest4j/opentest4j/1.3.0/opentest4j-1.3.0.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/opentest4j/opentest4j/1.3.0/opentest4j-1.3.0.jar (14 KB at 121.5 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar (7 KB at 51.9 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/junit/platform/junit-platform-launcher/1.10.2/junit-platform-launcher-1.10.2.jar (180 KB at 1074.9 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/junit/platform/junit-platform-commons/1.10.2/junit-platform-commons-1.10.2.jar (104 KB at 537.5 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/junit/platform/junit-platform-engine/1.10.2/junit-platform-engine-1.10.2.jar (201 KB at 823.1 KB/sec)
     [copy] Copying 5 files to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

xml:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/xalan/xalan/2.7.3/xalan-2.7.3.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/xalan/xalan/2.7.3/xalan-2.7.3.pom (384 B at 3.5 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/xalan/xalan/2.7.3/xalan-2.7.3.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/xalan/xalan/2.7.3/xalan-2.7.3.jar (3375 KB at 12453.0 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib
[resolver:resolve] Downloading https://repo1.maven.org/maven2/xalan/serializer/2.7.3/serializer-2.7.3.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/xalan/serializer/2.7.3/serializer-2.7.3.pom (389 B at 3.4 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/xalan/serializer/2.7.3/serializer-2.7.3.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/xalan/serializer/2.7.3/serializer-2.7.3.jar (277 KB at 1370.7 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib
[resolver:resolve] Downloading https://repo1.maven.org/maven2/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.pom (2 KB at 13.3 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apache/apache/3/apache-3.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apache/apache/3/apache-3.pom (4 KB at 54.9 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar (83 KB at 864.4 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

networking:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/commons-net/commons-net/3.10.0/commons-net-3.10.0.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/commons-net/commons-net/3.10.0/commons-net-3.10.0.pom (24 KB at 130.9 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apache/commons/commons-parent/62/commons-parent-62.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apache/commons/commons-parent/62/commons-parent-62.pom (79 KB at 929.0 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apache/apache/30/apache-30.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apache/apache/30/apache-30.pom (23 KB at 298.6 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/junit/junit-bom/5.10.0/junit-bom-5.10.0.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/junit/junit-bom/5.10.0/junit-bom-5.10.0.pom (6 KB at 73.6 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/commons-net/commons-net/3.10.0/commons-net-3.10.0.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/commons-net/commons-net/3.10.0/commons-net-3.10.0.jar (316 KB at 1522.8 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/jcraft/jsch/0.1.55/jsch-0.1.55.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/jcraft/jsch/0.1.55/jsch-0.1.55.pom (4 KB at 27.7 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/sonatype/oss/oss-parent/6/oss-parent-6.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/sonatype/oss/oss-parent/6/oss-parent-6.pom (5 KB at 51.8 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/jcraft/jsch/0.1.55/jsch-0.1.55.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/jcraft/jsch/0.1.55/jsch-0.1.55.jar (276 KB at 1985.4 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

regexp:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.pom (160 B at 1.5 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar (28 KB at 263.3 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib
[resolver:resolve] Downloading https://repo1.maven.org/maven2/oro/oro/2.0.8/oro-2.0.8.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/oro/oro/2.0.8/oro-2.0.8.pom (140 B at 1.3 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/oro/oro/2.0.8/oro-2.0.8.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/oro/oro/2.0.8/oro-2.0.8.jar (64 KB at 540.1 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

antlr:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7.pom (632 B at 5.9 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7.jar (435 KB at 1616.5 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

bcel:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apache/bcel/bcel/6.9.0/bcel-6.9.0.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apache/bcel/bcel/6.9.0/bcel-6.9.0.pom (22 KB at 202.3 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apache/commons/commons-parent/69/commons-parent-69.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apache/commons/commons-parent/69/commons-parent-69.pom (76 KB at 895.3 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apache/apache/31/apache-31.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apache/apache/31/apache-31.pom (23 KB at 389.5 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.14.0/commons-lang3-3.14.0.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.14.0/commons-lang3-3.14.0.pom (31 KB at 372.5 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apache/commons/commons-parent/64/commons-parent-64.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apache/commons/commons-parent/64/commons-parent-64.pom (77 KB at 951.6 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apache/bcel/bcel/6.9.0/bcel-6.9.0.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.14.0/commons-lang3-3.14.0.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apache/bcel/bcel/6.9.0/bcel-6.9.0.jar (722 KB at 1767.9 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.14.0/commons-lang3-3.14.0.jar (643 KB at 1501.2 KB/sec)
     [copy] Copying 2 files to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

jdepend:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/jdepend/jdepend/2.9.1/jdepend-2.9.1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/jdepend/jdepend/2.9.1/jdepend-2.9.1.pom (148 B at 1.3 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/jdepend/jdepend/2.9.1/jdepend-2.9.1.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/jdepend/jdepend/2.9.1/jdepend-2.9.1.jar (57 KB at 196.4 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

bsf:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/bsf/bsf/2.4.0/bsf-2.4.0.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/bsf/bsf/2.4.0/bsf-2.4.0.pom (2 KB at 14.4 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.pom (6 KB at 82.9 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/bsf/bsf/2.4.0/bsf-2.4.0.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar (38 KB at 371.2 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/bsf/bsf/2.4.0/bsf-2.4.0.jar (111 KB at 174.9 KB/sec)
     [copy] Copying 2 files to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

debugging:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/which/which/1.0/which-1.0.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/which/which/1.0/which-1.0.pom (143 B at 0.3 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/which/which/1.0/which-1.0.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/which/which/1.0/which-1.0.jar (17 KB at 27.4 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

jruby:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/jruby/jruby/1.6.8/jruby-1.6.8.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/jruby/jruby/1.6.8/jruby-1.6.8.pom (3 KB at 8.1 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/jruby/jruby-common/1.6.8/jruby-common-1.6.8.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/jruby/jruby-common/1.6.8/jruby-common-1.6.8.pom (5 KB at 52.1 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/jruby/shared/1.6.8/shared-1.6.8.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/jruby/shared/1.6.8/shared-1.6.8.pom (7 KB at 44.3 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/jruby/jruby/1.6.8/jruby-1.6.8.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/jruby/jruby/1.6.8/jruby-1.6.8.jar (9798 KB at 17621.8 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

beanshell:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/beanshell/bsh/2.0b5/bsh-2.0b5.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/beanshell/bsh/2.0b5/bsh-2.0b5.pom (2 KB at 8.2 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/beanshell/bsh/2.0b5/bsh-2.0b5.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/beanshell/bsh/2.0b5/bsh-2.0b5.jar (375 KB at 2975.0 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

rhino:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/mozilla/rhino/1.7.14/rhino-1.7.14.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/mozilla/rhino/1.7.14/rhino-1.7.14.pom (2 KB at 13.5 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom (5 KB at 62.0 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/mozilla/rhino/1.7.14/rhino-1.7.14.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/mozilla/rhino/1.7.14/rhino-1.7.14.jar (1352 KB at 6527.6 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

graal.js:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/graalvm/js/js/20.1.0/js-20.1.0.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/graalvm/js/js/20.1.0/js-20.1.0.pom (3 KB at 26.6 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/graalvm/regex/regex/20.1.0/regex-20.1.0.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/graalvm/regex/regex/20.1.0/regex-20.1.0.pom (2 KB at 11.0 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/20.1.0/truffle-api-20.1.0.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/20.1.0/truffle-api-20.1.0.pom (2 KB at 18.3 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/graalvm/sdk/graal-sdk/20.1.0/graal-sdk-20.1.0.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/graalvm/sdk/graal-sdk/20.1.0/graal-sdk-20.1.0.pom (2 KB at 12.2 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/ow2/asm/asm/7.1/asm-7.1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/ow2/asm/asm/7.1/asm-7.1.pom (3 KB at 13.3 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/ow2/ow2/1.5/ow2-1.5.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/ow2/ow2/1.5/ow2-1.5.pom (11 KB at 168.7 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/7.1/asm-tree-7.1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/7.1/asm-tree-7.1.pom (4 KB at 46.2 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/7.1/asm-analysis-7.1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/7.1/asm-analysis-7.1.pom (4 KB at 43.4 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/7.1/asm-commons-7.1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/7.1/asm-commons-7.1.pom (4 KB at 36.5 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/ow2/asm/asm-util/7.1/asm-util-7.1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/ow2/asm/asm-util/7.1/asm-util-7.1.pom (4 KB at 45.6 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/ibm/icu/icu4j/66.1/icu4j-66.1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/ibm/icu/icu4j/66.1/icu4j-66.1.pom (5 KB at 38.0 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/graalvm/js/js/20.1.0/js-20.1.0.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/graalvm/regex/regex/20.1.0/regex-20.1.0.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/graalvm/sdk/graal-sdk/20.1.0/graal-sdk-20.1.0.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/20.1.0/truffle-api-20.1.0.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/ow2/asm/asm/7.1/asm-7.1.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/ow2/asm/asm/7.1/asm-7.1.jar (113 KB at 737.3 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/7.1/asm-tree-7.1.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/graalvm/sdk/graal-sdk/20.1.0/graal-sdk-20.1.0.jar (524 KB at 3444.4 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/7.1/asm-analysis-7.1.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/7.1/asm-analysis-7.1.jar (33 KB at 131.4 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/7.1/asm-commons-7.1.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/graalvm/regex/regex/20.1.0/regex-20.1.0.jar (2503 KB at 9000.2 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/ow2/asm/asm-util/7.1/asm-util-7.1.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/7.1/asm-tree-7.1.jar (50 KB at 152.1 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/ibm/icu/icu4j/66.1/icu4j-66.1.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/7.1/asm-commons-7.1.jar (69 KB at 191.0 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/ow2/asm/asm-util/7.1/asm-util-7.1.jar (80 KB at 221.2 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/20.1.0/truffle-api-20.1.0.jar (5332 KB at 12456.2 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/ibm/icu/icu4j/66.1/icu4j-66.1.jar (12633 KB at 15751.2 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/graalvm/js/js/20.1.0/js-20.1.0.jar (16132 KB at 12138.4 KB/sec)
     [copy] Copying 10 files to C:\Users\tambourine\bin\apache-ant-1.10.15\lib
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/graalvm/js/js-scriptengine/20.1.0/js-scriptengine-20.1.0.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/graalvm/js/js-scriptengine/20.1.0/js-scriptengine-20.1.0.pom (2 KB at 5.7 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/graalvm/js/js-scriptengine/20.1.0/js-scriptengine-20.1.0.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/graalvm/js/js-scriptengine/20.1.0/js-scriptengine-20.1.0.jar (58 KB at 604.3 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

script:

javamail:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/sun/mail/javax.mail/1.6.2/javax.mail-1.6.2.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/sun/mail/javax.mail/1.6.2/javax.mail-1.6.2.pom (7 KB at 61.0 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/sun/mail/all/1.6.2/all-1.6.2.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/sun/mail/all/1.6.2/all-1.6.2.pom (23 KB at 307.2 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/net/java/jvnet-parent/1/jvnet-parent-1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/net/java/jvnet-parent/1/jvnet-parent-1.pom (5 KB at 62.2 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/javax/activation/activation/1.1/activation-1.1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/javax/activation/activation/1.1/activation-1.1.pom (2 KB at 9.5 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/sun/mail/javax.mail/1.6.2/javax.mail-1.6.2.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/javax/activation/activation/1.1/activation-1.1.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/javax/activation/activation/1.1/activation-1.1.jar (62 KB at 544.3 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/sun/mail/javax.mail/1.6.2/javax.mail-1.6.2.jar (644 KB at 4732.2 KB/sec)
     [copy] Copying 2 files to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

jakartamail:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/sun/mail/jakarta.mail/2.0.1/jakarta.mail-2.0.1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/sun/mail/jakarta.mail/2.0.1/jakarta.mail-2.0.1.pom (6 KB at 60.7 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/sun/mail/all/2.0.1/all-2.0.1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/sun/mail/all/2.0.1/all-2.0.1.pom (24 KB at 98.2 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/eclipse/ee4j/project/1.0.6/project-1.0.6.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/eclipse/ee4j/project/1.0.6/project-1.0.6.pom (14 KB at 169.1 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/sun/activation/jakarta.activation/2.0.1/jakarta.activation-2.0.1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/sun/activation/jakarta.activation/2.0.1/jakarta.activation-2.0.1.pom (2 KB at 27.1 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/sun/activation/all/2.0.1/all-2.0.1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/sun/activation/all/2.0.1/all-2.0.1.pom (23 KB at 301.3 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/sun/mail/jakarta.mail/2.0.1/jakarta.mail-2.0.1.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/sun/activation/jakarta.activation/2.0.1/jakarta.activation-2.0.1.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/sun/activation/jakarta.activation/2.0.1/jakarta.activation-2.0.1.jar (61 KB at 541.9 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/sun/mail/jakarta.mail/2.0.1/jakarta.mail-2.0.1.jar (674 KB at 3760.6 KB/sec)
     [copy] Copying 2 files to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

jspc:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/tomcat/jasper-compiler/4.1.36/jasper-compiler-4.1.36.pom
[resolver:resolve] The POM for tomcat:jasper-compiler:jar:4.1.36 is missing, no dependency information available
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/tomcat/jasper-compiler/4.1.36/jasper-compiler-4.1.36.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/tomcat/jasper-compiler/4.1.36/jasper-compiler-4.1.36.jar (180 KB at 390.9 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib
[resolver:resolve] Downloading https://repo1.maven.org/maven2/tomcat/jasper-runtime/4.1.36/jasper-runtime-4.1.36.pom
[resolver:resolve] The POM for tomcat:jasper-runtime:jar:4.1.36 is missing, no dependency information available
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/tomcat/jasper-runtime/4.1.36/jasper-runtime-4.1.36.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/tomcat/jasper-runtime/4.1.36/jasper-runtime-4.1.36.jar (71 KB at 294.6 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib
[resolver:resolve] Downloading https://repo1.maven.org/maven2/javax/servlet/servlet-api/2.3/servlet-api-2.3.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/javax/servlet/servlet-api/2.3/servlet-api-2.3.pom (156 B at 1.4 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar (77 KB at 725.2 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

jai:
[resolver:resolve] Downloading https://repository.jboss.org/nexus/content/groups/public/javax/media/jai-core/1.1.3/jai-core-1.1.3.pom
[resolver:resolve] Downloaded https://repository.jboss.org/nexus/content/groups/public/javax/media/jai-core/1.1.3/jai-core-1.1.3.pom (2 KB at 1.7 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repository.jboss.org/nexus/content/groups/public/javax/media/jai-core/1.1.3/jai-core-1.1.3.jar
[resolver:resolve] Downloaded https://repository.jboss.org/nexus/content/groups/public/javax/media/jai-core/1.1.3/jai-core-1.1.3.jar (1857 KB at 1819.7 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib
[resolver:resolve] Downloading https://repository.jboss.org/nexus/content/groups/public/com/sun/media/jai-codec/1.1.3/jai-codec-1.1.3.pom
[resolver:resolve] Downloaded https://repository.jboss.org/nexus/content/groups/public/com/sun/media/jai-codec/1.1.3/jai-codec-1.1.3.pom (2 KB at 1.8 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repository.jboss.org/nexus/content/groups/public/com/sun/media/jai-codec/1.1.3/jai-codec-1.1.3.jar
[resolver:resolve] Downloaded https://repository.jboss.org/nexus/content/groups/public/com/sun/media/jai-codec/1.1.3/jai-codec-1.1.3.jar (253 KB at 398.9 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

xz:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/tukaani/xz/1.9/xz-1.9.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/tukaani/xz/1.9/xz-1.9.pom (2 KB at 20.8 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/tukaani/xz/1.9/xz-1.9.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/tukaani/xz/1.9/xz-1.9.jar (114 KB at 1168.0 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

junit-engine-vintage:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/junit/vintage/junit-vintage-engine/5.10.2/junit-vintage-engine-5.10.2.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/junit/vintage/junit-vintage-engine/5.10.2/junit-vintage-engine-5.10.2.pom (4 KB at 13.2 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/junit/vintage/junit-vintage-engine/5.10.2/junit-vintage-engine-5.10.2.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/junit/vintage/junit-vintage-engine/5.10.2/junit-vintage-engine-5.10.2.jar (66 KB at 227.2 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

junit-engine-jupiter:
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-engine/5.10.2/junit-jupiter-engine-5.10.2.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-engine/5.10.2/junit-jupiter-engine-5.10.2.pom (4 KB at 32.9 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-api/5.10.2/junit-jupiter-api-5.10.2.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-api/5.10.2/junit-jupiter-api-5.10.2.pom (4 KB at 24.7 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-engine/5.10.2/junit-jupiter-engine-5.10.2.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-api/5.10.2/junit-jupiter-api-5.10.2.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-engine/5.10.2/junit-jupiter-engine-5.10.2.jar (239 KB at 1881.5 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-api/5.10.2/junit-jupiter-api-5.10.2.jar (207 KB at 1622.1 KB/sec)
     [copy] Copying 2 files to C:\Users\tambourine\bin\apache-ant-1.10.15\lib
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-params/5.10.2/junit-jupiter-params-5.10.2.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-params/5.10.2/junit-jupiter-params-5.10.2.pom (3 KB at 10.4 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-params/5.10.2/junit-jupiter-params-5.10.2.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-params/5.10.2/junit-jupiter-params-5.10.2.jar (573 KB at 4087.8 KB/sec)
     [copy] Copying 1 file to C:\Users\tambourine\bin\apache-ant-1.10.15\lib

nonm2-macros:

init-no-m2:

netrexx:
      [get] Getting: https://netrexx.org/files/NetRexxC-2.05.jar
      [get] To: C:\Users\tambourine\bin\apache-ant-1.10.15\lib\NetRexxC-2.05.jar
      [get] https://netrexx.org/files/NetRexxC-2.05.jar permanently moved to https://www.netrexx.org/files/NetRexxC-2.05.jar

all:

BUILD SUCCESSFUL
Total time: 34 seconds

なんかたくさんライブラリを取ってきている。いったん、これでOK

Windows11のWSL2にRubyをインストールしたい

Jekyllでドキュメントサイトを作っているプロジェクトがあり、普段はMacで問題なく扱っている。

これをWindowsでも扱いたいのだが、bundle install でjekyllを入れる途中で、依存ライブラリにnative extensionがあり、ビルドにコケる。Rubyの入れ方がマズいようだ。

PDするのが面倒くさかったので、WSLで動かすことにした。しかし、sudo snap rubyすると、「なんかクラシックモードでしか入らないでござるよ」と言われる。ググると、世の中の人はみんなrbenvをcurlでインストールしてビルドしてる。マジですか?

先人の教え通りにやってみることにした。参考にしたのはここ。

qiita.com

この通りでほぼほぼいけるんだけども、この当時から依存ライブラリが増えているので、記事中でapt installしている

  • libssl-dev
  • libreadline-dev
  • zlib1g-dev
  • build-essential

に加えて、

  • libffi-dev
  • libyaml-dev

をインストールしてやる必要があった。

「Looks Good To Me」を30分でめくった

面白そうな本だなと思っていたんだけども、こういうツイートを見た。

ヤバい。買えなくなる。慌ててAmazonでポチったのが8/16の夜。今日届いた。そして、今現在、Amazonの在庫はない。Kindleは買えるけど。

400ページぐらいある本なので、ちゃんと読むのは大変だ。でも、とりあえず何が書いてあるのか、何を知りたいときにこの本を開けばいいのか確認するために、30分かけて全部めくってみようと思った。その結果出来たメモを置いておく。言っとくけど、読めてないんで。めくっただけね。


www.shuwasystem.co.jp

著者は、フィリピンの女性らしい。私はフィリピンの開発者に仕事を委託することがあるんだけど、フィリピンの開発者は総じて若い。そりゃそうだ。我々が若い頃、同年代のフィリピン人はたぶんパソコンを持ってなかったのだ。なので、仕事のやり方が全体的に進んでる。日本には進んでる人達もおっくれまくってる人達も色々いるが、フィリピンの開発者は総じて若く、新しいプロセスに慣れている。こういう本がフィリピンの開発者から出てくるのは必然なのかもしれない。

全体として、ちゃんとしたHow To。jnchitoさんなんかはブログで

【書評】開発チームのコードレビューをより改善したい人に!「Looks Good To Me」を読んでみた - give IT a try

僕が働いている株式会社ソニックガーデンでは、本書で書かれているような取り組みはだいたいすでにやっていて、僕自身、コードレビューのプロセスについては大きな不満は持っていません。 ですので、本書を読んでいて「うん、そのとおり」とか「やっぱりそうだよね」と思うことはあっても、「それは知らなかった!」と思うような目新しい内容はあまりありませんでした。

と書いている。私もビックリするようなことが書いてあるわけではないけども、そもそも、ウチは社内でコードレビューのプロセスとか心構えとかタグ付けのルールとか上手く行かないときの対処法とか、議論されているところを見たことがないレベルである。というか、私以外に開発者(大抵はビジネスパートナー。それこそフィリピンの人とか)が書いたコードをレビューしている人に巡り会ったことが無い(いないわけではないと思う。でっかい会社だから。一緒のプロジェクトになったことないだけだと思う)ので私も我流でしかやってないので、すべてが勉強になった。

というか、プロジェクトごとにレビュープロセスやら、PR出すときのルールやら、毎回作っていたので、テンプレがあるだけでめちゃめちゃうれしい。みっちり詰まっていてとてもありがたい。

というわけで、以下、30分かけてめくった気になった点のメモを載せていく。


Chapter 2 コードレビュー徹底解剖

  • PRタイトルの分類プレフィックス表が有用。これをベースにやりたい。
  • PRに付けるタグの例として「Oh My Zsh」がよいサンプル
  • P.48のPRのステータスの例もありがたい
  • P.55のPR作成者の心構えは重要。これも明確に文書になっているものが欲しかった

Chapter 3 チームの最初のコードレビュープロセスの構築

  • コードレビューの目標設定大事。というか、レビュアとレビュイが「何のためにやってんのか」を理解していないとキツイ。よくレビュイから「Approveされるための条件を出せ」と言われたりするけど、それはこの目標が共有されてないがために出る発言だったりする。で、以下に目標になり得るものが並んでるんだけど、1つ1つ、「これを目標にするべき?」って書いてある。確かに全然自明じゃない。これは重要。
    • バグの発見
    • コードベースの安定性とメンテナンス性
    • 知識移転・共有
    • メンタリング
    • 記録の保持・作成
  • で、「知識移転・共有」に関するところで、「方法でなく、理由をドキュメント化する」があるの超重要。わりとよくメンバーに言うわ。
  • レビューのフローで、「こういうのは承認を妨げないよ」という非ブロッキング問題をチームで決めておけと書いてあって、なるほどと思った。
  • 誰に承認権限を持たせるか問題と、承認は2つ必要にしておけとの助言。でも、プロジェクト始まったとき、レビュアは私だけだったりすんだよなあ。こういう場合は何はともあれ2人目の承認権保持者をどうやって育てるかが鍵。もちろん、理想的には全員が持つべきなんだけど、いきなりは厳しい。

Chapter 4 チームワーキングアグリーメント(TWA)

  • そもそもTWAという言葉を初めて聞いた
  • 応答時間はどうあるべきか決めろって。くぅー。だよなあ。これをチームで話し合ったことがないよ・・・
  • P.134にNitpicsという用語が出てくる。PRの承認を邪魔されたくない細かい指摘のことらしい。ちゃんと名前を付けるの大事。

Chapter 5 自動化のメリット

  • 「20分でPRをレビューすることを想像してみてください。不可能に思えますか?正しいものを自動化すれば、実際にはかなりの確率で可能です」・・・マジデーーー?
  • Lint, 静的解析、自動テスト、PRテンプレート、PRバリデータを使え。
  • GitHubのCODEOWNERSファイルでPRの担当者を自動アサイン出来るらしい。存在を知らない機能なんですけど。
    • ちなみにこれは本書で「超高機能」と書いてあって、「あなたのチームが、このレベルの自動化、またはそれにかなり近い状態に達することが理想的です」と書いてある。そうですか・・・

Chapter 6 効果的なコードレビューコメントの作成

  • 客観性をもった変更の提案をするために自問するための5つのP(Pause,Ponder, Pass, Propose, Postpone)
  • P.192 Conventional Commitと同じようなConventional Commentをフォーマットとして使う。ごめん、Conventional Commitを知らん。知らないことが多すぎる。
    • ここにもラベル一覧があってうれしい
  • 肯定的なコメントもしようぜ、良いコードを称賛しようぜと書いてあって、それはほんとにそう

Chapter 7 コードレビューがダメになる理由

  • 本書のタイトルはこれから来てるんだと思うけど、「LGTM症候群」(まあ、俺はいいと思うけどね・・・と適当に承認しちゃうこと)について語られてる
  • 全体的に耳が痛い

Chapter 8 コードレビューの遅延を減らす

  • 大量の修正がPRレビューに必要になるなら、レビューマイルストーンを作って途中途中でチェックしようぜと書いてあって、必要なときにそれを繰り出せるのは大事

Chapter 9 プロセスの抜け穴を取り除く

  • 「こういうことが起きるでしょう。だから、こうするでしょ」と丁寧にレビュープロセスの改善について語ってて、ここはゆっくり読みたい
  • これのIssue対応フローのバージョンが読みたい
  • 「指標は、目標でなくシグナルとして利用する」。はい、これだいじー!

Chapter 10 緊急時対応プレイブック

  • 緊急のバグ対応の時も2人の承認いるんですか問題対応。緊急時にはそれ用メカニズムを作っておけ。まったくだ!

Chapter 11 コードレビューとペアプログラミング

  • ペアプロはコードレビューの代わりにはなりません。両方やってください」が言いたいこと
  • それはそれとして、いろんなスタイルのペアプロが羅列してあって、面白い

Chapter 12 コードレビューとモブプログラミング

  • 「モブプロはコードレビューの代わりにはなりません。両方やってください」が言いたいこと。上と同じや!
  • 何を目的としてモブプロやるかが整理されてる

Chapter 13 コードレビューとAI

  • ここは来年には変わってそうだけど、とりあえず、コンテキストとドメインの理解に限界はあるが、使いようによってAIはめっちゃ役に立つぜと書いてある

付録

  • TWAやPRのテンプレがいっぱいあったり、ツールのリストがあったり、お役立ち。コピペしたい。

とりあえず、今のプロジェクトで開発が始まるまでにやんなきゃいけないことがいっぱいあるなと思ってツライ気持ちになった。アーキテクトとテックリード兼ねるの無理だって。そろそろ増員して!(笑)

Azureで遊んでみる(そのよん)

Key Vaultを作ったので鍵ファイルを登録してみようとしたのだが、権限がなくて入らない。どうしていいのかよくわからない。

で、色々見ていたんだけども、Azureの権限管理のやり方が変わったらしい。前のも理解していないのだが、このアカウントはコロナ前に作ってその頃ちょっといじって(構築手順のスクリーンショットを作るだけのために作ったプライベートなものだったのだ)放置していたものなので、確実に古いままであろう。

learn.microsoft.com

このページを読まないといけない気がする。

しかし、AzureのRBAC(ロールベースの権限管理)についてそもそも何も知らないので、もっと基礎的なところをやりたい。

いろいろ調べていると、要するにAZ-104 Azure Administrator Associate という資格のためのコースをやってみるのが手っ取り早そうである。いや、数日かかるコースなので手っ取り早くもなんともないかもしれないが。

というわけで、AZ-104を読み進めてみる。いらないところはどんどん飛ばす。

まずは、これ

learn.microsoft.com

中身はPortalの使い方であったり、はてはbashPowerShellの使い方なのでざっと流し読んだ。

が、最後の「ARMテンプレートでのIaaC的なやつ」はちょっと手を動かしてみたいところ。なので、やってみた。

まず、ローカルのコンソールでAzureに入れとのこと。入れた覚えがないからたぶん最初から入っていたAzure Cloud Shell でAzureに繋いでみる。

画面を立ち上げると、ブラウザで認証しろと言われるので素直にやる。ここからazコマンドが叩けるみたい。いちいち同等のPowerShellのコマンドレットがあるようで、モヤる。

リソース グループでテンプレートのデプロイを開始するには、Azure CLI コマンドの az deployment group create または Azure PowerShell コマンドの New-AzResourceGroupDeployment を使用します。

いちいち2パターンあるの??

この後の演習で、VSCode上で作ったテンプレートを

  • Azure Resource Manager Tool
  • Azure PowerShell Tools

というExtensionを入れて操作するんだけど、その場合にはローカルでAzure PowerShellが動かないといけないらしい。それは上のAzure Cloud Shellとは別物。Azure Cloud Shellはたぶんリモートにあるシェルに接続に行ってるっぽい。似たような名前のものがたくさんありすぎて訳が分からない。

learn.microsoft.com

これをやってみる。

PS C:\Users\tmbrm> Get-Module -Name AzureRM -ListAvailable
PS C:\Users\tmbrm> Get-ExecutionPolicy -List

        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser       Undefined
 LocalMachine    RemoteSigned

PS C:\Users\tmbrm> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
PS C:\Users\tmbrm> Get-ExecutionPolicy -List

        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser    RemoteSigned
 LocalMachine    RemoteSigned
PS C:\Users\tmbrm> Install-Module -Name Az -Force
PS C:\Users\tmbrm> Connect-AzAccount
Please select the account you want to login with.      <=  ここでブラウザでログインさせられる

Retrieving subscriptions for the selection...

Subscription name Tenant
----------------- ------
従量課金          既定のディレクトリ

たしか、昔々からPowerShellは自分が書いたスクリプトも権限設定をしないと実行できないような謎環境だった覚えがあるけど、 実行権限はさらに複雑になっているようだ。Windowsの権限回りは難しすぎてとても運用できる気がしない。

とりあえず、これでAzure CLI相当の何かがPowerShellに入り、Azureに接続できた。うれしい。

ここから演習に戻る。まずは、準備

PS C:\Users\tmbrm\OneDrive\デスクトップ> Get-AzSubscription

   TenantId: aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e(ダミーの値です)

Name     Id                                   State
----     --                                   -----
従量課金 ffff0f0f-gg1g-hh2h-ii3i-jjjjjj4j4j4j(これもダミー) Enabled

PS C:\Users\tmbrm\OneDrive\デスクトップ> Get-AzSubscription -SubscriptionId ffff0f0f-gg1g-hh2h-ii3i-jjjjjj4j4j4j

   TenantId: aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e

Name     Id                                   State
----     --                                   -----
従量課金 ffff0f0f-gg1g-hh2h-ii3i-jjjjjj4j4j4j Enabled

PS C:\Users\tmbrm\OneDrive\デスクトップ> $context = Get-AzSubscription -SubscriptionId ffff0f0f-gg1g-hh2h-ii3i-jjjjjj4j4j4j
PS C:\Users\tmbrm\OneDrive\デスクトップ> Set-AzContext $context

   Tenant: 既定のディレクトリ (aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e)

SubscriptionName SubscriptionId                       Account           Environment
---------------- --------------                       -------           -----------
従量課金         ffff0f0f-gg1g-hh2h-ii3i-jjjjjj4j4j4j tmbrms@example.com AzureCloud

PS C:\Users\tmbrm\OneDrive\デスクトップ> Set-AzDefault -ResourceGroupName Malabar

Id         : /subscriptions/ffff0f0f-gg1g-hh2h-ii3i-jjjjjj4j4j4j/resourceGroups/Malabar
Name       : Malabar
Properties : Microsoft.Azure.Management.Internal.Resources.Models.ResourceGroupProperties
Location   : japaneast
ManagedBy  : 
Tags       : {}

そもそも、テナントとかサブスクリプションという用語がちゃんと理解できていない。むずい。まあ、とりあえずターゲットのリソースグループはこれで指定できた。

そして、VSCodeのExtensionが作ってくれた空っぽのテンプレを適用してみる。

PS C:\Users\tmbrm\OneDrive\デスクトップ> $templateFile="azuredeploy.json"
PS C:\Users\tmbrm\OneDrive\デスクトップ> $today=Get-Date -Format "MM-dd-yyyy"
PS C:\Users\tmbrm\OneDrive\デスクトップ> $deploymentName="blanktemplate-"+"$today"
PS C:\Users\tmbrm\OneDrive\デスクトップ> New-AzResourceGroupDeployment `                           
>>  -Name $deploymentName `  
>>  -TemplateFile $templateFile

DeploymentName          : blanktemplate-08-18-2025
ResourceGroupName       : Malabar
ProvisioningState       : Succeeded
Timestamp               : 2025/08/18 9:54:36
Mode                    : Incremental
TemplateLink            : 
Parameters              : 
Outputs                 : 
DeploymentDebugLogLevel : 

PSって何もしていないとコマンド結果が展開されて変数に入るの?なんか怖い。

それはともかく、空っぽのテンプレをデプロイできた。Portalから確認できる。

次に中身を入れる。リソースタイプを入れるとExtensionがテンプレを更新してくれて、どこを入力すればいいかハイライトしてくれる。ありがたい。ほぼGUIである(笑)。

研修ではStorageAccountを作ってみろということになっている。この後で使いそうなので素直に作る。ストレージアカウントが何か知らないけど。

PS C:\Users\tmbrm\OneDrive\デスクトップ> $deploymentName="addstorage--"+"$today"  
PS C:\Users\tmbrm\OneDrive\デスクトップ> New-AzResourceGroupDeployment `        
>>  -Name $deploymentName `
>>  -TemplateFile $templateFile
New-AzResourceGroupDeployment: 19:09:12 - Error: Code=InvalidTemplateDeployment; Message=The template deployment 'addstorage--08-18-2025' is not valid according to the validation procedure. The tracking id is '28b14f33-063f-4ae7-9c98-c6c4ac41c8c2'. See inner errors for details.
New-AzResourceGroupDeployment: 19:09:12 - Error: Code=PreflightValidationCheckFailed; Message=Preflight validation failed. Please refer to the details for the specific errors.
New-AzResourceGroupDeployment: 19:09:12 - Error: Code=AccountNameInvalid; Message=malabarSA is not a valid storage account name. Storage account name must be between 3 and 24 characters in length and use numbers and lower-case letters only.
New-AzResourceGroupDeployment: The deployment validation failed

名前に大文字を使ったらエラーになった。悲しい。直して再実行。

PS C:\Users\tmbrm\OneDrive\デスクトップ> New-AzResourceGroupDeployment `
>>  -Name $deploymentName `
>>  -TemplateFile $templateFile

DeploymentName          : addstorage--08-18-2025
ResourceGroupName       : Malabar
ProvisioningState       : Succeeded
Timestamp               : 2025/08/18 10:11:27
Mode                    : Incremental
TemplateLink            : 
Parameters              : 
Outputs                 : 
DeploymentDebugLogLevel : 

ちゃんとできている。すごく敷居が高いことが理解できた。日々の作業では使わないな。なんか、これを使ってがりがりやる定例作業とかがないとこの複雑さに見合わない気がする。まあ、生まれたばかりのAWSAPIしかなかったらしいけど。

WindowsマシンにClaude Codeを入れる

プライベートお遊び用にSurface pro 12inchを買ったので、いろいろ入れて遊びたい。今回は今話題のClaude Codeで遊ぶ。

さて、何をすればいいのかというと、npmでインストールすればいいだけらしい。が、なにせWindows にNode.jsだという時点で、もう何が正解なのか無限の選択肢があって意味が分からない。いろいろ調べてみたが、もうめんどくさくなったので適当におもいついたままやってみる

まず、WSLに入れるのか、 ネイティブでやるのかだけど、せっかくWindowsでやるのでネイティブにしてみたい。今年の7月ぐらいにできるようになったらしい。

次にnpmだけど、こっちもBunやらYarnやらpnpmやらフロントエンドをやらない身からするとわけのわからないことこの上ない。 うーん・・・と思いながら、Power Shellでwinget search npm してみるとリストにVoltaというものが出てくる。新しめのnpmのバージョン管理ツール(rbenvみたいなもの?)らしい。よくわからんが、よくわからないのでこれを試す。

docs.volta.sh

PS C:\Users\tmbrm> winget install Volta.Volta
見つかりました Volta [Volta.Volta] バージョン 2.0.2
このアプリケーションは所有者からライセンス供与されます。
Microsoft はサードパーティのパッケージに対して責任を負わず、ライセンスも付与しません。
ダウンロード中 https://github.com/volta-cli/volta/releases/download/v2.0.2/volta-2.0.2-windows-arm64.msi
  ██████████████████████████████  5.04 MB / 5.04 MB
インストーラーハッシュが正常に検証されました
パッケージのインストールを開始しています...
インストールが完了しました
(シェルを再起動)
PS C:\Users\tmbrm> volta install node@latest
success: installed and set node@24.6.0 (with npm@11.5.1) as default
PS C:\Users\tmbrm> npm -v
11.5.1
PS C:\Users\tmbrm> node -v
v24.6.0

たぶんよさげ。

PS C:\Users\tmbrm> npm install -g @anthropic-ai/claude-code

added 12 packages in 7s

11 packages are looking for funding
  run `npm fund` for details

これで、作業用のディレクトリを作り、そこでclaudeとタイプすれば起動する。Pro $20 を払ったので、認証はブラウザ経由でされた。

からっぽのディレクトリでclaudeを起動し、Swaggerのcodegenのサンプルを作ってもらうことにした。

> I want to make mock site of API server by openapi codegen. Please make a sample?

● I'll help you create a mock API server using OpenAPI codegen. Let me set up a sample project with OpenAPI
  specification and generate a mock server.

● Update Todos
  ⎿  ☐ Create OpenAPI specification file
     ☐ Set up package.json with required dependencies
     ☐ Generate mock server code using OpenAPI codegen
     ☐ Create server implementation and startup script
     ☐ Test the mock API server

● Update Todos
  ⎿  ☐ Create OpenAPI specification file
     ☐ Set up package.json with required dependencies
     ☐ Generate mock server code using OpenAPI codegen
     ☐ Create server implementation and startup script
     ☐ Test the mock API server

● Write(openapi.yaml)
  ⎿  Wrote 1 lines to openapi.yaml
     openapi: 3.0.3
     info:
       title: Sample API
       description: A sample API for mock server demonstration
       version: 1.0.0
       contact:
         name: API Support
         email: support@example.com
     servers:
       - url: http://localhost:3000/api/v1

● Update Todos
  ⎿  ☒ Create OpenAPI specification file
     ☐ Set up package.json with required dependencies
     ☐ Generate mock server code using OpenAPI codegen
     ☐ Create server implementation and startup script
     ☐ Test the mock API server

● Write(package.json)
  ⎿  Wrote 1 lines to package.json
     {
       "name": "openapi-mock-server",
       "version": "1.0.0",
       "description": "Mock API server generated from OpenAPI specification",
       "main": "server.js",
       "scripts": {
         "start": "node server.js",
         "dev": "nodemon server.js",
         "generate": "openapi-generator-cli generate -i openapi.yaml -g nodejs-express-server -o generated",
         "build": "npm run generate && npm run copy-impl",

● Update Todos
  ⎿  ☒ Create OpenAPI specification file
     ☒ Set up package.json with required dependencies
     ☐ Generate mock server code using OpenAPI codegen
     ☐ Create server implementation and startup script
     ☐ Test the mock API server

  Bash(npm install)
  ⎿  added 275 packages, and audited 276 packages in 16s

     60 packages are looking for funding
     … +3 lines (ctrl+r to expand)

  Write(server.js)
  ⎿  Wrote 1 lines to server.js
     const express = require('express');
     const cors = require('cors');
     const bodyParser = require('body-parser');
     const swaggerUi = require('swagger-ui-express');
     const YAML = require('js-yaml');
     const fs = require('fs');
     const { v4: uuidv4 } = require('uuid');
     const app = express();
     const PORT = process.env.PORT || 3000;

  Update Todos
  ⎿  ☒ Create OpenAPI specification file
     ☒ Set up package.json with required dependencies
     ☒ Generate mock server code using OpenAPI codegen
     ☒ Create server implementation and startup script
     ☐ Test the mock API server

  Write(README.md)
  ⎿  Wrote 1 lines to README.md
     # OpenAPI Mock Server
     A mock API server generated from OpenAPI specification with Express.js.
     ## Features
     - RESTful API with Users and Products endpoints
     - OpenAPI 3.0.3 specification
     - Swagger UI documentation
     - CORS support

● Bash(npm start)
  ⎿  Running in the background (down arrow to manage)

● BashOutput(Reading shell output)
  ⎿  > openapi-mock-server@1.0.0 start
     > node server.js
     … +5 lines (ctrl+r to expand)

  Bash(curl http://localhost:3000/health)
  ⎿  {
       "status": "OK",
       "timestamp": "2025-08-17T09:30:45.483Z"
     … +5 lines (ctrl+r to expand)

● Bash(curl http://localhost:3000/api/v1/users)
  ⎿  {
       "users": [
         {
     … +28 lines (ctrl+r to expand)

● Update Todos
  ⎿  ☒ Create OpenAPI specification file
     ☒ Set up package.json with required dependencies
     ☒ Generate mock server code using OpenAPI codegen
     ☒ Create server implementation and startup script
     ☒ Test the mock API server

● I've created a complete mock API server based on OpenAPI specification. Here's what was built:

  Files created:
  - openapi.yaml - OpenAPI 3.0.3 specification with Users and Products endpoints
  - package.json - Dependencies and scripts
  - server.js - Express.js mock server implementation
  - README.md - Documentation and usage instructions

  Features:
  - RESTful API with CRUD operations for Users and Products
  - Swagger UI documentation at /api-docs
  - Input validation and error handling
  - CORS support and health checks
  - Mock data with UUIDs

  Server is running on http://localhost:3000 with endpoints:
  - GET /api/v1/users - List users (with pagination)
  - POST /api/v1/users - Create user
  - GET /api/v1/users/{id} - Get user by ID
  - PUT /api/v1/users/{id} - Update user
  - DELETE /api/v1/users/{id} - Delete user
  - GET /api/v1/products - List products (with filtering)
  - POST /api/v1/products - Create product

  Visit http://localhost:3000/api-docs for interactive API documentation.

途中で「ファイル作ってもいーい?」と聞いてくるので何もチェックせずに(だってcodegen何も知らないし・・・)OKを出した。npm installnpm start もなんでもOK。結果がこれである。あっているのかわからないけど、動いているの、これ・・・?

ちなみに、最後のURLにアクセスすると見慣れたSwaggerの画面が見られます。うーむ・・・