Olivier Refalo
Olivier Refalo

Reputation: 51515

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?

Upvotes: 7

Views: 4408

Answers (2)

Olivier Refalo
Olivier Refalo

Reputation: 51515

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

Upvotes: 12

Felipe Oliveira
Felipe Oliveira

Reputation: 1041

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.

Upvotes: 3

Related Questions