Categories
|
opensource software
SBTProducts: IntelliJ IDEA, Android Studio Vendor: Esko Luontola Email: N/A Website: http://github.com/orfjackal/idea-sbt-plugin License: http://github.com/orfjac...n/raw/master/LICENSE.txt Description:
Integrates with Simple Build Tool (SBT) to enable building Scala projects easily and quickly.
Offers a console where SBT commands can be entered interactively, and a Before Run task to delegate project compilation to SBT, as an alternative to the built in IntelliJ Make.
4 updates are hidden
show all updates
Recent change notes:The first IntelliJ 12 (Leda) compatible release of idea-sbt-plugin. Includes all the usability improvements from version 1.4.0.General usage instructions:Go to the "Before launch" options of a Run Configuration, uncheck "Make" and choose "Run SBT Action / test-compile" to compile the project with SBT.This plugin does not generate or synchronize your IDEA project structure from the SBT build configuration. The sbt-idea-plugin (http://github.com/mpeltonen/sbt-idea-plugin), a plugin for SBT, rather than for IDEA, serves this purpose. These two projects are complementary, and do not conflict with each other. Alternatively you can rely on IDEA's Maven integration, so that both SBT and IDEA find the dependencies from Maven's POM files. But beware that SBT/Ivy does not support the relativePath element for parent POMs (https://issues.apache.org/jira/browse/IVY-1173), which can cause issues with multi-module projects. |
|||||||||||||||||||||||||||||||||||
Comments:
- replace the scala plugin lib with the newest 2.8.0.final ones. On my machine this is in "C:\Documents and Settings\mylogin\.IntelliJIdea90\config\plugins\Scala\lib"
- then simply add a dependency on the scala 2.8.0.final lib in the "module settings", and it's just fine! (with "export" unticked, "compile" mode)
Hope it helps,
JL
For me the show stopper for using SBT in multi-module projects is that SBT relies on Ivy's POM file parsing, and Ivy does not recognize the relativePath element in the POM's parent element. As a result SBT cannot compile multi-module Maven projects.
There are two solutions, but for neither of which I have the time:
1. Fix Ivy to recognize the relativePath element
2. Improve this SBT plugin to import dependencies from SBT into IDEA
Option 1 is probably easier.
Basically, I have a project with multiple modules, like so:
Scala
--- App1
--- App2
App1 had been set up originally with sbt from the command line. For App1 I have a Run Configuration set such that the main class is Main, the working directory is \someplace\Scala\App1, and the classpath is App1, with the Run SBT before launch action of course.
The plugin, when I tell it to compile App1, first apparently looks to see if there is a SBT project declared at the Scala level. This seems like a bug to me and is a show stopper. For now I guess I'll continue to use sbt at the command line.
Best regards,
Steve Thompson
--
I've created a test under src/test/scala, and though SBT from the command line can see it, in IntelliJ the SBT Action messages report that there are no tests to run. Do I need to do something special?
Let me know and best regards,
Steve Thompson
--
Nice job and best regards,
Steve Thompson
--
build.properties
---
project.organization=com.someplace
project.name=MyProject
sbt.version=0.7.4
project.version=1.0
build.scala.versions=2.8.0
project.initialize=false
In my run configuration, I have unchecked 'Make' and set "Run SBT Action 'test-compile'" as advised in the documentation.
From the command line, I can run SBT just fine in my project directory.
From IntelliJ, when I run I get the following message from the SBT Action
'Project does not exist, create new project?'
Obviously, the plugin is unable to recognize that the SBT structure is already in place.
My questions then are as follows:
1) How do I rectify this problem?
2) Does your plugin direct IntelliJ to use the dependencies that I've defined in my project/build/Project.scala file?
Let me know and best regards,
Steve Thompson
--