Play Framework — add new directories to classpath

五迷三道 提交于 2020-01-12 08:33:09

问题


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

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

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


回答1:


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

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

Here is the link to the sbt documentation.



来源:https://stackoverflow.com/questions/13692369/play-framework-add-new-directories-to-classpath

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!