Invalid key: eclipse (looks like: deliver, license, clear)

I downloaded the type activator and completed the following steps

activator new HelloWorld play-java cd HelloWorld activator build activator eclipse 

I got an error message

 [warn] The global sbt directory is now versioned and is located at /Users/abhi/.sbt/0.13. [warn] You are seeing this warning because there is global configuration in /Users/abhi/.sbt but not in /Users/abhi/.sbt/0.13. [warn] The global sbt directory may be changed via the sbt.global.base system property. [info] Loading project definition from /Users/abhi/JavaProjects/HelloWorld/project [warn] The global sbt directory is now versioned and is located at /Users/abhi/.sbt/0.13. [warn] You are seeing this warning because there is global configuration in /Users/abhi/.sbt but not in /Users/abhi/.sbt/0.13. [warn] The global sbt directory may be changed via the sbt.global.base system property. [info] Set current project to HelloWorld (in build file:/Users/abhi/JavaProjects/HelloWorld/) [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 searched for this problem and found

How to use sbt-eclipse to create an eclipse project project file?

Install sbteclipse

I can not understand the answers in these threads. I created a directory

 cd ~/.sbt mkdir plugins touch plugins.sbt 

But I still get this error. Does anyone have a “squeezed” solution that works?

+4
source share
1 answer

In the latest Play release, the sbteclipse plugin is not enabled by default. This is why the activator does not understand the eclipse command.

Go to the project folder you have already created and add the following line to project / plugins.sbt:

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

Then run the following commands:

 activator compile eclipse 

Additional information on the official website

+9
source

All Articles