diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-04-03 00:09:19 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-04-03 00:09:26 -0400 |
commit | 83d6e39764103bde44d5812aa873ed7537cc8c97 (patch) | |
tree | 60a070ef1511aa525cec9bf4c19034804b829679 /stage2/BuildBuild.scala | |
parent | 8eae49b7b0a39f23518680b56429314db3d977e1 (diff) | |
download | cbt-83d6e39764103bde44d5812aa873ed7537cc8c97.tar.gz cbt-83d6e39764103bde44d5812aa873ed7537cc8c97.tar.bz2 cbt-83d6e39764103bde44d5812aa873ed7537cc8c97.zip |
Implement alternative resolvers
This commit also
- requires Dependencies to explicitly implement canBeCached
- unifies some logic for dependency downloading
- moves SBT-like dependency DSL into its own trait
- error message showing build directory for exceptions in builds
Not splitting this up in favor of faster progress to 1.0.
The user facing API can probably be slightly improved using implicits
inside of BasicBuild, but we can do that later.
Diffstat (limited to 'stage2/BuildBuild.scala')
-rw-r--r-- | stage2/BuildBuild.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/stage2/BuildBuild.scala b/stage2/BuildBuild.scala index 9746d8c..45d86f8 100644 --- a/stage2/BuildBuild.scala +++ b/stage2/BuildBuild.scala @@ -5,7 +5,7 @@ import scala.collection.immutable.Seq class BuildBuild(context: Context) extends Build(context){ override def dependencies = Seq( CbtDependency()(context.logger) ) ++ super.dependencies def managedBuildDirectory: File = lib.realpath( projectDirectory.parent ) - val managedBuild = { + val managedBuild = try{ val managedContext = context.copy( cwd = managedBuildDirectory ) val cl = new cbt.URLClassLoader( exportedClasspath, @@ -16,6 +16,9 @@ class BuildBuild(context: Context) extends Build(context){ .getConstructor(classOf[Context]) .newInstance(managedContext) .asInstanceOf[Build] + } catch { + case e: Exception => + throw new Exception("during build: "+context.cwd, e) } override def triggerLoopFiles = super.triggerLoopFiles ++ managedBuild.triggerLoopFiles override def finalBuild = managedBuild.finalBuild |