[英]What's a sane workflow for (re)generating Eclipse project files in Java Play Framework?
I can generate Eclipse files for a Play 2.1 project via: 我可以通过以下方式为Play 2.1项目生成Eclipse文件:
$ play eclipse with-source=true
... and then I can do File -> Import [Existing Project] in Eclipse. ...然后我可以在Eclipse中执行File-> Import [Existing Project]。
That works great -- but when I want to add a dependency to project/Build.scala
, I can't figure out how to get this to update in Eclipse. 效果很好-但是当我想向
project/Build.scala
添加依赖project/Build.scala
,我不知道如何在Eclipse中进行更新。 The only working solution I have is: 我唯一有效的解决方案是:
play eclipse
play eclipse
Which can't be "the right way." 不可能是“正确的方法”。 ( Or can it? )
( 或者可以吗? )
Related question (but addresses an older version of Play): Eclipse not updating referenced libraries for my Play framework application 相关问题(但解决了旧版本的Play): Eclipse不更新我的Play框架应用程序的引用库
This works for me (using Eclipse Juno): 这对我有效(使用Eclipse Juno):
If you add a dependency, use the play console to reload the project: 如果添加依赖项,请使用播放控制台重新加载项目:
[play] $ reload
Then rebuild the eclipse configuration: 然后重新构建eclipse配置:
[play] $ eclipse
Then refresh the project within eclipse by right clicking on the project and clicking Refresh . 然后通过右键单击项目并单击Refresh刷新 Eclipse中的项目。
There's no need to delete the project and create a new one. 无需删除项目并创建一个新项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.