From fd7ca544e853c78e270aeaa115e2dcf2230a13f0 Mon Sep 17 00:00:00 2001 From: Jerry Lee Date: Mon, 15 May 2023 18:49:54 +0800 Subject: [PATCH] build: enable test jar if not maven skip test; add `deploy.sh` --- cffu-core/pom.xml | 42 +++++++++++++++++++++++++++------------- cffu-kotlin/pom.xml | 47 +++++++++++++++++++++++++++++---------------- pom.xml | 38 +++++++++++++++++++++++++++++------- scripts/deploy.sh | 17 ++++++++++++++++ 4 files changed, 107 insertions(+), 37 deletions(-) create mode 100755 scripts/deploy.sh diff --git a/cffu-core/pom.xml b/cffu-core/pom.xml index ab7e4b90..43b90769 100644 --- a/cffu-core/pom.xml +++ b/cffu-core/pom.xml @@ -60,23 +60,39 @@ - - io.foldright - cffu-utils - ${project.version} - - tests - test-jar - test - org.apache.commons commons-lang3 test + + + + enable-test-jar-if-not-maven-skip-test + + + maven.test.skip + !true + + + + + io.foldright + cffu-utils + ${project.version} + + tests + test-jar + test + + + + diff --git a/cffu-kotlin/pom.xml b/cffu-kotlin/pom.xml index 5f25b068..241b0f9e 100644 --- a/cffu-kotlin/pom.xml +++ b/cffu-kotlin/pom.xml @@ -61,22 +61,35 @@ kotlin-stdlib-jdk8 true - - - io.foldright - cffu - ${project.version} - tests - test-jar - test - - - io.foldright - cffu-utils - ${project.version} - tests - test-jar - test - + + + enable-test-jar-if-not-maven-skip-test + + + maven.test.skip + !true + + + + + + io.foldright + cffu + ${project.version} + tests + test-jar + test + + + io.foldright + cffu-utils + ${project.version} + tests + test-jar + test + + + + diff --git a/pom.xml b/pom.xml index 1e7bc39e..ef61143e 100644 --- a/pom.xml +++ b/pom.xml @@ -364,13 +364,6 @@ org.apache.maven.plugins maven-jar-plugin 3.3.0 - - - - test-jar - - - org.apache.maven.plugins @@ -437,6 +430,37 @@ + + enable-test-jar-if-not-maven-skip-test + + + maven.test.skip + !true + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + + test-jar + + + + + + + gen-src diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100755 index 00000000..7ec96b11 --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -eEuo pipefail +cd "$(dirname "$(readlink -f "$0")")/.." + +source "scripts/bash-buddy/lib/common_utils.sh" + +readonly jh_var_name="JAVA19_HOME" +[ -d "${!jh_var_name:-}" ] || + cu::die "\$${jh_var_name}(${!jh_var_name:-}) dir is not existed!" +export JAVA_HOME="${!jh_var_name}" + +rm -rf "$HOME/.m2/repository/io/foldright"/cffu* +scripts/integration_test + +rm -rf "$HOME/.m2/repository/io/foldright"/cffu* +cu::log_then_run ./mvnw clean +cu::log_then_run ./mvnw deploy -DperformRelease -Dmaven.test.skip