-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-14867][BUILD] Remove --force option in build/mvn
#12631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Test build #56780 has finished for PR 12631 at commit
|
|
Yes, on a system with Maven < 3.3.9 installed, you always have to pass Ideally we could even auto-detect the |
|
That sounds good to me. No problem! |
|
Test build #56808 has finished for PR 12631 at commit
|
build/mvn to use the downloaded maven if it exists.--force option in build/mvn
|
Test build #56809 has finished for PR 12631 at commit
|
build/mvn
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really should be grep'd from the pom file, as is done with scala_version in install_scala. Also, make sure that the correct maven is downloaded and installed in the case that there isn't any mvn available when this script is run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @markhamstra .
I'll fix that to read "3.3.9" from pom file.
By the way, what do you mean by "make sure that the correct maven is downloaded and installed in the case that there isn't any mvn available when this script is run"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean that using this build/mvn script should work even if there isn't any version of maven currently installed on the machine (which might be the case, e.g., when using an automated tool to set up a new build node.) I believe that would work with --force previously, and it should work when there isn't a --force option anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. For that, I tested already. When there is no maven, this script installs the correct maven. Thank you again!
|
Test build #56810 has finished for PR 12631 at commit
|
|
Rebased. |
|
Test build #56829 has finished for PR 12631 at commit
|
|
Test build #56830 has finished for PR 12631 at commit
|
|
Test build #56836 has finished for PR 12631 at commit
|
build/mvn
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you use awk below, would this find the version correctly? awk -F '[<>]' '{print $3}' Looks like it, but I don't know if it's much simpler. You might also use "-n1" consistently like below in the head command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works as the Jenkins runs.
spark:SPARK-14867$ grep "<maven.version>" pom.xml
<maven.version>3.3.9</maven.version>
For simplification, I'm not sure since I borrowed it from the following install_scala() code in the same script. Should I change them both for consistency?
install_scala() {
# determine the Scala version used in Spark
local scala_version=`grep "scala.version" "${_DIR}/../pom.xml" | \
head -1 | cut -f2 -d'>' | cut -f1 -d'<'`Please let me know. If needed, I will update both.
|
Test build #56855 has finished for PR 12631 at commit
|
|
Test build #56857 has finished for PR 12631 at commit
|
|
Test build #56859 has finished for PR 12631 at commit
|
|
The test failure seems to be irrelevant to this PR. |
|
I updated the commit time of the last commit to retrigger Jenkins. |
|
Test build #56865 has finished for PR 12631 at commit
|
|
Hi, @srowen . Thank you for your review always. If there is anything to do more, please let me know. |
|
Yeah that looks good to me. |
|
Thank you, @srowen ! |
|
Test build #56890 has finished for PR 12631 at commit
|
|
Hi, @srowen . |
|
Merged to master |
|
Thank you, @srowen ! |
What changes were proposed in this pull request?
Currently,
build/mvnprovides a convenient option,--force, in order to use the recommended version of maven without changing PATH environment variable. However, there were two problems.dev/lint-javadoes not use the newly installed maven.$ ./build/mvn --force clean $ ./dev/lint-java Using `mvn` from path: /usr/local/bin/mvnIt's not easy to type
--forceoption always.If '--force' option is used once, we had better prefer the installed maven recommended by Spark.
This PR makes
build/mvncheck the existence of maven installed by--forceoption first.According to the comments, this PR aims to the followings:
pom.xml.--forceoption.How was this patch tested?
Manual.