How can I specify a local jar file as a dependency in Play! Framework 1.x
Asked Answered
M

1

16

I have a jar file copied in the lib directory

I'd like to run "play deps --sync" without this jar being deleted..

I've already looked at depency file documentation but couldn't figure out how to do it

any idea?

-- edit

I've just found the answer: http://groups.google.com/group/play-framework/browse_thread/thread/b54e4e25ae49161b

Gonna google around a bit more before asking here

Manutius answered 25/8, 2011 at 2:21 Comment(0)
M
25

just like the answer in google groups said, I could achieve it with the following dependencies.yml file

for library /jar/DateHelper-1.0.jar

require:
    - play -> crud
    - provided -> DateHelper 1.0 
repositories: 
    - provided: 
        type:       local 
        artifact:   "${application.path}/jar/[module]-[revision].jar" 
        contains: 
            - provided -> * 

(You need to create the jar dir and put your jar files in it)

so, according to the ${xxxx} it seems like dependecies.yml file is processed like a template... just like happens with the routes file

Manutius answered 25/8, 2011 at 4:25 Comment(5)
I've been told in the google list that dependencies file just processes simple expressions, like ${application.path}, and not every groovy expression like a templateManutius
You can't use the lib directory for that. I updated your answer to match the advice in the Groups discussion.Krieger
There is more complete documentation available at: playframework.org/documentation/1.2.3/…Giagiacamo
in spanish too: playdoces.appspot.com/documentation/latest/…Manutius
This works but you need to run, play dependencies PROJECTNAME followed by eclipsify after adding this to dependencies.yml.Sayles

© 2022 - 2024 — McMap. All rights reserved.