Why does "activator eclipse" yield "Not a valid project ID: eclipse" in a new project?
Asked Answered
D

3

9

I just created a new project using activator new, and am now trying to eclipsify it using activator eclipse. But I am facing an issue:

D:\work\firebase>activator eclipse
[info] Loading project definition from D:\work\firebase\project
[info] Set current project to firebase (in build file:/D:/work/firebase/)
[error] Not a valid command: eclipse (similar: help, alias)
[error] Not a valid project ID: eclipse
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: eclipse (similar: deliver, licenses, clean)
[error] eclipse
[error]        ^

I am using Typesafe Activator 1.3.2

Dyun answered 2/7, 2015 at 12:34 Comment(0)
S
19

Append this piece to your plugins.sbt file:

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

Play no longer includes the sbteclipse or sbt-idea plugins, which enables users to upgrade IDE support independently of Play.

Source

Saturable answered 2/7, 2015 at 13:1 Comment(5)
I tried this but it is not working! I am using Windows 8.1 with Java 8 update 74, activator version 1.3.9. and play 2.5!Alethiaaletta
I'd like to add that you can use the global plugins.sbt in ~/.sbt/0.13/plugins/ or the one in the project/ folder of your project (Installing sbteclipse).Taverner
What a crap. My first experiences with the Play 2 Framework and I'm getting errors by just doing what the docs say. That doesn't look very professional.Xanthin
Don't forget to use the correct plugin version. For 2.5 I'm adding: addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.1.0") to project/plugins.sbtMidwinter
@CaseyMurray Edit the answer, please. :-)Saturable
G
5

According to James Ward:

I think the shims only get installed by the UI. But jsuereth can confirm. If so we need to fix this. A workaround is to first run the UI (activator ui) on the project, then you can use activator eclipse

Source: https://github.com/typesafehub/activator/issues/212

Gripe answered 2/7, 2015 at 13:2 Comment(0)
R
0

I solved by this way:

1 add line addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

2 then run activator eclipse

Rutilant answered 19/4, 2016 at 14:25 Comment(1)
this is same as accepted answer, just only in bold letter ;)Dyun

© 2022 - 2024 — McMap. All rights reserved.