Skip to content

Commit 2e836cd

Browse files
LuciferYangsrowen
authored andcommitted
[SPARK-34774][BUILD] Ensure change-scala-version.sh update scala.version in parent POM correctly
### What changes were proposed in this pull request? After SPARK-34507, execute` change-scala-version.sh` script will update `scala.version` in parent pom, but if we execute the following commands in order: ``` dev/change-scala-version.sh 2.13 dev/change-scala-version.sh 2.12 git status ``` there will generate git diff as follow: ``` diff --git a/pom.xml b/pom.xml index ddc4ce2..f43d8c8f78 100644 --- a/pom.xml +++ b/pom.xml -162,7 +162,7 <commons.math3.version>3.4.1</commons.math3.version> <commons.collections.version>3.2.2</commons.collections.version> - <scala.version>2.12.10</scala.version> + <scala.version>2.13.5</scala.version> <scala.binary.version>2.12</scala.binary.version> <scalatest-maven-plugin.version>2.0.0</scalatest-maven-plugin.version> <scalafmt.parameters>--test</scalafmt.parameters> ``` seem 'scala.version' property was not update correctly. So this pr add an extra 'scala.version' to scala-2.12 profile to ensure change-scala-version.sh can update the public `scala.version` property correctly. ### Why are the changes needed? Bug fix. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? **Manual test** Execute the following commands in order: ``` dev/change-scala-version.sh 2.13 dev/change-scala-version.sh 2.12 git status ``` **Before** ``` diff --git a/pom.xml b/pom.xml index ddc4ce2..f43d8c8f78 100644 --- a/pom.xml +++ b/pom.xml -162,7 +162,7 <commons.math3.version>3.4.1</commons.math3.version> <commons.collections.version>3.2.2</commons.collections.version> - <scala.version>2.12.10</scala.version> + <scala.version>2.13.5</scala.version> <scala.binary.version>2.12</scala.binary.version> <scalatest-maven-plugin.version>2.0.0</scalatest-maven-plugin.version> <scalafmt.parameters>--test</scalafmt.parameters> ``` **After** No git diff. Closes apache#31865 from LuciferYang/SPARK-34774. Authored-by: yangjie01 <[email protected]> Signed-off-by: Sean Owen <[email protected]>
1 parent d99135b commit 2e836cd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pom.xml

+7
Original file line numberDiff line numberDiff line change
@@ -3306,6 +3306,13 @@
33063306

33073307
<profile>
33083308
<id>scala-2.12</id>
3309+
<properties>
3310+
<!--
3311+
SPARK-34774 Add this property to ensure change-scala-version.sh can replace the public `scala.version`
3312+
property correctly.
3313+
-->
3314+
<scala.version>2.12.10</scala.version>
3315+
</properties>
33093316
<build>
33103317
<pluginManagement>
33113318
<plugins>

0 commit comments

Comments
 (0)