如何在 Play 中指定本地 jar 文件作为依赖项!框架 1.x [英] How can I specify a local jar file as a dependency in Play! Framework 1.x
问题描述
我在lib目录下复制了一个jar文件
I have a jar file copied in the lib directory
我想在不删除这个 jar 的情况下运行play deps --sync"..
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
有什么想法吗?
-- 编辑
我刚刚找到了答案:http://groups.google.com/group/play-framework/browse_thread/thread/b54e4e25ae49161b
在问这里之前,我会多谷歌一下
Gonna google around a bit more before asking here
推荐答案
就像google group里的回答说的,我可以用下面的dependencies.yml文件来实现
just like the answer in google groups said, I could achieve it with the following dependencies.yml file
对于库/jar/DateHelper-1.0.jar
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 -> *
(您需要创建 jar 目录并将您的 jar 文件放入其中)
(You need to create the jar dir and put your jar files in it)
因此,根据 ${xxxx} 似乎dependecies.yml 文件像模板一样处理......就像路由文件发生的那样
so, according to the ${xxxx} it seems like dependecies.yml file is processed like a template... just like happens with the routes file
这篇关于如何在 Play 中指定本地 jar 文件作为依赖项!框架 1.x的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!