From 3ae4aacd33bcd9ee7d3913fd88683201ea4272f1 Mon Sep 17 00:00:00 2001 From: V_Galaxy <1904821183@qq.com> Date: Sat, 12 Aug 2023 13:57:01 +0800 Subject: [PATCH 01/20] build: optimize 'download-swagger-ui' in hugegraph-dist --- hugegraph-dist/pom.xml | 64 ++++++++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 15 deletions(-) diff --git a/hugegraph-dist/pom.xml b/hugegraph-dist/pom.xml index 8c23199544..aa8ed69c58 100644 --- a/hugegraph-dist/pom.xml +++ b/hugegraph-dist/pom.xml @@ -179,21 +179,42 @@ run - - - wget --version 1>/dev/null || exit - wget https://github.com/swagger-api/swagger-ui/archive/refs/tags/v4.15.5.tar.gz - tar zxvf v4.15.5.tar.gz - echo "window.onload = function() { window.ui = SwaggerUIBundle({ - url:'/openapi.json',dom_id:'#swagger-ui',deepLinking:true,layout:'StandaloneLayout', - presets:[SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset ], - plugins:[SwaggerUIBundle.plugins.DownloadUrl]});};" > swagger-ui-4.15.5/dist/swagger-initializer.js - cp -r swagger-ui-4.15.5/dist ../${final.name}/swagger-ui - - - - - + + + + + + + /dev/null || exit +# TODO: perhaps it's necessary verify the checksum before reusing the existing v4.15.5.tar.gz +if [ ! -f v4.15.5.tar.gz ]; then + curl -s -S -L -o v4.15.5.tar.gz \ + https://github.com/swagger-api/swagger-ui/archive/refs/tags/v4.15.5.tar.gz +fi +tar zxf v4.15.5.tar.gz -C . > /dev/null 2>&1 +echo "window.onload = function() { window.ui = SwaggerUIBundle({ +url:'/openapi.json',dom_id:'#swagger-ui',deepLinking:true,layout:'StandaloneLayout', +presets:[SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset ], +plugins:[SwaggerUIBundle.plugins.DownloadUrl]});};" > swagger-ui-4.15.5/dist/swagger-initializer.js +cp -r swagger-ui-4.15.5/dist ../${final.name}/swagger-ui +rm -rf dist.sh swagger-ui-4.15.5 +]]> + + + + + + + + + + + @@ -212,6 +233,19 @@ + + + ant-contrib + ant-contrib + 1.0b3 + + + ant + ant + + + + From 0a9215f5ccc83dcacaf80142c0910a58039323be Mon Sep 17 00:00:00 2001 From: V_Galaxy <1904821183@qq.com> Date: Mon, 14 Aug 2023 16:46:42 +0800 Subject: [PATCH 02/20] chore: skip the swagger building if network/curl broken --- hugegraph-dist/pom.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hugegraph-dist/pom.xml b/hugegraph-dist/pom.xml index aa8ed69c58..2b464d7b01 100644 --- a/hugegraph-dist/pom.xml +++ b/hugegraph-dist/pom.xml @@ -187,11 +187,13 @@ /dev/null || exit +curl --version >/dev/null \ + || { echo 'ERROR: Please install `curl` first if you need `swagger-ui`'; exit; } # TODO: perhaps it's necessary verify the checksum before reusing the existing v4.15.5.tar.gz if [ ! -f v4.15.5.tar.gz ]; then curl -s -S -L -o v4.15.5.tar.gz \ - https://github.com/swagger-api/swagger-ui/archive/refs/tags/v4.15.5.tar.gz + https://github.com/swagger-api/swagger-ui/archive/refs/tags/v4.15.5.tar.gz \ + || { echo 'ERROR: Download `swagger-ui` failed, please check your network connection'; exit; } fi tar zxf v4.15.5.tar.gz -C . > /dev/null 2>&1 echo "window.onload = function() { window.ui = SwaggerUIBundle({ @@ -200,6 +202,7 @@ presets:[SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset ], plugins:[SwaggerUIBundle.plugins.DownloadUrl]});};" > swagger-ui-4.15.5/dist/swagger-initializer.js cp -r swagger-ui-4.15.5/dist ../${final.name}/swagger-ui rm -rf dist.sh swagger-ui-4.15.5 +echo 'INFO: Successfully download `swagger-ui`' ]]> Date: Mon, 14 Aug 2023 21:39:09 +0800 Subject: [PATCH 03/20] chore: extract embedded script as a separate file --- hugegraph-dist/dist.sh | 25 +++++++++++++++++++++++++ hugegraph-dist/pom.xml | 35 ++++++++++++++--------------------- 2 files changed, 39 insertions(+), 21 deletions(-) create mode 100644 hugegraph-dist/dist.sh diff --git a/hugegraph-dist/dist.sh b/hugegraph-dist/dist.sh new file mode 100644 index 0000000000..624675a8c4 --- /dev/null +++ b/hugegraph-dist/dist.sh @@ -0,0 +1,25 @@ +#!/bin/bash +VERSION=4.15.5 +curl --version >/dev/null 2>&1 || + { + echo 'ERROR: Please install `curl` first if you need `swagger-ui`' + exit + } +# TODO: perhaps it's necessary verify the checksum before reusing the existing tar +if [ ! -f v$VERSION.tar.gz ]; then + curl -s -S -L -o v$VERSION.tar.gz \ + https://github.com/swagger-api/swagger-ui/archive/refs/tags/v$VERSION.tar.gz || + { + echo 'ERROR: Download `swagger-ui` failed, please check your network connection' + exit + } +fi +tar zxf v$VERSION.tar.gz -C . >/dev/null 2>&1 +echo "window.onload = function() { window.ui = SwaggerUIBundle({ +url:'/openapi.json',dom_id:'#swagger-ui',deepLinking:true,layout:'StandaloneLayout', +presets:[SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset ], +plugins:[SwaggerUIBundle.plugins.DownloadUrl]});};" > \ + swagger-ui-$VERSION/dist/swagger-initializer.js +# conceal the VERSION from the outside +mv swagger-ui-$VERSION swagger-ui +echo 'INFO: Successfully download `swagger-ui`' diff --git a/hugegraph-dist/pom.xml b/hugegraph-dist/pom.xml index 2b464d7b01..9039038592 100644 --- a/hugegraph-dist/pom.xml +++ b/hugegraph-dist/pom.xml @@ -185,31 +185,24 @@ - - /dev/null \ - || { echo 'ERROR: Please install `curl` first if you need `swagger-ui`'; exit; } -# TODO: perhaps it's necessary verify the checksum before reusing the existing v4.15.5.tar.gz -if [ ! -f v4.15.5.tar.gz ]; then - curl -s -S -L -o v4.15.5.tar.gz \ - https://github.com/swagger-api/swagger-ui/archive/refs/tags/v4.15.5.tar.gz \ - || { echo 'ERROR: Download `swagger-ui` failed, please check your network connection'; exit; } -fi -tar zxf v4.15.5.tar.gz -C . > /dev/null 2>&1 -echo "window.onload = function() { window.ui = SwaggerUIBundle({ -url:'/openapi.json',dom_id:'#swagger-ui',deepLinking:true,layout:'StandaloneLayout', -presets:[SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset ], -plugins:[SwaggerUIBundle.plugins.DownloadUrl]});};" > swagger-ui-4.15.5/dist/swagger-initializer.js -cp -r swagger-ui-4.15.5/dist ../${final.name}/swagger-ui -rm -rf dist.sh swagger-ui-4.15.5 -echo 'INFO: Successfully download `swagger-ui`' -]]> - + failonerror="false"> + + + + + + + + + From eebcdede51f2dcd3bc62b9f9a6f51d63a57c5614 Mon Sep 17 00:00:00 2001 From: V_Galaxy <1904821183@qq.com> Date: Mon, 14 Aug 2023 21:45:39 +0800 Subject: [PATCH 04/20] chore: add maven-enforcer-plugin to check java and maven version --- pom.xml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pom.xml b/pom.xml index 719328316c..fc2db46983 100644 --- a/pom.xml +++ b/pom.xml @@ -676,6 +676,29 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-all + + enforce + + + + + + [1.8,12) + + + [3.5.0,) + + + + + + From 97e9269514ed5d8f07f401e8d478d4e5b2b0e4b0 Mon Sep 17 00:00:00 2001 From: V_Galaxy <1904821183@qq.com> Date: Mon, 14 Aug 2023 22:10:22 +0800 Subject: [PATCH 05/20] chore: add LICENSE for dist.sh --- hugegraph-dist/dist.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hugegraph-dist/dist.sh b/hugegraph-dist/dist.sh index 624675a8c4..ffa0cc7d1f 100644 --- a/hugegraph-dist/dist.sh +++ b/hugegraph-dist/dist.sh @@ -1,4 +1,20 @@ #!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with this +# work for additional information regarding copyright ownership. The ASF +# licenses this file to You under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# VERSION=4.15.5 curl --version >/dev/null 2>&1 || { From 2782366919a8f94e8de05957b23490767e297f93 Mon Sep 17 00:00:00 2001 From: imbajin Date: Thu, 17 Aug 2023 01:54:32 +0800 Subject: [PATCH 06/20] Update dist.sh --- hugegraph-dist/dist.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hugegraph-dist/dist.sh b/hugegraph-dist/dist.sh index ffa0cc7d1f..64029d49a0 100644 --- a/hugegraph-dist/dist.sh +++ b/hugegraph-dist/dist.sh @@ -16,13 +16,15 @@ # under the License. # VERSION=4.15.5 + curl --version >/dev/null 2>&1 || { echo 'ERROR: Please install `curl` first if you need `swagger-ui`' exit } + # TODO: perhaps it's necessary verify the checksum before reusing the existing tar -if [ ! -f v$VERSION.tar.gz ]; then +if [[ ! -f v$VERSION.tar.gz ]]; then curl -s -S -L -o v$VERSION.tar.gz \ https://github.com/swagger-api/swagger-ui/archive/refs/tags/v$VERSION.tar.gz || { @@ -30,12 +32,15 @@ if [ ! -f v$VERSION.tar.gz ]; then exit } fi + tar zxf v$VERSION.tar.gz -C . >/dev/null 2>&1 + echo "window.onload = function() { window.ui = SwaggerUIBundle({ url:'/openapi.json',dom_id:'#swagger-ui',deepLinking:true,layout:'StandaloneLayout', presets:[SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset ], plugins:[SwaggerUIBundle.plugins.DownloadUrl]});};" > \ swagger-ui-$VERSION/dist/swagger-initializer.js + # conceal the VERSION from the outside mv swagger-ui-$VERSION swagger-ui echo 'INFO: Successfully download `swagger-ui`' From 1534605ae8ab64a2d601fd3930ec19967bf8cd27 Mon Sep 17 00:00:00 2001 From: V_Galaxy <1904821183@qq.com> Date: Thu, 17 Aug 2023 11:09:42 +0800 Subject: [PATCH 07/20] chore: move download-swagger-ui to root pom plugin management --- hugegraph-dist/pom.xml | 92 +++++++++++++++++------------------------- pom.xml | 36 +++++++++++++++++ 2 files changed, 74 insertions(+), 54 deletions(-) diff --git a/hugegraph-dist/pom.xml b/hugegraph-dist/pom.xml index 9039038592..145a722432 100644 --- a/hugegraph-dist/pom.xml +++ b/hugegraph-dist/pom.xml @@ -170,50 +170,11 @@ + org.apache.maven.plugins maven-antrun-plugin - download-swagger-ui - package - - run - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + tar-package package run @@ -229,20 +190,43 @@ - - - ant-contrib - ant-contrib - 1.0b3 - - - ant - ant - - - - + + + + unix-download-swagger-ui + + + + org.apache.maven.plugins + maven-antrun-plugin + + + + + + unix + Linux + + + + + mac-download-swagger-ui + + + + org.apache.maven.plugins + maven-antrun-plugin + + + + + + mac + + + + diff --git a/pom.xml b/pom.xml index fc2db46983..325e07625b 100644 --- a/pom.xml +++ b/pom.xml @@ -453,6 +453,42 @@ true + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + download-swagger-ui + prepare-package + + run + + + + + + + + + + + + + + + + + + + + From 509a4e27f8f58807be4c36019b7eb1330b01d63a Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Tue, 22 Aug 2023 17:39:13 +0800 Subject: [PATCH 08/20] chore: move profiles in hugegraph-dist to root pom --- hugegraph-dist/pom.xml | 83 ------------------------------------- pom.xml | 94 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 83 deletions(-) diff --git a/hugegraph-dist/pom.xml b/hugegraph-dist/pom.xml index 145a722432..686ac4116e 100644 --- a/hugegraph-dist/pom.xml +++ b/hugegraph-dist/pom.xml @@ -124,30 +124,6 @@ - - maven-assembly-plugin - 2.4 - - - assembly-hugegraph - package - - single - - - false - false - ${top.level.dir} - - - ${assembly.descriptor.dir}/assembly.xml - - ${final.name} - - - - - org.apache.maven.plugins maven-clean-plugin @@ -168,65 +144,6 @@ - - - org.apache.maven.plugins - maven-antrun-plugin - - - tar-package - package - - run - - - - - - - - - - - - - - - - - unix-download-swagger-ui - - - - org.apache.maven.plugins - maven-antrun-plugin - - - - - - unix - Linux - - - - - mac-download-swagger-ui - - - - org.apache.maven.plugins - maven-antrun-plugin - - - - - - mac - - - - diff --git a/pom.xml b/pom.xml index 325e07625b..66d007e31b 100644 --- a/pom.xml +++ b/pom.xml @@ -453,6 +453,30 @@ true + + org.apache.maven.plugins + maven-assembly-plugin + 2.4 + + + assembly-hugegraph + package + + single + + + false + false + ${top.level.dir} + + + ${assembly.descriptor.dir}/assembly.xml + + ${final.name} + + + + org.apache.maven.plugins maven-antrun-plugin @@ -471,6 +495,17 @@ failonerror="false"> + + + + + install-swagger-ui + package + + run + + + @@ -487,6 +522,22 @@ + + tar-package + package + + run + + + + + + + + + + + @@ -738,5 +789,48 @@ + + unix-package + + + + maven-assembly-plugin + + + maven-antrun-plugin + + + + + + unix + Linux + + + dist.sh + + + + + mac-package + + + + maven-assembly-plugin + + + maven-antrun-plugin + + + + + + mac + + + dist.sh + + + From 645258c7f3ef269c5c633d29031bfffe042d10e2 Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Tue, 22 Aug 2023 17:58:49 +0800 Subject: [PATCH 09/20] chore: assemble for non-unix os --- pom.xml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 66d007e31b..bc17ad6f59 100644 --- a/pom.xml +++ b/pom.xml @@ -790,12 +790,24 @@ - unix-package + assembly maven-assembly-plugin + + + + + dist.sh + + + + + unix-package + + maven-antrun-plugin @@ -815,9 +827,6 @@ mac-package - - maven-assembly-plugin - maven-antrun-plugin From df0779c81a87ee46a9ceaabc9167504a40d418b2 Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Tue, 22 Aug 2023 18:00:40 +0800 Subject: [PATCH 10/20] chore: rename profile id --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bc17ad6f59..874461db60 100644 --- a/pom.xml +++ b/pom.xml @@ -790,7 +790,7 @@ - assembly + assembly-hugegraph From db9a9e3e72cabe99e607dd4489065788e13cb5bd Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Tue, 22 Aug 2023 20:12:30 +0800 Subject: [PATCH 11/20] chore: tar package for non-unix os --- pom.xml | 51 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 874461db60..9c965a6e2f 100644 --- a/pom.xml +++ b/pom.xml @@ -522,22 +522,6 @@ - - tar-package - package - - run - - - - - - - - - - - @@ -841,5 +825,40 @@ + + tar-package + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + tar-package + package + + run + + + + + + + + + + + + + + + + + + dist.sh + + + From 264c41cf63a10e3ff6febe3cfd1e8ea721c9aac7 Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Wed, 23 Aug 2023 12:28:49 +0800 Subject: [PATCH 12/20] chore: move package goals to dist pom --- hugegraph-dist/pom.xml | 156 ++++++++++++++++++++++++++++++++++++++++ pom.xml | 158 ----------------------------------------- 2 files changed, 156 insertions(+), 158 deletions(-) diff --git a/hugegraph-dist/pom.xml b/hugegraph-dist/pom.xml index 686ac4116e..f9c99bd6fc 100644 --- a/hugegraph-dist/pom.xml +++ b/hugegraph-dist/pom.xml @@ -145,5 +145,161 @@ + + + + + org.apache.maven.plugins + maven-assembly-plugin + 2.4 + + + assembly-hugegraph + package + + single + + + false + false + ${top.level.dir} + + + ${assembly.descriptor.dir}/assembly.xml + + ${final.name} + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + download-swagger-ui + prepare-package + + run + + + + + + + + + + + install-swagger-ui + package + + run + + + + + + + + + + + + + + + + + + + + + + + assembly-hugegraph + + + + maven-assembly-plugin + + + + + true + + + + unix-package + + + + maven-antrun-plugin + + + + + + unix + Linux + + + + + mac-package + + + + maven-antrun-plugin + + + + + + mac + + + + + tar-package + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + tar-package + package + + run + + + + + + + + + + + + + + + + + true + + + diff --git a/pom.xml b/pom.xml index 9c965a6e2f..fc2db46983 100644 --- a/pom.xml +++ b/pom.xml @@ -453,77 +453,6 @@ true - - org.apache.maven.plugins - maven-assembly-plugin - 2.4 - - - assembly-hugegraph - package - - single - - - false - false - ${top.level.dir} - - - ${assembly.descriptor.dir}/assembly.xml - - ${final.name} - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.8 - - - download-swagger-ui - prepare-package - - run - - - - - - - - - - - install-swagger-ui - package - - run - - - - - - - - - - - - - - - - - @@ -773,92 +702,5 @@ - - assembly-hugegraph - - - - maven-assembly-plugin - - - - - - dist.sh - - - - - unix-package - - - - maven-antrun-plugin - - - - - - unix - Linux - - - dist.sh - - - - - mac-package - - - - maven-antrun-plugin - - - - - - mac - - - dist.sh - - - - - tar-package - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.8 - - - tar-package - package - - run - - - - - - - - - - - - - - - - - - dist.sh - - - From ff7a779788758599d6a0c58c4e2f444812081340 Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Wed, 23 Aug 2023 12:49:07 +0800 Subject: [PATCH 13/20] chore: comment dependency convergence --- pom.xml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index fc2db46983..3f7ec0ee20 100644 --- a/pom.xml +++ b/pom.xml @@ -676,18 +676,29 @@ + + + + + enforce-version + + true + + + org.apache.maven.plugins maven-enforcer-plugin - enforce-all + enforce-version enforce - + + [1.8,12) From 880d28358c7c79e71caba2424b70696606ecc9e7 Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Wed, 23 Aug 2023 15:54:33 +0800 Subject: [PATCH 14/20] chore: fix mvn package args --- BUILDING.md | 2 +- Dockerfile | 3 ++- hugegraph-dist/src/assembly/jenkins/publish.sh | 2 +- hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh | 2 +- hugegraph-dist/src/assembly/travis/run-api-test.sh | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index d99dda447c..ddaa86517c 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -10,7 +10,7 @@ To build without executing tests: ``` mvn clean -mvn package -DskipTests +mvn package -DskipTests -Passembly-hugegraph,tar-package ``` ## Building on Eclipse IDE diff --git a/Dockerfile b/Dockerfile index e096f3430a..1939b3af68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,8 @@ FROM maven:3.9.0-eclipse-temurin-11 AS build COPY . /pkg WORKDIR /pkg -RUN mvn package -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l +RUN mvn package -e -B -ntp -DskipTests -Passembly-hugegraph,tar-package -Dmaven.javadoc.skip=true \ + && pwd && ls -l # 2nd stage: runtime env FROM openjdk:11-slim diff --git a/hugegraph-dist/src/assembly/jenkins/publish.sh b/hugegraph-dist/src/assembly/jenkins/publish.sh index 0154973f59..6491d1bc9c 100644 --- a/hugegraph-dist/src/assembly/jenkins/publish.sh +++ b/hugegraph-dist/src/assembly/jenkins/publish.sh @@ -19,7 +19,7 @@ OUTPUT="hugegraph-release-*.tar.gz" echo "Start publish..." -mvn clean package -DskipTests +mvn clean package -DskipTests -Passembly-hugegraph,tar-package if [ $? -ne 0 ]; then echo "Failed to package." exit 1 diff --git a/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh b/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh index 1c0eaaf165..b60937efef 100755 --- a/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh +++ b/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh @@ -35,7 +35,7 @@ JACOCO_PORT=36320 RAFT_TOOLS=$RAFT1_DIR/bin/raft-tools.sh RAFT_LEADER="127.0.0.1:8091" -mvn package -DskipTests +mvn package -DskipTests -Passembly-hugegraph,tar-package # mkdir for each raft-server cp -r $SERVER_DIR $RAFT1_DIR diff --git a/hugegraph-dist/src/assembly/travis/run-api-test.sh b/hugegraph-dist/src/assembly/travis/run-api-test.sh index c856ac54b2..6a1d75601a 100755 --- a/hugegraph-dist/src/assembly/travis/run-api-test.sh +++ b/hugegraph-dist/src/assembly/travis/run-api-test.sh @@ -29,7 +29,7 @@ REST_SERVER_CONF=$SERVER_DIR/conf/rest-server.properties GREMLIN_SERVER_CONF=$SERVER_DIR/conf/gremlin-server.yaml JACOCO_PORT=36320 -mvn package -DskipTests -ntp +mvn package -DskipTests -Passembly-hugegraph,tar-package -ntp # add mysql dependency From 66d024137b6942de70529e026ba44bf71eaa559a Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Wed, 23 Aug 2023 16:46:30 +0800 Subject: [PATCH 15/20] revert "chore: fix mvn package args" This reverts commit 880d28358c7c79e71caba2424b70696606ecc9e7. --- BUILDING.md | 2 +- Dockerfile | 3 +-- hugegraph-dist/src/assembly/jenkins/publish.sh | 2 +- hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh | 2 +- hugegraph-dist/src/assembly/travis/run-api-test.sh | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index ddaa86517c..d99dda447c 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -10,7 +10,7 @@ To build without executing tests: ``` mvn clean -mvn package -DskipTests -Passembly-hugegraph,tar-package +mvn package -DskipTests ``` ## Building on Eclipse IDE diff --git a/Dockerfile b/Dockerfile index 1939b3af68..e096f3430a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,8 +21,7 @@ FROM maven:3.9.0-eclipse-temurin-11 AS build COPY . /pkg WORKDIR /pkg -RUN mvn package -e -B -ntp -DskipTests -Passembly-hugegraph,tar-package -Dmaven.javadoc.skip=true \ - && pwd && ls -l +RUN mvn package -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l # 2nd stage: runtime env FROM openjdk:11-slim diff --git a/hugegraph-dist/src/assembly/jenkins/publish.sh b/hugegraph-dist/src/assembly/jenkins/publish.sh index 6491d1bc9c..0154973f59 100644 --- a/hugegraph-dist/src/assembly/jenkins/publish.sh +++ b/hugegraph-dist/src/assembly/jenkins/publish.sh @@ -19,7 +19,7 @@ OUTPUT="hugegraph-release-*.tar.gz" echo "Start publish..." -mvn clean package -DskipTests -Passembly-hugegraph,tar-package +mvn clean package -DskipTests if [ $? -ne 0 ]; then echo "Failed to package." exit 1 diff --git a/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh b/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh index b60937efef..1c0eaaf165 100755 --- a/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh +++ b/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh @@ -35,7 +35,7 @@ JACOCO_PORT=36320 RAFT_TOOLS=$RAFT1_DIR/bin/raft-tools.sh RAFT_LEADER="127.0.0.1:8091" -mvn package -DskipTests -Passembly-hugegraph,tar-package +mvn package -DskipTests # mkdir for each raft-server cp -r $SERVER_DIR $RAFT1_DIR diff --git a/hugegraph-dist/src/assembly/travis/run-api-test.sh b/hugegraph-dist/src/assembly/travis/run-api-test.sh index 6a1d75601a..c856ac54b2 100755 --- a/hugegraph-dist/src/assembly/travis/run-api-test.sh +++ b/hugegraph-dist/src/assembly/travis/run-api-test.sh @@ -29,7 +29,7 @@ REST_SERVER_CONF=$SERVER_DIR/conf/rest-server.properties GREMLIN_SERVER_CONF=$SERVER_DIR/conf/gremlin-server.yaml JACOCO_PORT=36320 -mvn package -DskipTests -Passembly-hugegraph,tar-package -ntp +mvn package -DskipTests -ntp # add mysql dependency From e5929e21cae598d4e017cb943d30970ae4e57b5d Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Wed, 23 Aug 2023 20:26:26 +0800 Subject: [PATCH 16/20] chore: activate profile by property --- hugegraph-dist/pom.xml | 8 ++++++-- pom.xml | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/hugegraph-dist/pom.xml b/hugegraph-dist/pom.xml index f9c99bd6fc..b56f06ede1 100644 --- a/hugegraph-dist/pom.xml +++ b/hugegraph-dist/pom.xml @@ -234,7 +234,9 @@ - true + + !skip-assembly-hugegraph + @@ -298,7 +300,9 @@ - true + + !skip-tar-package + diff --git a/pom.xml b/pom.xml index 3f7ec0ee20..06cb96dd7e 100644 --- a/pom.xml +++ b/pom.xml @@ -520,7 +520,9 @@ core-test - true + + !skip-core-test + From e5f3642c1fa06847125ed5c6106615fc1e584a98 Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Wed, 23 Aug 2023 20:53:17 +0800 Subject: [PATCH 17/20] chore: execute enforcer only in root pom --- pom.xml | 60 +++++++++++++++++++++++++-------------------------------- 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/pom.xml b/pom.xml index 06cb96dd7e..0acd78e911 100644 --- a/pom.xml +++ b/pom.xml @@ -453,6 +453,32 @@ true + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-version + + enforce + + + false + + + + + + [1.8,12) + + + [3.5.0,) + + + + + + @@ -681,39 +707,5 @@ - - enforce-version - - true - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-version - - enforce - - - - - - - [1.8,12) - - - [3.5.0,) - - - - - - - - - From 7d9e9912999a6b22608274521e5a89b4cdbe04bc Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Thu, 24 Aug 2023 16:13:09 +0800 Subject: [PATCH 18/20] chore: revert core-test activation --- pom.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 0acd78e911..5cc42a954d 100644 --- a/pom.xml +++ b/pom.xml @@ -546,9 +546,7 @@ core-test - - !skip-core-test - + true From 3b480f60938d64c7008d4ab18c85c266f8f152b4 Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Thu, 24 Aug 2023 18:51:19 +0800 Subject: [PATCH 19/20] doc: add comment for property activation --- hugegraph-dist/pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hugegraph-dist/pom.xml b/hugegraph-dist/pom.xml index b56f06ede1..110c7a6707 100644 --- a/hugegraph-dist/pom.xml +++ b/hugegraph-dist/pom.xml @@ -234,6 +234,7 @@ + !skip-assembly-hugegraph @@ -300,6 +301,7 @@ + !skip-tar-package From f707fcb737a5323777f76f51ba0675e4480b90b1 Mon Sep 17 00:00:00 2001 From: imbajin Date: Fri, 25 Aug 2023 10:09:10 +0800 Subject: [PATCH 20/20] Update pom.xml --- hugegraph-dist/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugegraph-dist/pom.xml b/hugegraph-dist/pom.xml index 110c7a6707..48ad2017b7 100644 --- a/hugegraph-dist/pom.xml +++ b/hugegraph-dist/pom.xml @@ -234,7 +234,7 @@ - + !skip-assembly-hugegraph