如何使用dependency.yml 引用本地模块? [英] How to reference local modules using dependency.yml?
问题描述
如何使用dependency.yml
我以为我会放弃这个问题,因为它会定期在论坛中显示.答案应该在后面.
Thought I would just drop this question as it shows in the forums on a regular basis. Answer should follow.
采用以下应用程序层次结构:
Take the following application hierarchy:
myplayapp/
myfirstmodule/
mysecondmodule/
我正在使用 play run myplayapp
I am running my application using play run myplayapp
如何使用 Play 1.2 dependency.xml 引用我的本地模块?
How can I reference my local modules using Play 1.2 dependency.xml?
推荐答案
简单!
编辑文件myplayapp/conf/dependencies.yml如下
require:
- play
- myfirstmodule -> myfirstmodule
- mysecondmodule -> mysecondmodule
repositories:
- My modules:
type: local
artifact: ${application.path}/../[module]
contains:
- myfirstmodule
- mysecondmodule
然后运行 play dependencies myplayapp 就完成了.
then run play dependencies myplayapp and you are done.
注意:注意不要在模块名中使用'-',它是版本号的保留分隔符.IE.myfirstmodule-1.00 或 myfirstmodule-head
Note: be careful, not to use '-' in the module name, it is a reserved delimiter for the version number. Ie. myfirstmodule-1.00 or myfirstmodule-head
这篇关于如何使用dependency.yml 引用本地模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!