-
Notifications
You must be signed in to change notification settings - Fork 0
Using sbteclipse
Please make sure that you have installed sbteclipse like described here.
sbteclipse provides the command eclipse that will create Eclipse project definitions for you sbt build. This command can be configured via sbt settings some of which can be overridden via options. As there are sensible defaults for all settings, you don't necessarily have to apply any custom configuration. Just execute the command eclipse in an sbt session:
> eclipse
[info] About to create Eclipse project files for your project(s).
[info] Updating {file:/Users/heiko/tmp/test/}test...
...
[info] Successfully created Eclipse project files for project(s): test
If you see the message "Successfully created Eclipse project files ..." you will find one or more Eclipse project definitions in your project directory. An Eclipse project definition consists of a .project file, a .classpath file and optionally files in the .settings/ folder. If you have a simple project, you will find one Eclipse project definition in the root directory of your project. But if you have a multi-module build, parent projects are skipped by default and Eclipse project definitions will only be created for the "bottom projects".
In order to import these projects into Eclipse, please open a workspace which should be different from the sbt project directory. Then use the Import Wizard to import Existing Projects into Workspace. Please notice that this wizard, which is part of standard Eclipse, is limited in its abilities to import multiple projects at once. Therefore it might be necessary to run it several times, e.g. if you have a multi-module build and change the setting skipParents (see below) to false.
- executionEnvironment: Option[EclipseExecutionEnvironment.Value] - The optional Eclipse execution environment. Defaults to None.
- skipParents: Boolean - Skip creating Eclipse files for parent project? Defaults to true.
- withSource: Boolean - Download and link sources for library dependencies? Defaults to false.
- configurations: Set[Configuration] - The configurations to take into account. Defaults to Set(Compile, Test).
- createSrc: EclipseCreateSrc.ValueSet - The source kinds to be included. Defaults to EclipseCreateSrc.Default (which is ValueSet(Unmanaged, Source)).
- classpathEntryCollector: PartialFunction[ClasspathEntry, ClasspathEntry] - Determines how classpath entries are filtered and transformed before written into XML. The default replaces scala-library.jar with the Scala container, scala-compiler.jar with the Scala compiler container and passes all others unchanged.
TODO