How to reference local modules using 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/
I am running my application using play run myplayapp
How can I reference my local modules using Play 1.2 dependency.xml?
Easy!
Edit file myplayapp/conf/dependencies.yml as follows
require:
- play
- myfirstmodule -> myfirstmodule
- mysecondmodule -> mysecondmodule
repositories:
- My modules:
type: local
artifact: ${application.path}/../[module]
contains:
- myfirstmodule
- mysecondmodule
then run play dependencies myplayapp and you are done.
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
You can also drop it inside the modules directory, like we used to do on ${play.path}/modules, if you have problems with dependencies.yml somehow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With