I didn't find getting Scala set up too hard with Intellij... it was just the plugin. But getting Lift or other frameworks like Play set up with Intellij was a real beast.
I found a variety of information online and put it together as my steps to getting this working on Windows, with Intellij. Without doing this, Intellij will not understand your imports like import net.liftweb._ and will complain about "Unknown symbol" or something like that.
What you will need installed is:
1. Generating the Maven Archetype:
go into a folder of your choice and do:
mvn archetype:generate \
-DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-basic_2.9.1 \
-DarchetypeVersion=2.4-M5 \
-DarchetypeRepository=http://scala-tools.org/repo-snapshots \
-DremoteRepositories=http://scala-tools.org/repo-snapshots \
-DgroupId=com.company \
-DartifactId=lift_test \
-Dversion=1.0
On Windows, replace "\" with "^" for multi-line commands
2. Once done, run SBT in this folder with simply typing sbt and hitting ENTER.
3. In Intellij create a project and do an import project from external model (Maven) and pull this project in.
You can now write your code and save etc. I didn't have to do anything special to get Scala to run... it was all set up from my previous work getting the scala plugin installed.
When you decide it's time to try the lift app out, you simply go to the lift project on the command line and type:
sbt update ~jetty-run
I found a variety of information online and put it together as my steps to getting this working on Windows, with Intellij. Without doing this, Intellij will not understand your imports like import net.liftweb._ and will complain about "Unknown symbol" or something like that.
What you will need installed is:
- Scala of course
- Download Lift
- Install Maven
- Get SBT (http://www.scala-sbt.org/release/docs/Getting-Started/Setup.html#manual-installation)
1. Generating the Maven Archetype:
go into a folder of your choice and do:
mvn archetype:generate \
-DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-basic_2.9.1 \
-DarchetypeVersion=2.4-M5 \
-DarchetypeRepository=http://scala-tools.org/repo-snapshots \
-DremoteRepositories=http://scala-tools.org/repo-snapshots \
-DgroupId=com.company \
-DartifactId=lift_test \
-Dversion=1.0
On Windows, replace "\" with "^" for multi-line commands
2. Once done, run SBT in this folder with simply typing sbt and hitting ENTER.
3. In Intellij create a project and do an import project from external model (Maven) and pull this project in.
You can now write your code and save etc. I didn't have to do anything special to get Scala to run... it was all set up from my previous work getting the scala plugin installed.
When you decide it's time to try the lift app out, you simply go to the lift project on the command line and type:
sbt update ~jetty-run
No comments:
Post a Comment