Play Framework-将新目录添加到classpath [英] Play Framework -- add new directories to classpath

查看:91
本文介绍了Play Framework-将新目录添加到classpath的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够有一个单独的目录,可以将表示插件的jar文件添加到Play 2.0项目中. Jar文件通常保存在Play的/lib目录下.我想将我的jar放在一个名为/plugins

I would like to be able to have a separate directory where jar files that represent plugins can be added to a Play 2.0 project. Jar files are normally kept under the /lib directory in Play. I'd like to separate my jars in a directory called /plugins

以前曾问过这个问题,但建议是只使用/lib目录. 向playframework类路径中添加其他Java文件

This question was asked before, but the suggestion was to just use the /lib directory. Adding additional java files to playframework classpath

如果不手动更改Play生成的"eclipsified"文件,是否有办法做到这一点?

Is there no way to do this without manually changing the 'eclipsified' files generated by Play?

推荐答案

我想您可以通过更改sbt构建脚本来做到这一点.应该很简单

I suppose you can do that by altering the sbt build script. Should be as simple as

unmanagedBase <<= baseDirectory { base => base / "custom_lib" }

这是 sbt文档的链接

这篇关于Play Framework-将新目录添加到classpath的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆