aboutsummaryrefslogtreecommitdiff
path: root/stage2
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-06-19 22:19:39 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2016-09-12 16:00:26 +0100
commitede10d4d0e139eb8f831b7241d29fb82d8996e73 (patch)
tree18e63106b4bd537c11f900f89d573cb9b73cb415 /stage2
parentd7e7265c5509a389f7fbdba77bdc668d6d602a7c (diff)
downloadcbt-ede10d4d0e139eb8f831b7241d29fb82d8996e73.tar.gz
cbt-ede10d4d0e139eb8f831b7241d29fb82d8996e73.tar.bz2
cbt-ede10d4d0e139eb8f831b7241d29fb82d8996e73.zip
better error message for missing build.scala and missing class Build
Diffstat (limited to 'stage2')
-rw-r--r--stage2/BuildBuild.scala14
1 files changed, 8 insertions, 6 deletions
diff --git a/stage2/BuildBuild.scala b/stage2/BuildBuild.scala
index b6d92c4..b230b01 100644
--- a/stage2/BuildBuild.scala
+++ b/stage2/BuildBuild.scala
@@ -54,15 +54,17 @@ trait BuildBuild extends BaseBuild{
.newInstance(managedContext)
} catch {
case e: ClassNotFoundException if e.getMessage == lib.buildClassName =>
- throw new Exception("You need to remove the directory or define a class Build in: "+context.projectDirectory)
+ throw new Exception("You need to define a class Build in build.scala in: "+context.projectDirectory)
}
}
+ } else if( projectDirectory.listFiles.exists( _.getName.endsWith(".scala") ) ){
+ throw new Exception(
+ "No file build.scala (lower case) found in " ++ projectDirectory.getPath
+ )
+ } else if( projectDirectory.getParentFile.getName == "build" ){
+ new BasicBuild( managedContext ) with BuildBuild
} else {
- if( projectDirectory.getParentFile.getName == "build" ){
- new BasicBuild( managedContext ) with BuildBuild
- } else {
- new BasicBuild( managedContext )
- }
+ new BasicBuild( managedContext )
}
)
try{