From 4cdf871080b01c25eb439df2c7aaf95e07820d36 Mon Sep 17 00:00:00 2001 From: Tran Tien Duc Date: Wed, 6 Dec 2023 16:51:58 +0700 Subject: [PATCH] align docker build and maven build output version maven use the hardcoded version `8.7.0` and output zip file with `8.7.0` in file name suffix. This breaks COPY command --- Dockerfile | 3 ++- pom.xml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c730e5d..12fc97f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,10 +28,11 @@ RUN wget https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8. ENV MVN_HOME=/tmp/apache-maven-3.8.8 ENV PATH=$MVN_HOME/bin:$PATH +ARG ES_VERSION COPY . /tmp/elasticsearch-analysis-vietnamese WORKDIR /tmp/elasticsearch-analysis-vietnamese RUN mvn verify clean --fail-never -RUN mvn --batch-mode -Dmaven.test.skip -e package +RUN mvn --batch-mode -Dmaven.test.skip -e package -DprojectVersion=$ES_VERSION FROM docker.elastic.co/elasticsearch/elasticsearch:$ES_VERSION ARG ES_VERSION diff --git a/pom.xml b/pom.xml index 9c31dad..a9bede0 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.elasticsearch elasticsearch-analysis-vietnamese - 8.7.0 + ${projectVersion} jar elasticsearch-analysis-vietnamese https://github.com/duydo/elasticsearch-analysis-vietnamese/ @@ -31,6 +31,7 @@ UTF-8 1.8 + 8.7.0 ${project.version} 2.17.2