Play Framework 1.2:如何添加自定义模块依赖关系 [英] Play Framework 1.2: How to add custom module dependencies

查看:481
本文介绍了Play Framework 1.2:如何添加自定义模块依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在迁移到1.2版中有点迷失了。我们的应用程序中有一套定制的
模块。在Play 1.1.1中,我们使用了以下结构:

  / root / 
/ module1
/ module2
...
/ moduleN
/ main app

和应用程序.conf将模块引用为相对路径(../
module1)



如何在Play 1.2中执行相同操作?我看到我应该使用
dependencies.yml 文件,但是在
官方文档中找不到有关此主题的任何信息。



提前感谢



编辑:
Google群组中有很多混合信息, 这篇文章解决了这些问题。



我将其复制到此处,为在SO中搜索此问题的人提供未来参考:


好的,使用最新的主人,这里需要的依赖关系。
与评论内联:




 #应用程序依赖关系

#注意:
#play是一个别名 - >玩$ currentVersion
#play - > crud是玩的别名 - > crud $ currentVersion
#play - >安全是玩的别名 - >安全$ currentVersion
#主库中的模块使用'play'作为组织


要求:
- 播放
- 播放 - > crud
- play - >安全
- 播放 - > recaptcha 1.02
- play - > greenscript 1.2b
- crionics - > cms 1.0
- ugot - >小部件1.0
- org.markdownj - > markdownj 0.3.0-1.0.2b4

存储库:

- Scala工具:
类型:iBiblio
root:http:// scala-tools .org / repo-releases /
包含:
- org.markdownj

- 我的模块:
type:local
artifact:/ somewhere / on / your / disk / [organization] / [module] - [revision]

#此文件夹必须包含
#/somewhere/on/your/disk/crionics/cms-1.0
#/somewhere/on/your/disk/ugot/widgets-1.0

包含:
- ugot
- crionics

注意:请注意,如果您在本地存储库设置中发生错误,那么您可能会删除项目(完全!)运行 play deps 。是的,它发生在我身上:(

解决方案

要向没有播放谷歌组的订阅者的其他人提供信息,要查找此类信息,请继续播放Google群组 https://groups.google.com/group/play - 框架并搜索模块+本地,你应该找到一些线索...


I'm a bit lost in a migration to Play 1.2. We have a set of custom modules in our application. In Play 1.1.1 we used this structure:

/root/
  /module1
  /module2
  ...
  /moduleN
  /main app

And application.conf referenced the modules as a relative path (../ module1)

How can I do the same in Play 1.2? I see I should use the dependencies.yml file, but can't find any information on this topic in the official documentation.

Thanks in advance

EDIT: There is a lot of mixed information in the Google Group, but this post solved the issues.

I copy it here to provide future reference for people searching this issue in SO:

Ok, using the latest from master, here the needed dependencies.yml with comments inline:

# 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 

NOTE: be aware that if you do something wrong with the local repository settings you risk deleting your project (completely!) when running play deps . Yes, it happened to me :(

解决方案

To give the information to other people who are not subscribers of the play google group, to find such information, go on play google group https://groups.google.com/group/play-framework and search "module + local", you should find some clue...

这篇关于Play Framework 1.2:如何添加自定义模块依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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