<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent activity in tools.build</title>
<link>https://ask.clojure.org/index.php/activity/contrib-libs/tools-build</link>
<description></description>
<item>
<title>Commented: Can 'write-pom' in tools.build support providing additional dependencies in the pom.xml with scope 'provided'?</title>
<link>https://ask.clojure.org/index.php/12817/tools-support-providing-additional-dependencies-provided?show=14827#c14827</link>
<description>maybe the scope option can be taken from the deps.edn file itself? it's just additional metadata used for uberjars, and deps.edn doesn't seem to complain when I add `:scope :provided` in a dependency's data map, so it doesn't seem to affect other cli functionality</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12817/tools-support-providing-additional-dependencies-provided?show=14827#c14827</guid>
<pubDate>Thu, 11 Dec 2025 11:33:40 +0000</pubDate>
</item>
<item>
<title>Closed: How to ignore :src-pom default for clojure.tools.build.api/write-pom if ./pom.xml exists?</title>
<link>https://ask.clojure.org/index.php/13802/ignore-pom-default-for-clojure-tools-build-api-write-exists?show=13802#q13802</link>
<description>&lt;p&gt;I have a project that generates more than one jar artifact. For project A, I have &lt;code&gt;./pom.xml&lt;/code&gt; that is used as a template and everything works fine.&lt;/p&gt;
&lt;p&gt;For project B, I want to generate a pom.xml that's completely separate from project A which does not use ./pom.xml as a template. I generate the pom as follows:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(require '[clojure.tools.build.api :as b])
(b/write-pom {:class-dir class-dir
                  :pom-data pom-data
                  :lib coord
                  :version version
                  :basis basis})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, since &lt;code&gt;./pom.xml&lt;/code&gt; exists, it is used as a template. Explicitly passing &lt;code&gt;nil&lt;/code&gt; for &lt;code&gt;:src-pom&lt;/code&gt; doesn't help. The only workaround I could find was to pass in a bogus path for &lt;code&gt;:src-pom&lt;/code&gt;.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13802/ignore-pom-default-for-clojure-tools-build-api-write-exists?show=13802#q13802</guid>
<pubDate>Tue, 28 Oct 2025 13:43:16 +0000</pubDate>
</item>
<item>
<title>Answer selected: tools.build compile-clj capture out/err</title>
<link>https://ask.clojure.org/index.php/14648/tools-build-compile-clj-capture-out-err?show=14649#a14649</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TBUILD-46&quot;&gt;https://clojure.atlassian.net/browse/TBUILD-46&lt;/a&gt;&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14648/tools-build-compile-clj-capture-out-err?show=14649#a14649</guid>
<pubDate>Tue, 29 Jul 2025 17:34:13 +0000</pubDate>
</item>
<item>
<title>Commented: tools.build fails with http_proxy/https_proxy set</title>
<link>https://ask.clojure.org/index.php/14602/tools-build-fails-with-httpproxy-httpsproxy-set?show=14607#c14607</link>
<description>Putting the proxy information into `settings.xml` worked. I tried different approaches by setting the proxy information in environment variables for Maven, but all those failed.</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14602/tools-build-fails-with-httpproxy-httpsproxy-set?show=14607#c14607</guid>
<pubDate>Thu, 03 Jul 2025 13:41:28 +0000</pubDate>
</item>
<item>
<title>Commented: switch tools.build to pull from jars rather than exploding onto disk</title>
<link>https://ask.clojure.org/index.php/13231/switch-tools-build-pull-from-jars-rather-than-exploding-onto?show=14543#c14543</link>
<description>I tried deleting the answer, but there doesn't seem to be a way to do that — but it is possible to convert it into a comment, which I did. Now I'm trying to delete the duplicate comment I created in the meantime… sorry about the mess.</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13231/switch-tools-build-pull-from-jars-rather-than-exploding-onto?show=14543#c14543</guid>
<pubDate>Sat, 10 May 2025 03:52:14 +0000</pubDate>
</item>
<item>
<title>Commented: Please consider making tools.build pom.properties reproducible (e.g. the &quot;Generated by&quot; date)</title>
<link>https://ask.clojure.org/index.php/14389/please-consider-making-properties-reproducible-generated?show=14468#c14468</link>
<description>OK, I think the patch above will probably apply directly, but I'll double-check.</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14389/please-consider-making-properties-reproducible-generated?show=14468#c14468</guid>
<pubDate>Sun, 16 Mar 2025 19:01:14 +0000</pubDate>
</item>
<item>
<title>Commented: clojure.tools.build.api/process + ignore hangs when process has large output</title>
<link>https://ask.clojure.org/index.php/11510/clojure-tools-build-process-ignore-hangs-process-large-output?show=14464#c14464</link>
<description>In addition, if the output is very large, the following will hang:&lt;br /&gt;
&lt;br /&gt;
(defn get-history [_]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;(b/git-process {:git-args [&amp;quot;log&amp;quot; &amp;quot;--after=2025-01-01&amp;quot; &amp;quot;--pretty=format:%D%n%B&amp;quot;]}))&lt;br /&gt;
&lt;br /&gt;
roklenarcic on Slack says:&lt;br /&gt;
&lt;br /&gt;
this code is wrong:&lt;br /&gt;
(let [proc (.start pb)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exit (.waitFor proc)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out-str (when (= out :capture) (copy-stream (.getInputStream proc)))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;err-str (when (= err :capture) (copy-stream (.getErrorStream proc)))]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(cond-&amp;gt; {:exit exit}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out-str (assoc :out out-str)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;err-str (assoc :err err-str)))&lt;br /&gt;
&lt;br /&gt;
you cannot await for process exit before setting up something that will drain the streams&lt;br /&gt;
that will cause process to block if the output is big enough&lt;br /&gt;
&lt;br /&gt;
Alex says:&lt;br /&gt;
&lt;br /&gt;
this process stuff (which was the precursor of the new 1.12 clojure.java.process api) definitely needs some clean up in this area. I actually thought I had done that but must have confused it with the work there</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11510/clojure-tools-build-process-ignore-hangs-process-large-output?show=14464#c14464</guid>
<pubDate>Mon, 10 Mar 2025 19:22:39 +0000</pubDate>
</item>
<item>
<title>Commented: Is it possible to build an uberwar using deps.edn using tools.build or other tool?</title>
<link>https://ask.clojure.org/index.php/11341/possible-build-uberwar-using-deps-using-tools-build-other-tool?show=13959#c13959</link>
<description>Did you get resolution on this? &amp;nbsp;I'm working on migrating a java app using a spring framework that runs on tomcat over to clojure driven. &amp;nbsp;Are you available for a call?</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11341/possible-build-uberwar-using-deps-using-tools-build-other-tool?show=13959#c13959</guid>
<pubDate>Sat, 08 Jun 2024 14:48:08 +0000</pubDate>
</item>
<item>
<title>Commented: Warn about user.clj during build compilation</title>
<link>https://ask.clojure.org/index.php/13770/warn-about-user-clj-during-build-compilation?show=13773#c13773</link>
<description>Yes, that was logged at &lt;a href=&quot;https://ask.clojure.org/index.php/12854/jvm-property-to-turn-user-clj-loading-off&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://ask.clojure.org/index.php/12854/jvm-property-to-turn-user-clj-loading-off&lt;/a&gt;</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13770/warn-about-user-clj-during-build-compilation?show=13773#c13773</guid>
<pubDate>Wed, 28 Feb 2024 19:10:51 +0000</pubDate>
</item>
<item>
<title>Answer selected: tools.build.api/uber uses EDN for data_readers.cljc -- it should support reader conditionals</title>
<link>https://ask.clojure.org/index.php/12733/tools-build-datareaders-should-support-reader-conditionals?show=12735#a12735</link>
<description>&lt;p&gt;Thought this had been fixed &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/plugins/servlet/mobile?originPath=%2Fbrowse%2FTBUILD-32#issue/TBUILD-32&quot;&gt;https://clojure.atlassian.net/plugins/servlet/mobile?originPath=/browse/TBUILD-32#issue/TBUILD-32&lt;/a&gt;&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12733/tools-build-datareaders-should-support-reader-conditionals?show=12735#a12735</guid>
<pubDate>Fri, 10 Mar 2023 04:08:44 +0000</pubDate>
</item>
<item>
<title>Closed: Files in deps :local/root :git/url will directly copy into uberjar without go through conflict-handlers</title>
<link>https://ask.clojure.org/index.php/11788/local-directly-uberjar-without-through-conflict-handlers?show=11788#q11788</link>
<description>&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.build/blob/1309f935b098123eb807c972a053eeab77f6f4cd/src/main/clojure/clojure/tools/build/tasks/uber.clj#L172&quot;&gt;https://github.com/clojure/tools.build/blob/1309f935b098123eb807c972a053eeab77f6f4cd/src/main/clojure/clojure/tools/build/tasks/uber.clj#L172&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The handling between jar and lib folders like git deps or local root are completely different. In my case, I have some config files in edn format (duct's duct_hierarchy.edn) exists in both jar deps and git deps. My additional conflict handler is never receiving the edn file that exists in git deps.&lt;/p&gt;
&lt;p&gt;Is it the expected behaviour? I can imagine that even &lt;strong&gt;LICENSE&lt;/strong&gt; or &lt;strong&gt;data_readers.clj&lt;/strong&gt; would suffer the same issue. e.g. being overrided by files in git deps.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11788/local-directly-uberjar-without-through-conflict-handlers?show=11788#q11788</guid>
<pubDate>Fri, 13 Jan 2023 23:32:22 +0000</pubDate>
</item>
<item>
<title>Commented: Will tools.build be released as a jar?</title>
<link>https://ask.clojure.org/index.php/11433/will-tools-build-be-released-as-a-jar?show=12478#c12478</link>
<description>Looks like it has been done! Thanks all! &lt;a href=&quot;https://search.maven.org/artifact/org.clojure/tools.build/0.8.4/jar&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://search.maven.org/artifact/org.clojure/tools.build/0.8.4/jar&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Clojure already does not have reproducible builds in terms of compiled code&lt;br /&gt;
&lt;br /&gt;
I think a specific version of Clojure applied to the same source code will always generate the same output. (Unless someone is introducing time/random seed in the compilation tasks?)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; I'm curious, what about Clojure builds is not reproducible from source?&lt;br /&gt;
&lt;br /&gt;
Well, me too, honestly. But all said, if we have an immutable asset we can point to, we have reduced the set of things that can introduce nondeterminism.</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11433/will-tools-build-be-released-as-a-jar?show=12478#c12478</guid>
<pubDate>Wed, 14 Dec 2022 20:32:30 +0000</pubDate>
</item>
<item>
<title>Retagged: Ability to customise java-cmd in tools.build</title>
<link>https://ask.clojure.org/index.php/12134/ability-to-customise-java-cmd-in-tools-build?show=12134#q12134</link>
<description>&lt;p&gt;Moving the original &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C02B5GHQWP4/p1661625386101119&quot;&gt;question&lt;/a&gt; from Clojurians Slack:&lt;/p&gt;
&lt;p&gt;When moving one of my projects to JDK 19 I was pointing clojure to the jdk using the &lt;strong&gt;JAVA_CMD&lt;/strong&gt; env var. Everything was fine til I hit the uber jar step in the CI, where it simply refused to recognise the jdk 19 functions.&lt;/p&gt;
&lt;p&gt;Took me a while and including reading the tools.build source to realise why it wasn't propagating the &lt;strong&gt;JAVA_CMD&lt;/strong&gt; var and turns out I had to read env and send the &lt;strong&gt;:java_cmd&lt;/strong&gt; in the &lt;strong&gt;b/compile-clj&lt;/strong&gt; call.&lt;/p&gt;
&lt;p&gt;I can see why the behaviour is like this, but would &lt;strong&gt;:java_cmd&lt;/strong&gt; defaulting to the value of &lt;strong&gt;JAVA_CMD&lt;/strong&gt; something that could be considered? Feels a bit more intuitive for me, as mostly the invocations of tools.build fns would be from the shell.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12134/ability-to-customise-java-cmd-in-tools-build?show=12134#q12134</guid>
<pubDate>Tue, 06 Sep 2022 14:47:45 +0000</pubDate>
</item>
<item>
<title>Closed: Exception in EdnReader$DispatchReader</title>
<link>https://ask.clojure.org/index.php/12017/exception-in-ednreaderdispatchreader?show=12017#q12017</link>
<description>&lt;p&gt;(from &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C02B5GHQWP4/p1656165951371179&quot;&gt;https://clojurians.slack.com/archives/C02B5GHQWP4/p1656165951371179&lt;/a&gt;)&lt;br&gt;
When I include tick/tick {:mvn/version &quot;0.5.0-RC6&quot;} as a dep, I get the exception below.  I cannot reproduce in an deps.edn that only contains this library so I believe there is some kind of conflict with another library.  &lt;/p&gt;
&lt;p&gt;{:clojure.main/message&lt;br&gt;
 &quot;Execution error at clojure.tools.build.tasks.uber/conflict-data-readers (uber.clj:90).\nNo dispatch macro for: ?\n&quot;,&lt;br&gt;
 :clojure.main/triage&lt;br&gt;
 {:clojure.error/class java.lang.RuntimeException,&lt;br&gt;
  :clojure.error/line 90,&lt;br&gt;
  :clojure.error/cause &quot;No dispatch macro for: ?&quot;,&lt;br&gt;
  :clojure.error/symbol&lt;br&gt;
  clojure.tools.build.tasks.uber/conflict-data-readers,&lt;br&gt;
  :clojure.error/source &quot;uber.clj&quot;,&lt;br&gt;
  :clojure.error/phase :execution},&lt;br&gt;
 :clojure.main/trace&lt;br&gt;
 {:via&lt;br&gt;
  [{:type java.lang.RuntimeException,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:message &quot;No dispatch macro for: ?&quot;,
:at [clojure.lang.Util runtimeException &quot;Util.java&quot; 221]}],
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;  :trace&lt;br&gt;
  [[clojure.lang.Util runtimeException &quot;Util.java&quot; 221]&lt;br&gt;
   [clojure.lang.EdnReader$DispatchReader invoke &quot;EdnReader.java&quot; 552]&lt;br&gt;
   [clojure.lang.EdnReader readDelimitedList &quot;EdnReader.java&quot; 757]&lt;br&gt;
   [clojure.lang.EdnReader$MapReader invoke &quot;EdnReader.java&quot; 680]&lt;br&gt;
   [clojure.lang.EdnReader read &quot;EdnReader.java&quot; 145]&lt;br&gt;
   [clojure.lang.EdnReader read &quot;EdnReader.java&quot; 111]&lt;br&gt;
   [clojure.lang.EdnReader readString &quot;EdnReader.java&quot; 67]&lt;br&gt;
   [clojure.edn$read_string invokeStatic &quot;edn.clj&quot; 46]&lt;br&gt;
   [clojure.edn$read_string invokeStatic &quot;edn.clj&quot; 37]&lt;br&gt;
   [clojure.edn$read_string invoke &quot;edn.clj&quot; 37]&lt;br&gt;
   [clojure.tools.build.tasks.uber$conflict_data_readers&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;invokeStatic
&quot;uber.clj&quot;
90]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;   [clojure.tools.build.tasks.uber$conflict_data_readers&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;invoke
&quot;uber.clj&quot;
86]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;   [clojure.tools.build.tasks.uber$handle_conflict&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;invokeStatic
&quot;uber.clj&quot;
120]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;   [clojure.tools.build.tasks.uber$handle_conflict&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;invoke
&quot;uber.clj&quot;
111]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;   [clojure.tools.build.tasks.uber$explode invokeStatic &quot;uber.clj&quot; 157]&lt;br&gt;
   [clojure.tools.build.tasks.uber$explode invoke &quot;uber.clj&quot; 137]&lt;br&gt;
   [clojure.tools.build.tasks.uber$uber$fn&lt;strong&gt;3537$fn&lt;/strong&gt;3541&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;invoke
&quot;uber.clj&quot;
253]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;   [clojure.lang.PersistentVector reduce &quot;PersistentVector.java&quot; 343]&lt;br&gt;
   [clojure.core$reduce invokeStatic &quot;core.clj&quot; 6885]&lt;br&gt;
   [clojure.core$reduce invoke &quot;core.clj&quot; 6868]&lt;br&gt;
   [clojure.tools.build.tasks.uber$uber$fn__3537 invoke &quot;uber.clj&quot; 252]&lt;br&gt;
   [clojure.core.protocols$iter_reduce invokeStatic &quot;protocols.clj&quot; 49]&lt;br&gt;
   [clojure.core.protocols$fn__8230 invokeStatic &quot;protocols.clj&quot; 75]&lt;br&gt;
   [clojure.core.protocols$fn__8230 invoke &quot;protocols.clj&quot; 75]&lt;br&gt;
   [clojure.core.protocols$fn&lt;strong&gt;8178$G&lt;/strong&gt;8173__8191&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;invoke
&quot;protocols.clj&quot;
13]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;   [clojure.core$reduce invokeStatic &quot;core.clj&quot; 6886]&lt;br&gt;
   [clojure.core$reduce invoke &quot;core.clj&quot; 6868]&lt;br&gt;
   [clojure.tools.build.tasks.uber$uber invokeStatic &quot;uber.clj&quot; 250]&lt;br&gt;
   [clojure.tools.build.tasks.uber$uber invoke &quot;uber.clj&quot; 237]&lt;br&gt;
   [clojure.lang.Var invoke &quot;Var.java&quot; 384]&lt;br&gt;
   [clojure.tools.build.api$uber invokeStatic &quot;api.clj&quot; 480]&lt;br&gt;
   [clojure.tools.build.api$uber invoke &quot;api.clj&quot; 408]&lt;br&gt;
   [org.corfield.build$uber invokeStatic &quot;build.clj&quot; 250]&lt;br&gt;
   [org.corfield.build$uber invoke &quot;build.clj&quot; 208]&lt;br&gt;
   [build$uber invokeStatic &quot;build.clj&quot; 14]&lt;br&gt;
   [build$uber invoke &quot;build.clj&quot; 12]&lt;br&gt;
   [clojure.lang.AFn applyToHelper &quot;AFn.java&quot; 154]&lt;br&gt;
   [clojure.lang.AFn applyTo &quot;AFn.java&quot; 144]&lt;br&gt;
   [clojure.lang.Var applyTo &quot;Var.java&quot; 705]&lt;br&gt;
   [clojure.core$apply invokeStatic &quot;core.clj&quot; 667]&lt;br&gt;
   [clojure.core$apply invoke &quot;core.clj&quot; 662]&lt;br&gt;
   [clojure.run.exec$exec invokeStatic &quot;exec.clj&quot; 48]&lt;br&gt;
   [clojure.run.exec$exec doInvoke &quot;exec.clj&quot; 39]&lt;br&gt;
   [clojure.lang.RestFn invoke &quot;RestFn.java&quot; 423]&lt;br&gt;
   [clojure.run.exec$_main$fn__205 invoke &quot;exec.clj&quot; 180]&lt;br&gt;
   [clojure.run.exec$_main invokeStatic &quot;exec.clj&quot; 176]&lt;br&gt;
   [clojure.run.exec$_main doInvoke &quot;exec.clj&quot; 139]&lt;br&gt;
   [clojure.lang.RestFn applyTo &quot;RestFn.java&quot; 137]&lt;br&gt;
   [clojure.lang.Var applyTo &quot;Var.java&quot; 705]&lt;br&gt;
   [clojure.core$apply invokeStatic &quot;core.clj&quot; 667]&lt;br&gt;
   [clojure.main$main_opt invokeStatic &quot;main.clj&quot; 514]&lt;br&gt;
   [clojure.main$main_opt invoke &quot;main.clj&quot; 510]&lt;br&gt;
   [clojure.main$main invokeStatic &quot;main.clj&quot; 664]&lt;br&gt;
   [clojure.main$main doInvoke &quot;main.clj&quot; 616]&lt;br&gt;
   [clojure.lang.RestFn applyTo &quot;RestFn.java&quot; 137]&lt;br&gt;
   [clojure.lang.Var applyTo &quot;Var.java&quot; 705]&lt;br&gt;
   [clojure.main main &quot;main.java&quot; 40]],&lt;br&gt;
  :cause &quot;No dispatch macro for: ?&quot;}}&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12017/exception-in-ednreaderdispatchreader?show=12017#q12017</guid>
<pubDate>Tue, 28 Jun 2022 19:25:41 +0000</pubDate>
</item>
<item>
<title>Commented: relative directories in classpath-roots</title>
<link>https://ask.clojure.org/index.php/11982/relative-directories-in-classpath-roots?show=12011#c12011</link>
<description>It does. I'll think about it.</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11982/relative-directories-in-classpath-roots?show=12011#c12011</guid>
<pubDate>Wed, 22 Jun 2022 20:18:00 +0000</pubDate>
</item>
<item>
<title>Answer selected: Is it possible to set a var during compilation in tools.build?</title>
<link>https://ask.clojure.org/index.php/11610/is-it-possible-to-set-a-var-during-compilation-in-tools-build?show=11611#a11611</link>
<description>&lt;p&gt;Right, tools.build forks a new process to do the compilation and creates the compilation code, so there currently is no way to do this. But, might be something worth exploring  and I made a ticket at &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TBUILD-28&quot;&gt;https://clojure.atlassian.net/browse/TBUILD-28&lt;/a&gt; (I would particularly interesting in finding a broader set of use cases before working on it though).&lt;/p&gt;
&lt;p&gt;I think my best suggestion for a workaround is to not intertwine your tests with your code so you don't need to do this.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11610/is-it-possible-to-set-a-var-during-compilation-in-tools-build?show=11611#a11611</guid>
<pubDate>Thu, 03 Mar 2022 10:26:10 +0000</pubDate>
</item>
<item>
<title>Commented: How to control the transient deps that get compiled/assembled into an uberjar?</title>
<link>https://ask.clojure.org/index.php/10905/control-transient-deps-that-compiled-assembled-into-uberjar?show=11481#c11481</link>
<description>The race condition on load here should be fixed in latest release of tools.build btw.</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10905/control-transient-deps-that-compiled-assembled-into-uberjar?show=11481#c11481</guid>
<pubDate>Fri, 14 Jan 2022 00:28:09 +0000</pubDate>
</item>
<item>
<title>Closed: tools.build copy-dir with replace loses file permissions</title>
<link>https://ask.clojure.org/index.php/11349/tools-build-copy-dir-with-replace-loses-file-permissions?show=11349#q11349</link>
<description>&lt;p&gt;When you use &lt;code&gt;clojure.tools.build.api/copy-dir&lt;/code&gt; with &lt;code&gt;:replace&lt;/code&gt; it reads the source file and then writes a new target file -- it doesn't &quot;copy&quot; the file so the target file is created with default permissions.&lt;/p&gt;
&lt;p&gt;This is a problem if you are copying executable shell scripts and trying to replace text in them because the target file created &lt;em&gt;won't&lt;/em&gt; have executable permissions.&lt;/p&gt;
&lt;p&gt;This cropped up with &lt;code&gt;deps-new&lt;/code&gt; in this issue: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/seancorfield/deps-new/issues/22&quot;&gt;https://github.com/seancorfield/deps-new/issues/22&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think that if you source file is executable, the target file should also be executable -- and that works fine without &lt;code&gt;:replace&lt;/code&gt;.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11349/tools-build-copy-dir-with-replace-loses-file-permissions?show=11349#q11349</guid>
<pubDate>Mon, 13 Dec 2021 04:12:41 +0000</pubDate>
</item>
<item>
<title>Closed: Allow specifying the output pom path</title>
<link>https://ask.clojure.org/index.php/11370/allow-specifying-the-output-pom-path?show=11370#q11370</link>
<description>&lt;p&gt;My initial use for tools.build is to update the pom.xml in the project with the appropriate version.  It would be great if I could specify that write-pom should be output  to pom.xml, rather than the folder layout that is imposed on me by the current function.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11370/allow-specifying-the-output-pom-path?show=11370#q11370</guid>
<pubDate>Sun, 12 Dec 2021 15:25:09 +0000</pubDate>
</item>
<item>
<title>Retagged: tools.build/jar doesn't support &quot;sections&quot; in manifest</title>
<link>https://ask.clojure.org/index.php/11358/tools-build-jar-doesnt-support-sections-in-manifest?show=11358#q11358</link>
<description>&lt;p&gt;Sections are groups which start with &lt;code&gt;Name: &lt;/code&gt; and have section-specific entries in them.&lt;/p&gt;
&lt;p&gt;Capsule uses this for having platform-specific information about how to start.&lt;/p&gt;
&lt;p&gt;Here's an example of using the API to get section information:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Main-Class: clojure.main

Name: Frank
Main-Class: frank.clojure.main
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;❯ clj       
Clojure 1.10.3
user=&amp;gt; (require '[clojure.java.io :as io])
nil
user=&amp;gt; (io/input-stream &quot;/tmp/MANIFEST.MF&quot;)
#object[java.io.BufferedInputStream 0x69ce2f62 &quot;java.io.BufferedInputStream@69ce2f62&quot;]
user=&amp;gt; (def mf (java.util.jar.Manifest. (io/input-stream &quot;/tmp/MANIFEST.MF&quot;)))
#'user/mf
user=&amp;gt; (.getAttributes mf &quot;Frank&quot;)
{#object[java.util.jar.Attributes$Name 0x2e3a5237 &quot;Main-Class&quot;] &quot;frank.clojure.main&quot;}
user=&amp;gt; (.getMainAttributes mf)
{#object[java.util.jar.Attributes$Name 0x2e3a5237 &quot;Main-Class&quot;] &quot;clojure.main&quot;}
user=&amp;gt; (.getEntries mf)
{&quot;Frank&quot; {#object[java.util.jar.Attributes$Name 0x2e3a5237 &quot;Main-Class&quot;] &quot;frank.clojure.main&quot;}}
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11358/tools-build-jar-doesnt-support-sections-in-manifest?show=11358#q11358</guid>
<pubDate>Mon, 06 Dec 2021 02:29:18 +0000</pubDate>
</item>
<item>
<title>Answered: tools.build uber's default conflict handlers don't append to META-INF/services properly</title>
<link>https://ask.clojure.org/index.php/11316/tools-default-conflict-handlers-append-services-properly?show=11317#a11317</link>
<description>&lt;p&gt;Thanks, fixed in v0.6.8 d79ae84&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11316/tools-default-conflict-handlers-append-services-properly?show=11317#a11317</guid>
<pubDate>Fri, 26 Nov 2021 18:04:13 +0000</pubDate>
</item>
<item>
<title>Closed: Add git-branch function</title>
<link>https://ask.clojure.org/index.php/11072/add-git-branch-function?show=11072#q11072</link>
<description>&lt;p&gt;This is useful for deciding whether to issue a SNAPSHOT release or not.&lt;/p&gt;
&lt;p&gt;Here's a working implementation if anyone wants it for their project now:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns build
  (:require [clojure.string :as str]
            [clojure.tools.build.api :as b]
            [clojure.tools.build.api.specs :as specs]))

(defn git-branch
  &quot;Shells out to git and returns the current branch
    git branch --show-current
  Options:
    :dir - dir to invoke this command from, by default current directory&quot;
  [{:keys [dir] :or {dir &quot;.&quot;} :as params}]
  (@#'b/assert-specs &quot;git-branch&quot; params :dir ::specs/path)
  (-&amp;gt; {:command-args [&quot;git&quot; &quot;branch&quot; &quot;--show-current&quot;]
       :dir (.getPath (b/resolve-path dir))
       :out :capture}
    b/process
    :out
    str/trim))

(def lib 'my-group/my-lib)

(def version
  (if (= &quot;master&quot; (git-branch nil))
    (format &quot;1.0.%s&quot; (b/git-count-revs nil))
    (format &quot;1.0.%s-SNAPSHOT&quot; (b/git-count-revs nil))))
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11072/add-git-branch-function?show=11072#q11072</guid>
<pubDate>Sat, 13 Nov 2021 00:04:15 +0000</pubDate>
</item>
<item>
<title>Closed: Add git-hash function</title>
<link>https://ask.clojure.org/index.php/11093/add-git-hash-function?show=11093#q11093</link>
<description>&lt;p&gt;I want api to get git hash to find the exact version.&lt;br&gt;
Thank you.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defn git-hash
  &quot;Shells out to git and returns hash of commits on this branch:
    git rev-parse HEAD

  Options:
    :dir - dir to invoke this command from, by default current directory
    :short? - shorten hash to 7 length characters&quot;
  [{:keys [dir short?] :or {dir &quot;.&quot;} :as params}]
  (assert-specs &quot;git-hash&quot; params
                :dir ::specs/path
                :short? ::specs/boolean)
  (-&amp;gt; {:command-args (cond-&amp;gt; [&quot;git&quot; &quot;rev-parse&quot;]
                       short? (conj &quot;--short&quot;)
                       :default (conj &quot;HEAD&quot;))
       :dir (.getPath (resolve-path dir))
       :out :capture}
      process
      :out
      str/trim))
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11093/add-git-hash-function?show=11093#q11093</guid>
<pubDate>Fri, 12 Nov 2021 23:58:46 +0000</pubDate>
</item>
<item>
<title>Closed: tools.build's compile-clj does not allow setting jvm options</title>
<link>https://ask.clojure.org/index.php/11078/tools-builds-compile-clj-does-not-allow-setting-jvm-options?show=11078#q11078</link>
<description>&lt;p&gt;I've a project that uses Malli with a custom default registry, a feature which requires the code be compiled with a certain jvm opt set &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/metosin/malli#changing-the-default-registry&quot;&gt;as is detailed in its documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It was suggested to me in &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/seancorfield/build-clj/issues/7#issuecomment-924524367&quot;&gt;this issue&lt;/a&gt; that this is currently not supported in tools.build's &lt;code&gt;compile-clj&lt;/code&gt; function. I'm posting here in the hopes this can be filed as a feature request so that I can eventually move this project to tools.build.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11078/tools-builds-compile-clj-does-not-allow-setting-jvm-options?show=11078#q11078</guid>
<pubDate>Fri, 12 Nov 2021 22:53:11 +0000</pubDate>
</item>
<item>
<title>Commented: tools.build uber task fails when the dependency tree contains a dep which has no jar</title>
<link>https://ask.clojure.org/index.php/11156/tools-build-uber-task-fails-when-dependency-contains-which?show=11160#c11160</link>
<description>Ok, this is fixed in tools.deps.alpha and in tools.build v0.6.2.</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11156/tools-build-uber-task-fails-when-dependency-contains-which?show=11160#c11160</guid>
<pubDate>Tue, 12 Oct 2021 16:00:46 +0000</pubDate>
</item>
<item>
<title>Comment edited: tools.build.api/copy-dir corrupts binary files if :replace is used</title>
<link>https://ask.clojure.org/index.php/11147/tools-build-api-copy-dir-corrupts-binary-files-replace-used?show=11151#c11151</link>
<description>The :include option is about what files should be copied. In this case, you do (I presume) want the file copied, you just don't want it filtered, so this is a secondary level. I've added an option :non-replaced-exts in v0.6.1 for this that defaults to include a few common image types found in resources, including .png.</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11147/tools-build-api-copy-dir-corrupts-binary-files-replace-used?show=11151#c11151</guid>
<pubDate>Mon, 11 Oct 2021 04:51:04 +0000</pubDate>
</item>
<item>
<title>Commented: Should tools.build functions respect with-dir (from tools.deps.alpha)?</title>
<link>https://ask.clojure.org/index.php/11027/should-tools-build-functions-respect-with-from-tools-alpha?show=11031#c11031</link>
<description>I'm tracking this for depstar in &lt;a href=&quot;https://github.com/seancorfield/depstar/issues/101&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/seancorfield/depstar/issues/101&lt;/a&gt;</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11027/should-tools-build-functions-respect-with-from-tools-alpha?show=11031#c11031</guid>
<pubDate>Thu, 09 Sep 2021 00:27:25 +0000</pubDate>
</item>
<item>
<title>Answered: getting an error with tools.build uberjar</title>
<link>https://ask.clojure.org/index.php/10854/getting-an-error-with-tools-build-uberjar?show=10864#a10864</link>
<description>&lt;p&gt;Created ticket &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TBUILD-11&quot;&gt;https://clojure.atlassian.net/browse/TBUILD-11&lt;/a&gt;&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10854/getting-an-error-with-tools-build-uberjar?show=10864#a10864</guid>
<pubDate>Wed, 28 Jul 2021 21:20:23 +0000</pubDate>
</item>
<item>
<title>Answer selected: tools.build create-basis cannot use alias that includes tools.deps.alpha</title>
<link>https://ask.clojure.org/index.php/10852/tools-build-create-basis-cannot-alias-includes-tools-alpha?show=10861#a10861</link>
<description>&lt;p&gt;Sorry, that resource was a temporary hack that was supposed to be removed and I've now deleted it for the next release of tools.build.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10852/tools-build-create-basis-cannot-alias-includes-tools-alpha?show=10861#a10861</guid>
<pubDate>Wed, 28 Jul 2021 20:24:37 +0000</pubDate>
</item>
<item>
<title>Closed: Add ability to customize JAR manifest created by clojure.tools.build.api/uber</title>
<link>https://ask.clojure.org/index.php/10827/ability-customize-manifest-created-clojure-tools-build-uber?show=10827#q10827</link>
<description>&lt;p&gt;There are several reasons we need to customize the META-INF/MANIFEST.MF file created by &lt;code&gt;clojure.tools.build.api/uber&lt;/code&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A Java library we use, Liquibase, &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.liquibase.com/tools-integrations/extensions/extension-upgrade-guides/lb-2.0-upgrade-guide.html&quot;&gt;requires a &lt;code&gt;Liquibase-Package&lt;/code&gt; entry in the manifest file to be used inside uberjars&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;We'd like to exclude &lt;code&gt;Multi-Release: true&lt;/code&gt; from the built uberjar even tho some of our libs our multi-release. Log4j is an order of magnitude slower in a multi-release JAR and until we figure out how to fix that issue we've just been creating single-release JARs&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;With Leiningen you can specify the contents of the manifest by including a &lt;code&gt;:manifest&lt;/code&gt; key in &lt;code&gt;project.clj&lt;/code&gt;... adding an option like that to &lt;code&gt;tools.build&lt;/code&gt; would be extremely helpful.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10827/ability-customize-manifest-created-clojure-tools-build-uber?show=10827#q10827</guid>
<pubDate>Tue, 20 Jul 2021 18:35:51 +0000</pubDate>
</item>
<item>
<title>Answer selected: What does &quot;Manifest type :jar not loaded when finding deps ...&quot; mean?</title>
<link>https://ask.clojure.org/index.php/10831/what-does-manifest-type-jar-not-loaded-when-finding-deps-mean?show=10832#a10832</link>
<description>&lt;p&gt;This is a bug in the latest prerelease and I have fixed it for the next release.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10831/what-does-manifest-type-jar-not-loaded-when-finding-deps-mean?show=10832#a10832</guid>
<pubDate>Sun, 18 Jul 2021 17:41:11 +0000</pubDate>
</item>
<item>
<title>Answered: Exclude existing META-INF/MANIFEST.MF when invoking clojure.tools.build.api/uber</title>
<link>https://ask.clojure.org/index.php/10760/exclude-existing-meta-manifest-invoking-clojure-tools-build?show=10780#a10780</link>
<description>&lt;p&gt;&lt;code&gt;depstar&lt;/code&gt; has drop-in replacements for &lt;code&gt;tools.build&lt;/code&gt;'s &lt;code&gt;jar&lt;/code&gt; and &lt;code&gt;uber&lt;/code&gt; functions that handle merging of LICENSE files, a bunch more exclusions, merging log4j2 plugin caches, etc. See &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/seancorfield/depstar/blob/develop/src/hf/depstar/api.clj&quot;&gt;https://github.com/seancorfield/depstar/blob/develop/src/hf/depstar/api.clj&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Right now you'd have to depend on HEAD via &lt;code&gt;:git/url&lt;/code&gt; as I'm reworking all the documentation before I cut the next release, but I'd be interested in feedback if you're willing to try it out.&lt;/p&gt;
&lt;p&gt;See the example &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/seancorfield/depstar/blob/develop/build.clj&quot;&gt;https://github.com/seancorfield/depstar/blob/develop/build.clj&lt;/a&gt; which is the &lt;code&gt;tools.build&lt;/code&gt; examples with &lt;code&gt;depstar&lt;/code&gt;'s versions of &lt;code&gt;jar&lt;/code&gt; and &lt;code&gt;uber&lt;/code&gt; swapped in.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10760/exclude-existing-meta-manifest-invoking-clojure-tools-build?show=10780#a10780</guid>
<pubDate>Tue, 13 Jul 2021 23:38:42 +0000</pubDate>
</item>
</channel>
</rss>