Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. fullClasspath in Runtime <<= (fullClasspath in Runtime, classDirectory in Compile) map { (cp, classes) => (cp.files map {
  2. f: File =>
  3. if (f.getName == classes.getName) {
  4. val result = new File(f.getParent + File.separator + "transformed-" + f.getName)
  5. if (result.exists) result else f
  6. } else f
  7. }).classpath }
  8.  
  9. fullClasspath in Runtime := ...
  10.  
  11. fullClasspath in Runtime := (fullClasspath in Runtime).value.files.map {
  12. f: File =>
  13. if (f.getName == (classDirectory in Compile).value.getName) {
  14. val result = new File(f.getParent + File.separator + "transformed-" + f.getName)
  15. if (result.exists) result else f
  16. } else f
  17. }.classpath
  18.  
  19. % sbt
  20. > show runtime:fullClasspath
  21. [info] List(Attributed(.../target/classes),
  22. Attributed(.../jars/scala-library-2.10.4.jar),
  23. Attributed(.../jars/asm-all-3.3.1.jar))
  24. > set fullClasspath in Runtime := (fullClasspath in Runtime).value.files.filterNot(_.getName.containsSlice("asm")).classpath
  25. > show runtime:fullClasspath
  26. [info] List(Attributed(.../target/classes),
  27. Attributed(.../jars/scala-library-2.10.4.jar))
  28.  
  29. set fullClasspath in Runtime <<= (fullClasspath in Runtime) map
  30. {_.files.filterNot(_.getName.containsSlice("asm")).classpath}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement