You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@predictionio.apache.org by ch...@apache.org on 2017/09/27 22:11:10 UTC
[35/50] [abbrv] incubator-predictionio git commit: [PIO-99] Check for
engine compile error before proceeding to build
[PIO-99] Check for engine compile error before proceeding to build
Project: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/commit/8dcd9481
Tree: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/tree/8dcd9481
Diff: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/diff/8dcd9481
Branch: refs/heads/master
Commit: 8dcd9481501d6f793438f8e92cc5cdec9818616e
Parents: bf84ede
Author: Chan Lee <ch...@gmail.com>
Authored: Tue Sep 5 14:31:35 2017 -0700
Committer: Chan Lee <ch...@gmail.com>
Committed: Tue Sep 5 21:11:22 2017 -0700
----------------------------------------------------------------------
.../apache/predictionio/tools/commands/Engine.scala | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/8dcd9481/tools/src/main/scala/org/apache/predictionio/tools/commands/Engine.scala
----------------------------------------------------------------------
diff --git a/tools/src/main/scala/org/apache/predictionio/tools/commands/Engine.scala b/tools/src/main/scala/org/apache/predictionio/tools/commands/Engine.scala
index e3460a5..8380695 100644
--- a/tools/src/main/scala/org/apache/predictionio/tools/commands/Engine.scala
+++ b/tools/src/main/scala/org/apache/predictionio/tools/commands/Engine.scala
@@ -150,13 +150,16 @@ object Engine extends EitherLogging {
case Left(err) => return Left(err)
case Right(_) =>
- compile(buildArgs, pioHome, engineDirPath, verbose)
- info("Looking for an engine...")
- val jarFiles = jarFilesForScala(engineDirPath)
- if (jarFiles.isEmpty) {
- return logAndFail("No engine found. Your build might have failed. Aborting.")
+ compile(buildArgs, pioHome, engineDirPath, verbose) match {
+ case Left(err) => return Left(err)
+ case Right(_) =>
+ info("Looking for an engine...")
+ val jarFiles = jarFilesForScala(engineDirPath)
+ if (jarFiles.isEmpty) {
+ return logAndFail("No engine found. Your build might have failed. Aborting.")
+ }
+ jarFiles foreach { f => info(s"Found ${f.getName}") }
}
- jarFiles foreach { f => info(s"Found ${f.getName}")}
}
logAndSucceed("Build finished successfully.")
}