Skip to content
Permalink
Browse files
[refactor] update parent pom version and optimize build scripts (#7548)
  • Loading branch information
yangzhg committed Jan 5, 2022
1 parent f66a602 commit 58a72719cc210ac0193c2111d3243258dc7c0343
Showing 2 changed files with 62 additions and 14 deletions.
@@ -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

38 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>

0 comments on commit 58a7271

Please sign in to comment.