-
Notifications
You must be signed in to change notification settings - Fork 5
Setting up an IntelliJ IDEA Project
kuebler edited this page Apr 19, 2012
·
2 revisions
We prefer developing with IntelliJ IDEA. It is available for OS X, Linux and Windows and the community edition is free for everyone and works great with the Scala Plugin.
- Download and install IntelliJ IDEA
- Install the Scala and the sbt plugin via the Plugin Manager (under Preferences)
We assume that you already have a working copy of Warthog (see ...) on your machine.
- Start IntelliJ and create a new project
- Choose create a new project from scratch
- As project name choose
warthog
and set the files location to your local copy of warthog. Also create a Java Module with the the name and the same location. - You can let IntelliJ choose the source paths for you (which should be 3 paths, 2x Scala and 1x Java)
- Choose Scala under "desired technologies" and provide the path to your Scala distribution
- This should create a new project and index all necessary files
- Choose the directories
.idea
,target
andproject
and mark them as excluded - Choose the directory
test/scala
and mark it as Test Source Root - Go to Project Structure
- Under Libraries add the following two libraries
- Specs2 (should be in
$HOME/.ivy/cache/org.specs2/.../jars
) - JNA (should be in
$HOME/.ivy2/cache/net.java.dev.jna/jna/jars/jna-3.3.0.jar
)
- Configure SBT under Preferences / Project Settings / SBT
- Choose the appropriate location to your
sbt-launch.jar
- Use the following VM parameters
-XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M -Dwarthog.libs=$WARTHOG_HOME/lib -Dfile.encoding=UTF-8"
- Modify the project to use the sbt-idea plugin
- Launch
sbt
, typegen-idea no-sbt-classifiers
(idea-specific configuration files will be generated) - Import the newly generated idea project into your IntelliJ Idea IDE
This should get you ready to develop with and for Warthog in IntelliJ IDEA.