Is anybody building WARs with tools.deps? I found an older question about it here: https://ask.clojure.org/index.php/11341/possible-build-uberwar-using-deps-using-tools-build-other-tool • links https://clojure.atlassian.net/browse/TBUILD-21 which doesn't show much progress. I'm looking for something like this plugin for leiningen: https://github.com/luminus-framework/lein-uberwar
If all the required files have been created to deploy the web app on a specific application server, then they could be zipped up into a war file The only thing specific about a war file is its contents, which can often require web application server specific info (although most of the config will be quite similar) I assume war deployment is for a specific server (e.g. Tomcat, jboss, jetty, websphere, weblogic, glassfish, etc...) The web application server should have docs to show the expected directory structure of a war and specific config (for entry points, etc) Once the precise structure and config is known, then I assume tools.build (or java jar command, Ant, Maven, Eclipse, IntelliJ) could be used to generate the war file. Given that most Clojure projects embed the app server rather than package a war file for deployment, I'd suggest using one of the many existing tools from the Java world (maybe using tools build to still create the jars). Or consider the value/feasibility of moving the Clojure projects to an embedded web server approach (if not constrained by the business to only use war deployment approach)
> Or consider the value/feasibility of moving the Clojure projects to an embedded web server approach Especially with the sunng87 Ring adapter that now has support for Jetty 12 and virtual threads. Jetty 12 has a stripped down core that doesn't even include the Servlet API and some folks are saying it's 10% faster than Jetty 11 just because of being so stripped down.
I don't know of anyone that's made this, I am not actively working on it. war files are just jar files with special stuff in it. the hard parts of making a war are gathering the dep jars, and the jar packaging, which are both pretty solved problems in tools.build. the presumably not hard (but context I lack) is what other files people typically bundle into the war and where they would get them from
I was just looking at lein-uberwar inspired by the update to that Ask Q... it wouldn't be hard to turn it into a build.clj utility that could be used easily with the CLI... but I haven't needed to use WAR files for years so I don't have any motivation to tackle the conversion, I'm afraid.
well, me too :)