This is an automated email from the ASF dual-hosted git repository. srowen pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new 3b6da36 [SPARK-31120][BUILD] Support enabling maven profiles for importing vi… 3b6da36 is described below commit 3b6da36cd62e734b12405bf994a228c7f5049e77 Author: Prashant Sharma <prash...@in.ibm.com> AuthorDate: Sun Mar 15 12:39:46 2020 -0500 [SPARK-31120][BUILD] Support enabling maven profiles for importing vi… …a sbt on Intellij IDEA. ### What changes were proposed in this pull request? Read from java property "sbt.maven.profiles", the maven profiles to be enabled while importing to intellij IDEA via SBT. ### Why are the changes needed? Without this change one needs to set an os-wide environment variable `SBT_MAVEN_PROFILES`, on mac it is even trickier (I have not figured out, what can be done). ### Does this PR introduce any user-facing change? None ### How was this patch tested? Manually tested by applying multiple profiles or a single profile. Please see the attached images to see the steps. <img width="802" alt="Screenshot 2020-03-11 at 4 09 57 PM" src="https://user-images.githubusercontent.com/992952/76411667-46223280-63b8-11ea-9a77-dc014b66d48b.png"> <img width="867" alt="Screenshot 2020-03-11 at 4 18 09 PM" src="https://user-images.githubusercontent.com/992952/76411676-4ae6e680-63b8-11ea-895d-ed9d6cc223c5.png"> Closes #27878 from ScrapCodes/SPARK-31120/idea-load-maven-profiles. Authored-by: Prashant Sharma <prash...@in.ibm.com> Signed-off-by: Sean Owen <sro...@gmail.com> --- project/SparkBuild.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index 1a2a7c3..68a624e 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -88,7 +88,8 @@ object SparkBuild extends PomBuild { val projectsMap: Map[String, Seq[Setting[_]]] = Map.empty override val profiles = { - val profiles = Properties.envOrNone("SBT_MAVEN_PROFILES") match { + val profiles = Properties.envOrNone("SBT_MAVEN_PROFILES") + .orElse(Properties.propOrNone("sbt.maven.profiles")) match { case None => Seq("sbt") case Some(v) => v.split("(\\s+|,)").filterNot(_.isEmpty).map(_.trim.replaceAll("-P", "")).toSeq --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org