From 6ab0e40685ac6ba5ebdaa30387a838a5f0d30da9 Mon Sep 17 00:00:00 2001 From: Ruslan Ibragimov <94184844+5hin0bi@users.noreply.github.com> Date: Mon, 7 Feb 2022 13:40:43 +0300 Subject: [PATCH] Fix maven warnings about dynamic versioning (#1559) --- .github/workflows/branch-deploy.yml | 5 +++-- .github/workflows/master.yaml | 5 +++-- .github/workflows/release.yaml | 5 +++-- kafka-ui-api/pom.xml | 2 +- kafka-ui-contract/pom.xml | 2 +- kafka-ui-e2e-checks/pom.xml | 2 +- pom.xml | 3 +-- 7 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/branch-deploy.yml b/.github/workflows/branch-deploy.yml index bf465cd42c..61bf326e5c 100644 --- a/.github/workflows/branch-deploy.yml +++ b/.github/workflows/branch-deploy.yml @@ -35,8 +35,9 @@ jobs: - name: Build id: build run: | - mvn clean package -Pprod -DskipTests -DbuildVersion=$GITHUB_SHA - export VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' -DbuildVersion=$GITHUB_SHA --non-recursive exec:exec) + mvn versions:set -DnewVersion=$GITHUB_SHA + mvn clean package -Pprod -DskipTests + export VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) echo "::set-output name=version::${VERSION}" - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index ffc9469069..fd94ae63c2 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -26,8 +26,9 @@ jobs: - name: Build id: build run: | - mvn clean package -Pprod -DskipTests -DbuildVersion=$GITHUB_SHA - export VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' -DbuildVersion=$GITHUB_SHA --non-recursive exec:exec) + mvn versions:set -DnewVersion=$GITHUB_SHA + mvn clean package -Pprod -DskipTests + export VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) echo "::set-output name=version::${VERSION}" ################# # # diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f0c3b51cc5..a88c7d05d8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -33,8 +33,9 @@ jobs: - name: Build with Maven id: build run: | - mvn clean package -Pprod -DskipTests -DbuildVersion=${{ github.event.release.tag_name }} - export VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' -DbuildVersion=${{ github.event.release.tag_name }} --non-recursive exec:exec) + mvn versions:set -DnewVersion=${{ github.event.release.tag_name }} + mvn clean package -Pprod -DskipTests + export VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) echo ::set-output name=version::${VERSION} - name: Upload files to a GitHub release diff --git a/kafka-ui-api/pom.xml b/kafka-ui-api/pom.xml index 0c35def693..a6092e8447 100644 --- a/kafka-ui-api/pom.xml +++ b/kafka-ui-api/pom.xml @@ -4,7 +4,7 @@ kafka-ui com.provectus - ${buildVersion} + 0.0.1-SNAPSHOT 4.0.0 diff --git a/kafka-ui-contract/pom.xml b/kafka-ui-contract/pom.xml index 03eb35bc4d..1bbe2d8a27 100644 --- a/kafka-ui-contract/pom.xml +++ b/kafka-ui-contract/pom.xml @@ -4,7 +4,7 @@ kafka-ui com.provectus - ${buildVersion} + 0.0.1-SNAPSHOT 4.0.0 diff --git a/kafka-ui-e2e-checks/pom.xml b/kafka-ui-e2e-checks/pom.xml index 08e454b46b..c6b2108ace 100644 --- a/kafka-ui-e2e-checks/pom.xml +++ b/kafka-ui-e2e-checks/pom.xml @@ -5,7 +5,7 @@ kafka-ui com.provectus - ${buildVersion} + 0.0.1-SNAPSHOT 4.0.0 diff --git a/pom.xml b/pom.xml index 9a22325713..77f9345a89 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,6 @@ provectus https://sonarcloud.io - 0.0.1-SNAPSHOT @@ -85,7 +84,7 @@ com.provectus kafka-ui - ${buildVersion} + 0.0.1-SNAPSHOT kafka-ui Kafka metrics for UI panel