简体   繁体   中英

Play Framework — add new directories to classpath

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?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM