malsmith
malsmith

Reputation: 819

Adding Oracle Jdbc driver to Playframework dependency.yml file

I tried to setup a local repository so that I can full use the play dependency command. However there is no public repo for Oracle's JDBC drivers. So I though I could do this

# Application dependencies

require:
    - play 1.2.3
    - play -> table 1.2
    - com.oracle -> ojdbc14_g 10.0

repositories:

    - playVendorDependencies:
        type:       local
        artifact:   "${application.path}/tmplib/[artifact].jar"
        contains:   com.oracle -> *

But it is not working - says that the ojdbc14_g.jar file is not found in any repo. running with play dependencies --debug does not seem to show that the new repo is ever accessed.

Upvotes: 1

Views: 1825

Answers (2)

malsmith
malsmith

Reputation: 819

Thank you very much for the reply -- my final file is

# Application dependencies

require:
    - play 1.2.3
    - play -> table 1.2
    - com.oracle -> ojdbc14_g 10.0

repositories:

    - playVendorDependencies:
        type:       local
        artifact:   "${application.path}/tmplib/[artifact].jar"
        contains:
             - com.oracle -> *

See the difference? The contains clause at the bottom needed a line feed, spaces and a dash to be proper YAML format.

Upvotes: 0

Pere Villega
Pere Villega

Reputation: 16439

I believe you have a couple of errors, try this:

# Application dependencies

require:
    - play 1.2.3
    - play -> table 1.2
    - com.oracle -> ojdbc14_g 10.0

repositories:

    - playVendorDependencies:
        type:       local
        artifact:   "${application.path}/tmplib/[organization]/[module]_[revision]"
        contains:  
          - com.oracle -> *

and make sure your path exists and is:

${application.path}/tmplib/com.oracle/ojdbc14_g_10.0.jar

See this for more information

Upvotes: 1

Related Questions