-
Notifications
You must be signed in to change notification settings - Fork 190
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
[SPARK-27458][DOC] remind developers to reset maven home in IntelliJ #195
Conversation
4cac23b
to
baa2955
Compare
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.
The tip is fine; a few suggestions here.
developer-tools.md
Outdated
@@ -397,6 +397,18 @@ Other tips: | |||
- "Rebuild Project" can fail the first time the project is compiled, because generate source files | |||
are not automatically generated. Try clicking the "Generate Sources and Update Folders For All | |||
Projects" button in the "Maven Projects" tool window to manually generate these sources. | |||
- Maven bundled in IntelliJ may not meet the minimum version requirement of the Spark. If that happens, |
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.
"The version of Maven bundled with IntelliJ may not be new enough for Spark. ..."
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.
Thanks for the review. Yes. I am going to change it.
developer-tools.md
Outdated
2019-04-14 16:05:24,813 [ 314626] INFO - #org.jetbrains.idea.maven - org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M2:enforce (enforce-versions) on project spark-parent_2.12: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. | ||
java.lang.RuntimeException: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M2:enforce (enforce-versions) on project spark-parent_2.12: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. | ||
``` | ||
in IntelliJ log file (`Help -> Show Log in Finder/Explorer`), you should reset the maven home directory |
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.
maven -> Maven
I don't think you need to look a IJ's log files; it's just an update to preferences.
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.
Yes. I am going to remove the verbose logs.
developer-tools.md
Outdated
``` | ||
2019-04-14 16:05:24,796 [ 314609] INFO - #org.jetbrains.idea.maven - [WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message: | ||
Detected Maven Version: 3.3.9 is not in the allowed range 3.6.0. | ||
2019-04-14 16:05:24,813 [ 314626] INFO - #org.jetbrains.idea.maven - org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M2:enforce (enforce-versions) on project spark-parent_2.12: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. |
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.
Delete this and the next line; they're not that relevant
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.
The tip is fine; a few suggestions here.
Hi @dongjoon-hyun and @srowen, thanks for those suggestion. I just update the PR accordingly. I hope it looks better. |
developer-tools.md
Outdated
the action "Generate Sources and Update Folders For All Projects" could fail silently. | ||
Please remember to reset the Maven home directory | ||
(`Preference -> Build, Execution, Deployment -> Maven -> Maven home directory`) of your project to the | ||
version is new enough. |
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.
"the version is new enough" -> "to point to a newer installation of Maven".
I might also tell people to install the latest version of Maven locally, or use the copy that Spark downloads into build/
.
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.
Thanks. Just updated. I prefer suggesting ppl using the copy Spark downloads at build/
. Worry that the latest version may not work all the time. For example, Maven 4 may not be backward compatible with Maven 3.
developer-tools.md
Outdated
the action "Generate Sources and Update Folders For All Projects" could fail silently. | ||
Please remember to reset the Maven home directory | ||
(`Preference -> Build, Execution, Deployment -> Maven -> Maven home directory`) of your project to | ||
point to a newer installation of Maven. You may also build Spark with script `build/mvn` first. |
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.
with script -> with the script
install a proper Maven -> install a recent version of Maven
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.
Thanks. I updated the developer-tools.md accordingly, but not yet run the build to update corresponding html yet. Will do that tonight when I can access a desktop.
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.
site/developer-tools.html is also updated. please kindly take a look.
I tried to follow the guide at 'http://spark.apache.org/developer-tools.html' to setup an IntelliJ project for Spark. However, the project was failed to build. It was due to missing classes generated via antlr on sql/catalyst project even thought I clicked the 'Generate Sources and Update Folders For All Projects' button in IntelliJ as per suggested.
It turned out that I forgot to reset the maven home in my IntelliJ and the IntelliJ failed the 'Generate Sources and Update Folders For All Projects' action silently. That was why ANTLR4 files were not generated as expected.
To help other developers, I would like to enhance 'http://spark.apache.org/developer-tools.html' to add a note to remind developer to check if the 'Generate Sources and Update Folders For All Projects' action was failed silently due to incorrect maven version. If so, they should update the maven home in IntelliJ accordingly