Using Deps/CLI for building mixed Clojure & Java projects

61 views
Skip to first unread message

Alan Thompson

unread,
Apr 2, 2020, 5:18:07 PM4/2/20
to clojure

which seems to say there is no existing way to combine Java & Clojure source code when building with deps/CLI.  Is this correct?

If so, what would be entailed in enhancing Deps/CLI to handle Java source files?

Thanks,
Alan

Sean Corfield

unread,
Apr 2, 2020, 5:31:09 PM4/2/20
to Clojure Mailing List
You would need to write a Clojure script with a -main function that would (somehow) compile Java source code according to whatever rules you wanted and then invoke it from the CLI (as an initial step to get the compiled class files onto the classpath that a subsequent CLI invocation could use).

It would be just another tool like any of the others listed here: https://github.com/clojure/tools.deps.alpha/wiki/Tools

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/CAN67zA3%3DxtbsaC3iGgBSjPgUjw0LwZp%2Bu6bM54ktr1svgxeESQ%40mail.gmail.com.


--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles Networks, LLC. -- https://worldsinglesnetworks.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

Sean Corfield

unread,
Apr 2, 2020, 5:32:23 PM4/2/20
to Clojure Mailing List
And you might look at https://github.com/EwenG/badigeon (which is listed on that tools page) since it says it will "Compile java sources" according to the readme

Alan Thompson

unread,
Apr 3, 2020, 12:40:06 AM4/3/20
to clojure
Since Kaocha already uses a short shell script to kick things off, I just added a manual Java compile step there.  I saved the results in my Clojure template project:


I'll still take a closer look at badigeon in the future.  It seems to have many useful features.

Alan
 

Reply all
Reply to author
Forward
0 new messages