diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-03-12 23:27:22 -0500 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-03-19 21:04:52 -0400 |
commit | ca7e166e09776410ef39e2808aab6a3fdd1e7911 (patch) | |
tree | 029f621a86b1158b6f50979d00c5cae0650afc35 /stage1 | |
parent | 83f8bc492d9d714c0dea03f65fa693d77e236cb0 (diff) | |
download | cbt-ca7e166e09776410ef39e2808aab6a3fdd1e7911.tar.gz cbt-ca7e166e09776410ef39e2808aab6a3fdd1e7911.tar.bz2 cbt-ca7e166e09776410ef39e2808aab6a3fdd1e7911.zip |
classloader for maven dependency can now cache it's own jar as well
Diffstat (limited to 'stage1')
-rw-r--r-- | stage1/resolver.scala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/stage1/resolver.scala b/stage1/resolver.scala index 1dbadcc..98955cb 100644 --- a/stage1/resolver.scala +++ b/stage1/resolver.scala @@ -92,10 +92,12 @@ abstract class Dependency{ // trigger concurrent building / downloading dependencies exportClasspathConcurrently } - val transitiveClassPath = transitiveDependencies.map{ + val transitiveClassPath = { + (this +: transitiveDependencies).map{ case d if d.canBeCached => Left(d) case d => Right(d) } + } val buildClassPath = ClassPath.flatten( transitiveClassPath.flatMap( _.right.toOption.map(_.exportedClasspath) @@ -109,12 +111,12 @@ abstract class Dependency{ if(cacheDependencyClassLoader){ new URLClassLoader( - exportedClasspath ++ buildClassPath, + buildClassPath, ClassLoaderCache.get( cachedClassPath ) ) } else { new URLClassLoader( - exportedClasspath ++ buildClassPath ++ cachedClassPath, ClassLoader.getSystemClassLoader + buildClassPath ++ cachedClassPath, ClassLoader.getSystemClassLoader ) } } |