aboutsummaryrefslogtreecommitdiff
path: root/examples/resources-example/src/Main.scala
diff options
context:
space:
mode:
Diffstat (limited to 'examples/resources-example/src/Main.scala')
-rw-r--r--examples/resources-example/src/Main.scala27
1 files changed, 0 insertions, 27 deletions
diff --git a/examples/resources-example/src/Main.scala b/examples/resources-example/src/Main.scala
deleted file mode 100644
index 3bc0943..0000000
--- a/examples/resources-example/src/Main.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-import java.nio.file.{Files, Paths}
-object Main extends App {
- // Be aware that CBT currently isolates classloaders of dependencies
- // your dependencies will not see the resources of your project
- // This means that e.g. spray will not see a application.conf in your project's
- // resources/ directory. See https://github.com/cvogt/cbt/issues/176
- println(
- "foo.text in resources contains: " ++
- new String(
- Files.readAllBytes(
- Paths.get( getClass.getClassLoader.getResource("foo.text").getFile )
- )
- )
- )
- import scala.collection.JavaConverters._
- println(
- "foo.text in resources and my-resources:\n" ++
- getClass.getClassLoader.getResources("foo.text").asScala.map(
- resource =>
- new String(
- Files.readAllBytes(
- Paths.get( resource.getFile )
- )
- )
- ).mkString
- )
-}