问题描述
我在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群里的回答说的那样,我可以通过下面的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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!