Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reference local modules using dependency.yml?

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?

like image 529
Olivier Refalo Avatar asked May 02 '11 15:05

Olivier Refalo


2 Answers

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

like image 155
Olivier Refalo Avatar answered Sep 20 '22 18:09

Olivier Refalo


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.

like image 23
Felipe Oliveira Avatar answered Sep 22 '22 18:09

Felipe Oliveira