This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris-flink-connector.git
commit 58a72719cc210ac0193c2111d3243258dc7c0343 Author: Zhengguo Yang <yangz...@gmail.com> AuthorDate: Wed Jan 5 10:45:11 2022 +0800 [refactor] update parent pom version and optimize build scripts (#7548) --- build.sh | 38 +++++++++++++++++++++++++++++++------- pom.xml | 38 +++++++++++++++++++++++++++++++------- 2 files changed, 62 insertions(+), 14 deletions(-) diff --git a/build.sh b/build.sh index e66a654..d363dae 100644 --- a/build.sh +++ b/build.sh @@ -25,23 +25,49 @@ set -eo pipefail -ROOT=`dirname "$0"` -ROOT=`cd "$ROOT"; pwd` +usage() { + echo " + Usage: + $0 flink_version scala_version + e.g.: + $0 1.11.6 2.12 + $0 1.12.7 2.12 + $0 1.13.5 2.12 + " + exit 1 +} + +if [ $# -ne 2 ]; then + usage +fi + +ROOT=$(dirname "$0") +ROOT=$( + cd "$ROOT" + pwd +) export DORIS_HOME=${ROOT}/../../ -. ${DORIS_HOME}/env.sh +. "${DORIS_HOME}"/env.sh # include custom environment variables if [[ -f ${DORIS_HOME}/custom_env.sh ]]; then - . ${DORIS_HOME}/custom_env.sh + . "${DORIS_HOME}"/custom_env.sh fi # check maven MVN_CMD=mvn -if [[ ! -z ${CUSTOM_MVN} ]]; then +if [[ -n ${CUSTOM_MVN} ]]; then MVN_CMD=${CUSTOM_MVN} fi + +if [ -z "$1" ]; then + export FLINK_VERSION="$1" +fi +if [ -z "$2" ]; then + export SCALA_VERSION="$2" +fi if ! ${MVN_CMD} --version; then echo "Error: mvn is not found" exit 1 @@ -50,7 +76,6 @@ export MVN_CMD rm -rf output/ ${MVN_CMD} clean package - mkdir -p output/ cp target/doris-flink-*.jar ./output/ @@ -59,4 +84,3 @@ echo "Successfully build Flink-Doris-Connector" echo "*****************************************" exit 0 - diff --git a/pom.xml b/pom.xml index 3baae4b..a819733 100644 --- a/pom.xml +++ b/pom.xml @@ -19,18 +19,18 @@ specific language governing permissions and limitations under the License. --> -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache</groupId> <artifactId>apache</artifactId> - <version>18</version> + <version>23</version> </parent> <groupId>org.apache.doris</groupId> <artifactId>doris-flink-connector</artifactId> - <version>flink-${flink.version}-${scala.version}-SNAPSHOT</version> + <version>${flink.version}-${scala.version}-1.0.0-SNAPSHOT</version> <name>Doris Flink Connector</name> <url>https://doris.apache.org/</url> <licenses> @@ -67,8 +67,8 @@ under the License. </mailingList> </mailingLists> <properties> - <scala.version>2.12</scala.version> - <flink.version>1.11.2</flink.version> + <scala.version>${env.SCALA_VERSION}</scala.version> + <flink.version>${env.FLINK_VERSION}</flink.version> <libthrift.version>0.13.0</libthrift.version> <arrow.version>5.0.0</arrow.version> <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version> @@ -113,6 +113,30 @@ under the License. </pluginRepository> </pluginRepositories> </profile> + <profile> + <id>fink-version</id> + <activation> + <activeByDefault>true</activeByDefault> + <property> + <name>!env.FLINK_VERSION</name> + </property> + </activation> + <properties> + <env.FLINK_VERSION>1.11.6</env.FLINK_VERSION> + </properties> + </profile> + <profile> + <id>scala-version</id> + <activation> + <activeByDefault>true</activeByDefault> + <property> + <name>!env.SCALA_VERSION</name> + </property> + </activation> + <properties> + <env.SCALA_VERSION>2.12</env.SCALA_VERSION> + </properties> + </profile> <!-- for general repository --> <profile> @@ -391,9 +415,9 @@ under the License. <artifactId>maven-javadoc-plugin</artifactId> <version>${maven-javadoc-plugin.version}</version> <configuration> + <skip>true</skip> <source>8</source> <failOnError>false</failOnError> - <aggregate>true</aggregate> </configuration> <executions> <execution> --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org