简体   繁体   中英

Play Framework 1.2: How to add custom module dependencies

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...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM