diff --git a/.travis/build-push.sh b/.travis/build-push.sh index 3dcdc04f72..95b5aa50ee 100644 --- a/.travis/build-push.sh +++ b/.travis/build-push.sh @@ -1,7 +1,7 @@ #!/bin/bash set -ev -VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec) +VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1) echo "Building PMD ${VERSION} on branch ${TRAVIS_BRANCH}" if [[ "$VERSION" != *-SNAPSHOT && "$TRAVIS_TAG" != "" ]]; then diff --git a/.travis/release.sh b/.travis/release.sh index b96a28817c..30ad12ce26 100644 --- a/.travis/release.sh +++ b/.travis/release.sh @@ -1,7 +1,7 @@ #!/bin/bash set -ev -RELEASE_VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec) +RELEASE_VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1) # Deploy to ossrh has already been done with the usual build. See build-push.sh