Don't do anything if there aren't any java sources.

This commit is contained in:
Anthony Grimes 2012-02-08 01:19:26 -06:00
parent 2b735769f3
commit 6c6cca2d3c

View file

@ -25,11 +25,12 @@
[project args] [project args]
(let [files (mapcat extract-java-source (:java-source-path project)) (let [files (mapcat extract-java-source (:java-source-path project))
compile-path (:compile-path project)] compile-path (:compile-path project)]
(when (pos? (count files))
(println "Compiling" (count files) "source files to" compile-path) (println "Compiling" (count files) "source files to" compile-path)
(.mkdirs (file compile-path)) (.mkdirs (file compile-path))
(.run (ToolProvider/getSystemJavaCompiler) (.run (ToolProvider/getSystemJavaCompiler)
nil nil nil nil nil nil
(javac-options project files args)))) (javac-options project files args)))))
(defn javac (defn javac
"Compile Java source files. "Compile Java source files.