From 5367c5478b287aabc0b65f858e247a555f3ce971 Mon Sep 17 00:00:00 2001 From: ngocdaothanh Date: Sat, 18 Jun 2011 08:08:23 -0700 Subject: [PATCH] Updated Classpaths, sources, and resources (Draft) (markdown) --- Classpaths.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Classpaths.md b/Classpaths.md index 092d764..67dc175 100644 --- a/Classpaths.md +++ b/Classpaths.md @@ -80,3 +80,13 @@ For resources * `resource-generators` These are tasks that generate resource files. Typically, these tasks will put resources in the directory provided by `resource-managed`. Use the [[inspect command|Inspecting Settings]] for more details. + +## Example + +You have a standalone project which uses a library that loads xxx.properties from classpath at run time. You put xxx.properties inside directory "config". When you run "sbt run", you want the directory to be in classpath. + +```scala + +unmanagedClasspath in Runtime <<= (unmanagedClasspath in Runtime, baseDirectory) map { (cp, bd) => cp.:+(new Attributed(bd / "config")(AttributeMap.empty)) } + +``` \ No newline at end of file