开发者

Adding Oracle Jdbc driver to Playframework dependency.yml file

开发者_JS百科

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.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜