如何使用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.2dependency.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
然后运行 播放依赖项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屋!