Use Maven wrapper instead of platform dependent Maven version (#29988)

Closes #29987

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
This commit is contained in:
Alexander Schwartz 2024-06-03 15:45:39 +02:00 committed by GitHub
parent 262fc09edc
commit 792a3457ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 10 additions and 10 deletions

View file

@ -1,3 +1,3 @@
#!/bin/bash -e #!/bin/bash -e
mvn help:evaluate -Dexpression=project.version -q -DforceStdout -pl . ./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout -pl .

View file

@ -10,7 +10,7 @@ if [ "$DEP" == "" ]; then
exit 1 exit 1
fi fi
mvn -q dependency:tree -Dincludes=$DEP -DoutputFile=$TMP -DappendOutput=true -Poperator ./mvnw -q dependency:tree -Dincludes=$DEP -DoutputFile=$TMP -DappendOutput=true -Poperator
echo "" echo ""
echo "===================================================================================================" echo "==================================================================================================="

View file

@ -23,7 +23,7 @@ VERSION="86400000.0.0"
# Build the operator Docker image # Build the operator Docker image
( (
cd $SCRIPT_DIR/../../ cd $SCRIPT_DIR/../../
mvn clean package -Poperator -pl :keycloak-operator -am \ ./mvnw clean package -Poperator -pl :keycloak-operator -am \
-Dquarkus.container-image.build=true \ -Dquarkus.container-image.build=true \
-Dquarkus.container-image.image="ttl.sh/${UUID}keycloak-operator:${VERSION}" \ -Dquarkus.container-image.image="ttl.sh/${UUID}keycloak-operator:${VERSION}" \
-Dkc.operator.keycloak.image="ttl.sh/${UUID}keycloak:${VERSION}" \ -Dkc.operator.keycloak.image="ttl.sh/${UUID}keycloak:${VERSION}" \

View file

@ -10,8 +10,8 @@ else
fi fi
# Maven # Maven
mvn versions:set -DnewVersion=$NEW_VERSION -DgenerateBackupPoms=false -DgroupId=org.keycloak* -DartifactId=* ./mvnw versions:set -DnewVersion=$NEW_VERSION -DgenerateBackupPoms=false -DgroupId=org.keycloak* -DartifactId=*
mvn versions:set-property --non-recursive -Dproperty=project.version.npm -DnewVersion="$NEW_NPM_VERSION" ./mvnw versions:set-property --non-recursive -Dproperty=project.version.npm -DnewVersion="$NEW_NPM_VERSION"
# Docker # Docker
sed -i "s/ENV KEYCLOAK_VERSION .*/ENV KEYCLOAK_VERSION $NEW_VERSION/" quarkus/container/Dockerfile sed -i "s/ENV KEYCLOAK_VERSION .*/ENV KEYCLOAK_VERSION $NEW_VERSION/" quarkus/container/Dockerfile

View file

@ -7,15 +7,15 @@
## ##
cd "$(dirname $0)" cd "$(dirname $0)"
mvn -version ../../mvnw -version
EXIT_CODE=0 EXIT_CODE=0
mvn clean ../../mvnw clean
for I in `perl -ne 'print "$1\n" if (m,<id>([^.<]+)</id>,)' pom.xml`; do for I in `perl -ne 'print "$1\n" if (m,<id>([^.<]+)</id>,)' pom.xml | grep -E -v '(report|copy-testsuite-providers-to-model-testsuite)'`; do
echo "========" echo "========"
echo "======== Start of Profile $I" echo "======== Start of Profile $I"
echo "========" echo "========"
mvn -B -Dsurefire.timeout=900 test "-P$I" "$@" 2>&1 | tee /tmp/surefire.out ../../mvnw -B -Dsurefire.timeout=900 test "-P$I" "$@" 2>&1 | tee /tmp/surefire.out
EXIT_CODE=$[$EXIT_CODE + ${PIPESTATUS[0]}] EXIT_CODE=$[$EXIT_CODE + ${PIPESTATUS[0]}]
mv target/surefire-reports "target/surefire-reports-$I" mv target/surefire-reports "target/surefire-reports-$I"
perl -ne "print '::error::| $I | Timed out.' . \"\n\" if (/There was a timeout in the fork/)" /tmp/surefire.out perl -ne "print '::error::| $I | Timed out.' . \"\n\" if (/There was a timeout in the fork/)" /tmp/surefire.out
@ -25,7 +25,7 @@ for I in `perl -ne 'print "$1\n" if (m,<id>([^.<]+)</id>,)' pom.xml`; do
done done
## If the jacoco file is present, generate reports in each of the model projects ## If the jacoco file is present, generate reports in each of the model projects
[ -f target/jacoco.exec ] && mvn -f ../../model org.jacoco:jacoco-maven-plugin:0.8.7:report -Djacoco.dataFile="$(readlink -f target/jacoco.exec)" [ -f target/jacoco.exec ] && ../../mvnw -f ../../model org.jacoco:jacoco-maven-plugin:0.8.7:report -Djacoco.dataFile="$(readlink -f target/jacoco.exec)"
for I in `perl -ne 'print "$1\n" if (m,<id>([^<]+)</id>,)' pom.xml`; do for I in `perl -ne 'print "$1\n" if (m,<id>([^<]+)</id>,)' pom.xml`; do
grep -A 1 --no-filename '<<<' "target/surefire-reports-$I"/*.txt | perl -pe "print '::error::| $I | ';" grep -A 1 --no-filename '<<<' "target/surefire-reports-$I"/*.txt | perl -pe "print '::error::| $I | ';"