Permalink
Browse files

Have scrunch.py tell you when you need to run assembly:assembly

  • Loading branch information...
jwills committed Mar 15, 2012
1 parent 7d3bfda commit 32d86be385db69f6debcb1483589080856d06314
Showing with 4 additions and 1 deletion.
  1. +4 −1 scrunch/scripts/scrunch.py
@@ -28,7 +28,6 @@
SCIENCE_ROOT = os.path.abspath(os.path.dirname(ORIGINAL_FILE)+"/../")
JARFILE = SCIENCE_ROOT + "/target/scrunch-0.1.0-jar-with-dependencies.jar" #what jar has all the depencies for this job
-print JARFILE
TMPDIR = "/tmp"
BUILDDIR = TMPDIR + "/script-build"
COMPILE_CMD = "java -cp %s/scala-library.jar:%s/scala-compiler.jar -Dscala.home=%s scala.tools.nsc.Main" % (SCALA_LIB, SCALA_LIB, SCALA_LIB)
@@ -79,6 +78,10 @@ def get_job_name(file):
return file
JARPATH = os.path.abspath(JARFILE)
+if not os.path.exists(JARPATH):
+ sys.stderr.write("Scrunch assembly jar not found; run mvn assembly:assembly to construct it.\n")
+ sys.exit(1)
+
JARBASE = os.path.basename(JARFILE)
JOBPATH = os.path.abspath(JOBFILE)
JOB = get_job_name(JOBFILE)

0 comments on commit 32d86be

Please sign in to comment.