Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
658 views
in Technique[技术] by (71.8m points)

maven - How can I specify a local jar file as a dependency in Play! Framework 1.x

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...