sparkofreason / boot-java-task-example

Example of a task that depends on Java compilation with boot-clj

Home Page:http://hoplon.discoursehosting.net/t/auto-compile-javac-sources-in-boot/512/5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

boot java-dependent task example

This is an example of calling compiled Java code from a task in build.boot.

This doesn't work because add depends on Java code having been compiled:

$ boot add -n 1 -n 2
    clojure.lang.ExceptionInfo: java.lang.ClassNotFoundException: acme.Add, compiling:(uses_add.clj:1:1)
    data: {:file "/tmp/boot.user9093020125226622231.clj", :line 21}

This works because we compiled the java first:

alan@alanputer:/tmp/boot-javac$ boot javac add -n 1 -n 2
Compiling 1 Java source files...
Sum: 3

About

Example of a task that depends on Java compilation with boot-clj

http://hoplon.discoursehosting.net/t/auto-compile-javac-sources-in-boot/512/5


Languages

Language:Clojure 88.4%Language:Java 11.6%