I have downloaded github project which have spark scala code and build it using sbt. I am trying to import the project to below version of Scala IDE. But I do not see the option to import sbt or scala project. How can I import it?
Scala IDE build of Eclipse SDK
Build id: 4.1.0-vfinal-20150704-2326-Typesafe
Use plug-ins that can generate Eclipse project files out of the sbt project definition.
sbt 0.7.x, use eclipsify
sbt 0.12.x, use sbteclipse
Add the plugin to project/plugins.sbt file.
example: addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.4.0")
Run sbt eclipse
Related
I want to use Intellij as Spark and Scala editor so I should create an SBT project. Scala and SBT plugins are installed, but the problem is when I create SBT project, at the first it try to fetch SBT plugins and dependencies from here but it stuck on sbt getting org.scala-sbt 0.13.13 step! sometime it progresses but finally errors time out! I have access to address SBT want get dependencies by browser and I want to know is it possible to download dependencies manually and put in the right place ?
You can find the detailed steps in this chapter of Scala Cookbook. In build.sbt file you should add a resolver key including the Ivy repository you want.
resolvers += "Your Repository" at "Repository Location"
I have done git clone on the TopNotch project from github and wanted to import this sbt project to Intellij.
I am under the root directory of TopNotch and have sbt gen-idea, it failed with "Not a valid command"
Link to TopNotch: https://github.com/blackrock/TopNotch
So, I have added the below lines under project/plugins.sbt but still fails with
"bt.ResolveException: unresolved dependency: com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT: not found"
Lines added:(also tried with 1.5.0-SNAPSHOT"
resolvers += "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"
addSbtPlugin(dependency="com.github.mpeltonen" % "sbt-idea" % "1.7.0-SNAPSHOT")
I have SBT-0.13.11 installed but the build has 0.13.8
Scala - 2.11.8
Java 1.8
Intellij - 2016.1.3
Please suggest how to import the project.
Thank you.
sbt-idea plugin had been unsupported since it was included into official Scala plugin about two years ago, and project files generated by outdated version of the plugin are not compatible with IntelliJ IDEA starting with version 14, if I recall correctly.
The common approach is to install Scala plugin from IDEA (Settings > Plugins > Install JetBrains Plugin > search for Scala) and import your SBT project using the standard Open... dialog afterwards.
I have created a scala project using sbt as explained in this question
Now I want to import this project into eclipse.
How can I do that?
You use a plugin such as sbteclipse to genereate the sbt project
For sbt 0.13 and up (from the above link)
Add sbteclipse to your plugin definition file. You can use either:
the global file (for version 0.13 and up) at ~/.sbt/0.13/plugins/plugins.sbt
the project-specific file at PROJECT_DIR/project/plugins.sbt
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" %
"2.5.0")
In sbt use the command eclipse to create Eclipse project files
eclipse
In Eclipse use the Import Wizard to import Existing Projects into Workspace
I have Play! 2.2.1 Eclipse project and I have problem with dependencies.
I try to add dependency in Build.scala file
"org.mongodb" % "mongo-java-driver" % "2.8.0", and it is resolved when I run play in project directory and it is shown when i run command dependencies. However, I am unable to use it in my project and it is not in Eclipse build path. What am I doing wrong?
javafx is now in oracle-jdk.
scalafx gives delicious examples in its repository
The main questions I'm not being able to answer is "How to get started with scalafx"?
How can I add scalafx libary dependencies on my sbt project?
ScalaFX is soon to reach a stable release state.
As I write this you can find the published artifacts for version 1.0.0-M2 on the maven central repo
Adding the dependency to your sbt build should suffice
libraryDependencies += "org.scalafx" %% "scalafx" % "1.0.0-M2"
I did it the following way: I cloned the scalafx repository, build the jar using sbt package, then just copied the resulting jar into lib/ directory of my project. Make sure to reference your ${JAVAFX_HOME}/lib/jfxrt.jar as well.
If you want to use local maven, just run sbt publish-local in your scalafx dir, then add the following dependency to your project:
"org.scalafx" % "scalafx" % "1.0-SNAPSHOT"
(Look up that version in scalafx build.sbt, I pasted what was in mine)
#ayvango i have created a giter8 scalafx project template.just use
g8 jugchennai/scalafx.g8
You just need a new version of JDK, Giter8 and SBT. Dependency settings for javafx, scala, scalafx are predefined! IDE support also available.
URL : https://github.com/jugchennai/scalafx.g8