Search code examples
scalaintellij-ideafinagle

How to set up a scala project in IntelliJ IDEA that uses git libraries


I would like to give IntelliJ IDEA a try, but I have no idea how to get going.

I am simply trying to create a new project that uses Finagle Echo Server, hosted on github, as starting point.

Assuming I'm starting with a clean install on Mac. I installed IDEA and added the Scala and SBT plugins. What steps should I take to create a project, that uses Finagle and run the code in the http server example?

PLEASE help. I realize my question sounds like a stupid question, but there are so many different approaches to working with Scala projects from SBT command line, Scala-IDE, Idea, etc, that I simply don't know how to get a comfortable development environment going.


Solution

  • A manual solution that doesn't require you to use SBT for your project might be more straightforward, given the SBT versioning issues. You'll still use SBT to build finagle, though.

    1. Install the SBT runner script per step 1 above. (It can handle SBT 0.7 projects too).
    2. Manually git clone git://github.com/twitter/finagle.git.
    3. cd to the finagle directory and type "sbt package". Its dependencies should end up under lib_managed, and it should produce the finagle jars themselves under target/ or some such (just note the locations in the command output).
    4. Create an IDEA project from scratch, and manually add dependencies to the finagle jars and their dependencies (under Project Structure->Dependencies).