October 25, 2011

Dependency Management with Play!

Play! has dependency management baked into it. This allows you to express your application’s external dependencies in a single dependencies.yml file. So if your app requires commons-lang or log4j, you can list them in your depencies.yml file and Play! will download them for you and place them in your lib directory.

So I'm making changes to my Play! demo app for salesforce.com and am trying to specify the Force.com Web Service Connector (WSC) in my dependencies.yml file. However, I think that I'm not referencing them correctly as the module is not being found in mavenscentral and downloaded. I've tried different combinations with the artifactId and groupId but nothing seems to work. Here's my dependencies.yml:

    - play
    - force-wsc -> force-wsc

When I run play dependencies --verbose in Terminal I get the following:

module not found: force-wsc#force-wsc;->
==== mavenCentral: tried
-- artifact force-wsc#force-wsc;->!force-wsc.jar:

::          UNRESOLVED DEPENDENCIES         ::
:: force-wsc#force-wsc;->: not found

Any help with this issue would be greatly appreciated!


I worked with @jesperfj this morning and he pointed me in the right direction. I needed to include the groupId and version as well. The correct syntax looks like:

    - play
    - com.force.api -> force-wsc 22.0.0