Using IntelliJ IDEA to develop Lift applications

Using IntelliJ IDEA to develop Lift applications

At the moment (in absence of a proper Lift plug-in for IntelliJ), you can use IntelliJ as a code completion/syntax checking/import managing tool.You will need Maven, SBT and the Scala plug-in for IntelliJ. IntelliJ will manage your dependencies using the POM, you will build and run with SBT. Get all three, then proceed as follows.

Steps
  1. Use one of the Maven archetypes referenced elsewhere on this wiki to create a Lift project. The pom.xml will be used by IntelliJ to import your dependencies
  2. Create an SBT project on top of the Maven project (enter the project directory and run SBT)       Go to the Maven project, for example: lift_test/. Then run sbt. After that, run reload and update. Then run jetty-run command and you can view the page fromhttp://localhost:8080.                                   
  3. Create a new IntelliJ project from what results, using Import Project from External Model => Maven
  4. Add a Scala aspect to the project, employing Use Files. Point the plug-in to the project/boot subdirectory where SBT downloaded your Scala
  5. Develop with pleasure 
  6. Run your project.

 Click Maven Project on the right of IDEA, clikc lift_test(your project name), click jetty and then click jetty.run to run your project.

Gotchas
  • The Scala plug-in does not treat implicits as dependencies yet. If you’re importing implicits into a page (e.g., DSLs, e.g., the LIft JSON DSL), the dependency will be grayed out as if unused. It’s not. Don’t remove it, or optimize imports on that file – you will get cryptic compilation errors
Comments
  1. The Scala plugin in only being actively developed for the version 10 (X) release of IDEA which is currently in “Early Access Program” (pre-release). If you have questions about stability or usability of specific versions, please feel free to ask in the Google group/mailing list.
  2. It is perfectly acceptable to use Ant for developing in Lift. If your organization’s management does not buy off on switching to SBT or Maven and you need assistance setting up an Ant build, please direct your questions to the Google group/mailing list.
  3. To enable full syntax checking in the Scala plugin: 
    Mac: Command + alt/option + shift + e
    Windows: alt + control + shift + e
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值