本文介绍了安装sbteclipse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我有问题最好的使用

我做了什么:


  • 转到我的全球sbt文件夹。

  • 创建了一个插件文件夹

  • 使用 addSbtPlugin(com.typesafe.sbteclipse%sbteclipse-plugin%2.1.0)创建文件plugins.sbt

  • 转到我的eclipse项目并创建了一个build.sbt文件

  • 它包含:

  • went to my global sbt folder.
  • created a plugins folder
  • created the file plugins.sbt with addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0")
  • went to my eclipse project and created a build.sbt file
  • it contains:
version := "1.0"

scalaVersion := "2.9.2"

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





  • 我在我的cmd中选择项目文件夹。并且键入 sbt eclipse

    • I am selecting the project folder in my cmd. and type sbt eclipse
    • 但是我总是收到以下错误

      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:我正在使用Windows。我也使用sbt 0.12

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

      推荐答案

      您的全球sbt文件夹位于%USERPROFILE%\.sbt C:\Users\< username> \.sbt 最有可能)。因此,您的插件应定义在%USERPROFILE%\.sbt\plugins\plugins.sbt

      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

      否则您可以直接将其添加到项目中。添加文件路径是< project_root> \project\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.

      这篇关于安装sbteclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

      1403页,肝出来的..

09-06 21:40