Play Framework 1.2:如何添加自定义模块依赖项

Per*_*ega 11 java dependencies playframework

我在迁移到Play 1.2时有点迷失.我们的应用程序中有一组自定义模块.在Play 1.1.1中,我们使用了这种结构:

/root/
  /module1
  /module2
  ...
  /moduleN
  /main app
Run Code Online (Sandbox Code Playgroud)

而application.conf将模块引用为相对路径(../ module1)

我怎么能在Play 1.2中做同样的事情?我看到我应该使用 dependencies.yml文件,但在官方文档中找不到关于此主题的任何信息.

提前致谢

编辑: 谷歌集团有很多混合信息,但这篇文章解决了这些问题.

我在这里复制它,以便为在SO中搜索此问题的人提供未来参考:

好的,使用最新的master,这里需要的dependencies.yml和注释内联:

# 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 
Run Code Online (Sandbox Code Playgroud)

注意:请注意,如果您对本地存储库设置执行了错误,则在运行Play deps时可能会完全删除项目(完全!).是的,它发生在我身上:(

man*_*ian 0

要将信息提供给不是 play google 群组订阅者的其他人,要查找此类信息,请继续 play google 群组https://groups.google.com/group/play-framework并搜索“module + local”,你应该找到一些线索...

  • 请记住,当您的模块使用组织“play”时,您必须将其放入 PLAY_PATH/modules 中 (2认同)