Introduction
In this post, we will learn how to create a new Scala sbt project and convert it into the eclipse project. We will then import the project into eclipse
Step 1
Open your user's home directory, on windows, it will be
user directory\.sbt\1.0\
Step 2
Create a new directory by the name of plugins if one does not exist
Step 3
Create a new file plugins.sbt (if one does not exist) inside the plugins folder
Step 4
Open the newly created file plugins.sbt and add the following line
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")
Step 5
Open a Command prompt and create a new directory for your Scala project i.e.
> mkdir FirstScalaEclipseProject
Step 6
Move to the new directory
> cd FirstScalaEclipseProject
Step 7
Enter the following command
> sbt reload (if the shell is not restarted)
> sbt eclipse
Step 8
Open the eclipse, Go to File -> Import -> Import Existing Projects into Workspace -> browse to the newly created Eclipse project i.e. FirstScalaEclipseProject
Done
Conclusion
In this post, we learned how to create a new Scala project for Eclipse using sbt.
In this post, we will learn how to create a new Scala sbt project and convert it into the eclipse project. We will then import the project into eclipse
Step 1
Open your user's home directory, on windows, it will be
user directory\.sbt\1.0\
Step 2
Create a new directory by the name of plugins if one does not exist
Step 3
Create a new file plugins.sbt (if one does not exist) inside the plugins folder
Step 4
Open the newly created file plugins.sbt and add the following line
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")
Step 5
Open a Command prompt and create a new directory for your Scala project i.e.
> mkdir FirstScalaEclipseProject
Step 6
Move to the new directory
> cd FirstScalaEclipseProject
Step 7
Enter the following command
> sbt reload (if the shell is not restarted)
> sbt eclipse
Step 8
Open the eclipse, Go to File -> Import -> Import Existing Projects into Workspace -> browse to the newly created Eclipse project i.e. FirstScalaEclipseProject
Done
Conclusion
In this post, we learned how to create a new Scala project for Eclipse using sbt.
Comments
Post a Comment