Skip to content
This repository

A simple-build-tool (sbt) plugin/processor for creating IntelliJ IDEA project files

Update the sbt github link

The link was to an older xsbt fork.
The link now points to the sbt/sbt github repo.
latest commit 95bd3af06e
Patrick Mahoney authored Mikko Peltonen committed
Octocat-spinner-32 notes Add notes for 1.6.0 February 08, 2014
Octocat-spinner-32 project Set next development version February 08, 2014
Octocat-spinner-32 src Support for extra test configurations April 09, 2014
Octocat-spinner-32 .gitignore Move gpg-plugin into .gitignored file November 25, 2012
Octocat-spinner-32 LICENSE Add Odd as contributor. August 19, 2010
Octocat-spinner-32 Update the sbt github link April 09, 2014
Octocat-spinner-32 sbt Use sbt-0.13.0-Beta2 with 0.12.4-RC2 launcher June 09, 2013
Octocat-spinner-32 sbt-launch.jar Use sbt-0.12.3 July 28, 2013
Octocat-spinner-32 Fix script for osx August 07, 2012



Add the following lines to ~/.sbt/0.13/plugins/build.sbt or PROJECT_DIR/project/plugins.sbt

addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")

To use the latest snapshot version, add also Sonatype snapshots repository resolver into the same plugins.sbt file:

resolvers += "Sonatype snapshots" at ""

addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.7.0-SNAPSHOT")


Basic project

Use the gen-idea sbt task to create Idea project files.

Project with dependencies

If you have two sbt projects A and B, and A depends on B, then use the gen-idea sbt task on Project A to create Idea project files for both projects.

The projects need to be set up in the following way:

Project A:

import sbt._

object A extends Build {
  lazy val A = Project("A", file(".")) aggregate(B) dependsOn(B)
  lazy val B = RootProject(file("../B"))

Project B:

import sbt._

object B extends Build {
  lazy val B = Project("B", file("."))

Sources and javadocs

By default, classifiers (i.e. sources and javadocs) of dependencies are loaded if found and references added to Idea project files. If you don't want to download/reference them, use command 'gen-idea no-classifiers'.

Configuration settings

Exclude some folders

In your build.sbt:

ideaExcludeFolders += ".idea"

ideaExcludeFolders += ".idea_modules"

Or in your Build.scala:

import org.sbtidea.SbtIdeaPlugin._
lazy val myproject = Project(id = "XXXX" ....)
.settings(ideaExcludeFolders := ".idea" :: ".idea_modules" :: Nil)

Include extra test configurations

In your Build.scala:

lazy val LoadTest = config("test-load") extend Test
lazy val loadTestSettings : Seq[Setting[_]] = inConfig(LoadTest)(Defaults.testSettings ++ Seq(sourceDirectory in LoadTest <<= (sourceDirectory in LoadTest)(_ / ".." / "test-load")))

lazy val root = Project(...)
  .settings(ideaExtraTestConfigurations := Seq(LoadTest) :: Nil)
  .configs( LoadTest )
  .settings( loadTestSettings : _*)



Licensed under the New BSD License. See the LICENSE file for details.

Something went wrong with that request. Please try again.