IntelliJ IDEA不从SBT项目加载Lift库 [英] IntelliJ IDEA doesn't load Lift libraries from a SBT project

查看:146
本文介绍了IntelliJ IDEA不从SBT项目加载Lift库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用最基本的指南通过 sbt 创建了一个空白项目,具体为:

I've created a blank project via sbt using the most basic guide, specifically:

> cd xyz
> sbt # here we create a new project w/ Scala 2.8.1
> *lift is org.lifty lifty 1.6.1
> lift create project-blank

但是当我在IntelliJ中打开项目时,它无法正确识别。通过sbt下载的罐子。所有进口均为红色

however when I open the project in IntelliJ, it doesn't correctly recognize .jars downloaded via sbt. All imports are red

当我进入项目设置时( Ctrl + Alt + Shift + )在库部分,它们都是灰色的。

and when I go to project settings (Ctrl + Alt + Shift + S) in Libraries section, they are all greyed out.

除此之外,项目源被正确识别为具有Web构面的Scala项目

Apart from that, the project sources are correctly recognized as Scala project with a Web facet

我忘记配置了什么?我已经尝试使用本指南通过maven创建项目,但是我非常喜欢使用SBT而不是maven。

Did I forget to configure something? I've already tried to create a project via maven using this guide, but I'd very much prefer to use SBT instead of maven.

推荐答案

使用 sbt -idea 创建IntelliJ项目结构。每次更改SBT构建定义中的项目结构或库依赖项时重新运行此项。

Use sbt-idea to create the IntelliJ project structure. Re-run this each time you change the project structure or the library dependencies in your SBT build definition.

说明: SBT 0.10.x 0.11.x SBT 0.7.x

这篇关于IntelliJ IDEA不从SBT项目加载Lift库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆