«前の日記(2017-09-06) 最新 次の日記(2019-08-15)» 編集

会長@腹部日記


2019-08-14 [長年日記]

_ Docker使って手軽にPlantUMLのwarをビルド

$ git clone https://github.com/plantuml/plantuml-server

$ cd plantuml-server

# maven repository用volume
$ volume create --name maven-repo

# proxy設定を行う
$ docker run --rm maven:3.6.1-jdk-11 cat /usr/share/maven/conf/settings.xml > settings.xml
$ vi settings.xml

$ docker run \
   -it \
   --rm \
   -e http_proxy=<必要に応じて> \  # proxy環境下向け
   -e https_proxy=<必要に応じて> \ # proxy環境下向け
   -v `pwd`/settings.xml:/usr/share/maven/conf/settings.xml \ # proxy環境下向け
   -v `pwd`:/usr/src/mymaven \
   -v maven-repo:/root/.m2 \
   -w /usr/src/mymaven \
   maven:3.6.1-jdk-11 \
   mvn install

% ls -l target
total 9388
-rw-r--r-- 1 root root      87 Aug 15 13:29 checkstyle-cachefile
-rw-r--r-- 1 root root    4941 Aug 15 13:29 checkstyle-checker.xml
-rw-r--r-- 1 root root   11358 Aug 15 13:29 checkstyle-header.txt
-rw-r--r-- 1 root root    2070 Aug 15 13:29 checkstyle-result.xml
drwxr-xr-x 3 root root    4096 Aug 15 13:29 classes
drwxr-xr-x 2 root root    4096 Aug 15 13:30 dependency
drwxr-xr-x 4 root root    4096 Aug 15 13:29 generated-sources
drwxr-xr-x 2 root root    4096 Aug 15 13:29 maven-archiver
drwxr-xr-x 5 root root    4096 Aug 15 13:29 plantuml
-rw-r--r-- 1 root root 9556130 Aug 15 13:29 plantuml.war # ★これ★
drwxr-xr-x 3 root root    4096 Aug 15 13:29 test-classes