简体   繁体   English

IntelliJ-Scala-如何从Github导入Scala-SBT项目直接导入IntelliJ

[英]IntelliJ-Scala - how can I import Scala-SBT project from Github to directly into IntelliJ

I am importing my Scala-SBT projects from Github. 我正在从Github导入我的Scala-SBT项目。 I select 我选择

New
    Project from Version Controller
        GitHub
           Giving my project .git url and click clone.

After it import, 导入后

IntelliJ not considering as Scala-SBT project. IntelliJ不考虑将其作为Scala-SBT项目。

I saw, 我看见,

Settings -> Build, Execution and Deployement -> SBT

I did not find my project, it was nil in Linked SBT Projects . 我没有找到我的项目,它在Linked SBT Projects为零。

How can I import as Scala SBT project directly from Github. 如何直接从Github导入为Scala SBT项目。

is It mandatory that I should chack-out local and import as Scala SBT project as two steps? 我必须强制本地化并作为两个步骤作为Scala SBT项目导入吗?

or 要么

can I do direct import from github. 我可以直接从github导入。

You do everything as you said File | New | Project from Version Controller | GitHub 正如您所说的,您可以做所有事情File | New | Project from Version Controller | GitHub File | New | Project from Version Controller | GitHub File | New | Project from Version Controller | GitHub ... File | New | Project from Version Controller | GitHub ...

Now at this point you have bare project. 现在,您已经有了裸项目。

To show IntelliJ that this is SBT project open build.sbt file and you will see yellow alert with suggestion to Import Project press on it. 要显示IntelliJ这是SBT项目,请打开build.sbt文件,您将看到黄色警报,提示建议Import Project After indexing it will be recognized as SBT one. 编制索引后,它将被识别为SBT 1。

I found there is no direct way to import Scala-SBT porject from version control system unless your source already have IntelliJ project setup files(.idea folder in simple words.) so: 我发现没有直接方法可以从版本控制系统导入Scala-SBT porject,除非您的来源已经有了IntelliJ项目设置文件(简单来说就是.idea文件夹)。

  1. You should clone to your local. 您应该克隆到本地。
  2. Import as Scala SBT project in IntelliJ. 在IntelliJ中作为Scala SBT项目导入。

Note: you will import Scala-SBT project into IntelliJ, but it won't consider as SBT project it treats a Java project. 注意:您会将Scala-SBT项目导入IntelliJ中,但不会将其视为处理Java项目的SBT项目。

If you found any solution please let me know please. 如果您找到任何解决方案,请告诉我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM