【发布时间】:2011-08-16 22:30:18
【问题描述】:
我在迁移到 Play 1.2 时有点迷失了。我们有一套定制 我们应用程序中的模块。在 Play 1.1.1 中,我们使用了这种结构:
/root/
/module1
/module2
...
/moduleN
/main app
并且 application.conf 将模块引用为相对路径 (../ 模块1)
如何在 Play 1.2 中做同样的事情?我知道我应该使用 dependencies.yml 文件,但在 官方文档。
提前致谢
编辑: Google Group 里面有很多混杂的信息,但是this post 解决了问题。
我将其复制到此处,以供在 SO 中搜索此问题的人们将来参考:
好的,使用master的最新版本,这里需要的dependencies.yml 使用 cmets 内联:
# Application dependencies
# Notes:
# play is an alias for play -> play $currentVersion
# play -> crud is an alias for play -> crud $currentVersion
# play -> secure is an alias for play -> secure $currentVersion
# Modules from the main repository use 'play' as organisation
#
require:
- play
- play -> crud
- play -> secure
- play -> recaptcha 1.02
- play -> greenscript 1.2b
- crionics -> cms 1.0
- ugot -> widgets 1.0
- org.markdownj -> markdownj 0.3.0-1.0.2b4
repositories:
- Scala Tools:
type: iBiblio
root: http://scala-tools.org/repo-releases/
contains:
- org.markdownj
- My modules:
type: local
artifact: /somewhere/on/your/disk/[organisation]/[module]-[revision]
# This folder must contain
# /somewhere/on/your/disk/crionics/cms-1.0
# /somewhere/on/your/disk/ugot/widgets-1.0
contains:
- ugot
- crionics
注意:请注意,如果您在本地存储库设置中出现问题,则在运行 play deps 时可能会(完全!)删除您的项目。是的,它发生在我身上:(
【问题讨论】:
-
它对我不起作用。当从包含
/path/to/repos/mystuff/users-1.0的工件路径/path/to/repos/[organisation]/[module]-[revision]中需要mystuff -> users 1.0时,我得到一个mystuff->mystuff ->丢失。 -
@Yanick 我建议你添加一个新问题,在问题中附上你的依赖文件的内容
标签: java dependencies playframework