如何使用dependency.yml引用本地模块?

Oli*_*alo 7 playframework

如何使用dependency.yml引用本地模块

以为我会放弃这个问题,因为它定期在论坛中显示.答案应该遵循.

采用以下应用层次结构:

myplayapp/
myfirstmodule/
mysecondmodule/
Run Code Online (Sandbox Code Playgroud)

我正在使用play run myplayapp运行我的应用程序

如何使用Play 1.2 dependency.xml引用本地模块?

Oli*_*alo 12

简单!

编辑文件myplayapp/conf/dependencies.yml如下

require:
    - play
    - myfirstmodule -> myfirstmodule
    - mysecondmodule -> mysecondmodule

repositories:
    - My modules:
        type:       local
        artifact:   ${application.path}/../[module]
        contains:
            - myfirstmodule
            - mysecondmodule
Run Code Online (Sandbox Code Playgroud)

然后运行播放依赖myplayapp,你就完成了.

注意:注意,不要在模块名称中使用" - ",它是版本号的保留分隔符.IE浏览器.myfirstmodule-1.00或myfirstmodule-head