[jvm-packages] [CI] Publish XGBoost4J JARs with Scala 2.11 and 2.12 (#5539)

This commit is contained in:
Philip Hyunsu Cho 2020-04-15 09:32:02 -07:00 committed by GitHub
parent ec02f40d42
commit 0676a19e70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,11 +15,21 @@ spark_version=$1
rm -rf build/
cd jvm-packages
# re-build package without Mock Rabit
mvn --no-transfer-progress package -Dspark.version=${spark_version} -DskipTests
# deploy to S3 bucket xgboost-maven-repo
mvn --no-transfer-progress deploy -P release-to-s3 -DskipTests
# Re-build package without Mock Rabit
# Deploy to S3 bucket xgboost-maven-repo
mvn --no-transfer-progress package deploy -P release-to-s3 -Dspark.version=${spark_version} -DskipTests
# Compile XGBoost4J with Scala 2.11 too
mvn clean
# Rename artifactId of all XGBoost4J packages with suffix _2.11
sed -i -e 's/<artifactId>xgboost\(.*\)_[0-9\.]\+/<artifactId>xgboost\1_2.11/' $(find . -name pom.xml)
# Modify scala.version and scala.binary.version fields
sed -i -e 's/<scala\.version>[0-9\.]\+/<scala.version>2.11.12/' $(find . -name pom.xml)
sed -i -e 's/<scala\.binary\.version>[0-9\.]\+/<scala.binary.version>2.11/' $(find . -name pom.xml)
# Re-build and deploy
mvn --no-transfer-progress package deploy -P release-to-s3 -Dspark.version=${spark_version} -DskipTests
set +x
set +e