Maik Klein
Maik Klein

Reputation: 16148

Installing sbteclipse

i have problems top use sbteclipse

What I have done:

name := "foo"

version := "1.0"

scalaVersion := "2.9.2"

libraryDependencies += "net.java.dev.jna" % "jna" % "3.4.0"

But I always get the following error

[error] Not a valid command: eclipse (similar: help, alias)
[error] Not a valid project ID: eclipse
[error] Expected ':'
[error] Not a valid key: eclipse (similar: deliver, licenses, clean)
[error] eclipse
[error]        ^

ps: I am using Windows. I am also using sbt 0.12

Upvotes: 15

Views: 11063

Answers (3)

uvsmtid
uvsmtid

Reputation: 4295

I had similar a issue and answered to a similar question.

I tried "everything" and, eventually, I just had to update my sbt from 0.13.1 to 0.13.9.

Upvotes: 0

okello
okello

Reputation: 609

I think that I might have found a solution. First, the default directory checked for plugins configuration is 'USER_HOME/.sbt/plugins' and NOT 'USER_HOME/.sbt/0.13/plugins'.

Secondly, the sbt version specified seems to matter. In 'PROJECT_HOME/project/build.properties', there's an 'sbt.version' property. If the version of sbt specified in this file is different from the actually installed version of sbt, there's likely to be an issue. I think I was affected more so by this because I'm using an Activator template and it already had 'sbt.version' specified in this 'build.properties' file.

While nosing around, I came across this

"Support for plugin configuration in project/plugins/ has been removed. It was deprecated since 0.11.2" from sbt website at http://www.scala-sbt.org/0.13.0/docs/Community/ChangeSummary_0.13.0.html. I still see a lot of guys pointing that it should be configured in 'PROJECT_HOME/projects/plugins.sbt'. I think this is very confusing.

Upvotes: 0

Ivan Meredith
Ivan Meredith

Reputation: 2222

Your global sbt folder is at %USERPROFILE%\.sbt (C:\Users\<username>\.sbt most likely). So your plugins should be defined at %USERPROFILE%\.sbt\plugins\plugins.sbt

Failing this you can add it to your project directly. Add the file path is <project_root>\project\plugins.sbt. If the project directory doesn't exist you will need to create it.

Upvotes: 14

Related Questions