<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions tagged apache maven</title>
<link>https://ask.clojure.org/index.php/tag/apache+maven</link>
<description></description>
<item>
<title>create-basis uses the wrong local maven repository</title>
<link>https://ask.clojure.org/index.php/12232/create-basis-uses-the-wrong-local-maven-repository</link>
<description>&lt;p&gt;I am attempting to build a Clojure project with numerous dependencies and contain everything into a single folder. The reason for doing this is because I will eventually build this software in an environment where I am not permitted to modify the home folder.&lt;/p&gt;
&lt;p&gt;The following command is being used&lt;br&gt;
&lt;code&gt;GITLIBS=/var/build/software/.gitlibs clojure -Srepro -Sdeps '{:mvn/local-repo &quot;/var/build/software/.m2/repository&quot;}' -T:build uber-aot&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;tools.deps is able to download all dependencies into the specified local repository. Once it's time for tools.build to run, I seem to get an error in the middle of a call to &lt;code&gt;b/create-basis&lt;/code&gt;. Here is what the error looks like.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Execution error (FileNotFoundException) at java.io.RandomAccessFile/open0 (RandomAccessFile.java:-2).
/home/user/.m2/repository/org/clojure/clojure/1.11.1/clojure-1.11.1.pom.part.lock (No such file or directory)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Is there any way to pass in the local Maven repository to tools.build? Preferably in the command line.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12232/create-basis-uses-the-wrong-local-maven-repository</guid>
<pubDate>Sat, 24 Sep 2022 08:29:08 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;I am developing a library with a dependency on tools.build and I would like to publish it as a jar.  Whilst tools.build is only available as a git dep, I cannot include it as a dependency in my pom file.  A wider discussion on this topic was held on this &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C6QH853H8/p1641381677207800&quot;&gt;slack thread&lt;/a&gt;, where @alexmiller requested that I raise this topic here.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11433/will-tools-build-be-released-as-a-jar</guid>
<pubDate>Wed, 05 Jan 2022 15:02:43 +0000</pubDate>
</item>
<item>
<title>Could not locate clojure/spec__init.class, clojure/spec.clj or clojure/spec.cljc on classpath</title>
<link>https://ask.clojure.org/index.php/11400/could-locate-clojure-specinit-clojure-clojure-classpath</link>
<description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;i want to use this &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/setzer22/alignment_model_text&quot;&gt;Git Repo&lt;/a&gt;. Installation worked for me, but when i run &lt;code&gt;mvn -X exec:java&lt;/code&gt; i get the following error:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    java.lang.ExceptionInInitializerError
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:293)
    at java.lang.Thread.run (Thread.java:748)
[...]

    Caused by: java.io.FileNotFoundException: Could not locate clojure/spec__init.class, clojure/spec.clj or clojure/spec.cljc on classpath.
    at clojure.lang.RT.load (RT.java:466)
    at clojure.lang.RT.load (RT.java:428)
    at clojure.core$load$fn__6824.invoke (core.clj:6126)
    at clojure.core$load.invokeStatic (core.clj:6125)
    at clojure.core$load.doInvoke (core.clj:6109)
    at clojure.lang.RestFn.invoke (RestFn.java:408)
    at clojure.core$load_one.invokeStatic (core.clj:5908)
    at clojure.core$load_one.invoke (core.clj:5903)
    at clojure.core$load_lib$fn__6765.invoke (core.clj:5948)
    at clojure.core$load_lib.invokeStatic (core.clj:5947)
    at clojure.core$load_lib.doInvoke (core.clj:5928)
    at clojure.lang.RestFn.applyTo (RestFn.java:142)
    at clojure.core$apply.invokeStatic (core.clj:667)
    at clojure.core$load_libs.invokeStatic (core.clj:5985)
    at clojure.core$load_libs.doInvoke (core.clj:5969)
    at clojure.lang.RestFn.applyTo (RestFn.java:137)
    at clojure.core$apply.invokeStatic (core.clj:667)
    at clojure.core$require.invokeStatic (core.clj:6007)
    at clojure.core$require.doInvoke (core.clj:6007)
    at clojure.lang.RestFn.invoke (RestFn.java:408)
    at edu.upc.nlp4bpm_commons.config$eval211$loading__6706__auto____212.invoke (config.clj:1)
    at edu.upc.nlp4bpm_commons.config$eval211.invokeStatic (config.clj:1)
    at edu.upc.nlp4bpm_commons.config$eval211.invoke (config.clj:1)
    at clojure.lang.Compiler.eval (Compiler.java:7176)
    at clojure.lang.Compiler.eval (Compiler.java:7165)
    at clojure.lang.Compiler.load (Compiler.java:7635)
    at clojure.lang.RT.loadResourceScript (RT.java:381)
    at clojure.lang.RT.loadResourceScript (RT.java:372)
    at clojure.lang.RT.load (RT.java:463)
    at clojure.lang.RT.load (RT.java:428)
    at clojure.core$load$fn__6824.invoke (core.clj:6126)
    at clojure.core$load.invokeStatic (core.clj:6125)
    at clojure.core$load.doInvoke (core.clj:6109)
    at clojure.lang.RestFn.invoke (RestFn.java:408)
    at clojure.core$load_one.invokeStatic (core.clj:5908)
    at clojure.core$load_one.invoke (core.clj:5903)
    at clojure.core$load_lib$fn__6765.invoke (core.clj:5948)
    at clojure.core$load_lib.invokeStatic (core.clj:5947)
    at clojure.core$load_lib.doInvoke (core.clj:5928)
    at clojure.lang.RestFn.applyTo (RestFn.java:142)
    at clojure.core$apply.invokeStatic (core.clj:667)
    at clojure.core$load_libs.invokeStatic (core.clj:5985)
    at clojure.core$load_libs.doInvoke (core.clj:5969)
    at clojure.lang.RestFn.applyTo (RestFn.java:137)
    at clojure.core$apply.invokeStatic (core.clj:667)
    at clojure.core$require.invokeStatic (core.clj:6007)
    at clojure.core$require.doInvoke (core.clj:6007)
    at clojure.lang.RestFn.invoke (RestFn.java:482)
    at du.upc.nlp4bpm_commons.freeling_api$eval150$loading__6706__auto____151.invoke (freeling_api.clj:1)
    at edu.upc.nlp4bpm_commons.freeling_api$eval150.invokeStatic (freeling_api.clj:1)
    at edu.upc.nlp4bpm_commons.freeling_api$eval150.invoke (freeling_api.clj:1)
    at clojure.lang.Compiler.eval (Compiler.java:7176)
    at clojure.lang.Compiler.eval (Compiler.java:7165)
    at clojure.lang.Compiler.load (Compiler.java:7635)
    at clojure.lang.RT.loadResourceScript (RT.java:381)
    at clojure.lang.RT.loadResourceScript (RT.java:372)
    at clojure.lang.RT.load (RT.java:463)
    at clojure.lang.RT.load (RT.java:428)
    at clojure.core$load$fn__6824.invoke (core.clj:6126)
    at clojure.core$load.invokeStatic (core.clj:6125)
    at clojure.core$load.doInvoke (core.clj:6109)
    at clojure.lang.RestFn.invoke (RestFn.java:408)
    at clojure.core$load_one.invokeStatic (core.clj:5908)
    at clojure.core$load_one.invoke (core.clj:5903)
    at clojure.core$load_lib$fn__6765.invoke (core.clj:5948)
    at clojure.core$load_lib.invokeStatic (core.clj:5947)
    at clojure.core$load_lib.doInvoke (core.clj:5928)
    at clojure.lang.RestFn.applyTo (RestFn.java:142)
    at clojure.core$apply.invokeStatic (core.clj:667)
    at clojure.core$load_libs.invokeStatic (core.clj:5985)
    at clojure.core$load_libs.doInvoke (core.clj:5969)
    at clojure.lang.RestFn.applyTo (RestFn.java:137)
    at clojure.core$apply.invokeStatic (core.clj:667)
    at clojure.core$require.invokeStatic (core.clj:6007)
    at clojure.core$require.doInvoke (core.clj:6007)
    at clojure.lang.RestFn.invoke (RestFn.java:408)
    at clojure.lang.Var.invoke (Var.java:384)
    at edu.upc.modelvsdocument.StandaloneMain.require (StandaloneMain.java:23)
    at edu.upc.modelvsdocument.StandaloneMain.&amp;lt;clinit&amp;gt; (StandaloneMain.java:12)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:293)
    at java.lang.Thread.run (Thread.java:748)
   
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The config.clj File looks like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    (ns edu.upc.modelvsdocument.config
  (:use [edu.upc.modelvsdocument.utils]
        [com.rpl.specter]
        [edu.upc.modelvsdocument.schemas]
        [edu.upc.modelvsdocument.utils]
        [clojure.pprint])
  (:require [clojure.java.io :as io]
            [clojure.spec :as spec]
            [clojure.spec.test :as stest]
            [edu.upc.modelvsdocument.schemas :as t :refer :all]
            [clojure.walk :as walk]))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I read a lot of stuff about clojure/spec/alpha__init.class, but i don't know if this relates to my problem. Please provide a desperate clojure neewbie some wisdom:)&lt;/p&gt;
&lt;p&gt;mvn &amp;amp; clojure version:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 1.8.0_292, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en, platform encoding: UTF-8
OS name: &quot;linux&quot;, version: &quot;5.10.16.3-microsoft-standard-wsl2&quot;, arch: &quot;amd64&quot;, family: &quot;unix&quot;

Clojure CLI version 1.10.3.1040
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Compiler</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11400/could-locate-clojure-specinit-clojure-clojure-classpath</guid>
<pubDate>Tue, 14 Dec 2021 16:59:14 +0000</pubDate>
</item>
<item>
<title>tools.build: are &quot;standard&quot; build tasks under consideration?</title>
<link>https://ask.clojure.org/index.php/11168/tools-build-are-standard-build-tasks-under-consideration</link>
<description>&lt;p&gt;What, if any, thought has been put into the idea of having &quot;standard&quot; build task names for tools.build-based builds?&lt;/p&gt;
&lt;p&gt;This could be in the form of actual code in tools.build (or a layer on top of it), or simply  an official, published convention.  At this stage I'm more interested in whether the general concept is on the radar and if so what it might look like, and less concerned with implementation specifics.&lt;/p&gt;
&lt;p&gt;This matters because while allowing authors to name their build tasks as they wish has some (small?) value to those authors, it results in a fragmented experience for the consumers of that build - a consumer cannot make any assumptions about each new tools.build based project they encounter that they wish to build themselves.&lt;/p&gt;
&lt;p&gt;While humans can introspect a build script to figure out how to operate it, that's a lot more difficult for downstream build-based automation; including (but not limited to) systems such as jitpack.io, Heroku, etc.&lt;/p&gt;
&lt;p&gt;Having started dabbling in tools.build, the current incarnation is feeling quite a bit like the Java build environment circa 2004 or so (right before Maven 1.0 was released).  At that time Apache Ant was the dominant build tool, and every single Ant build script was a special snowflake that forced consumers to spend time studying before they could be used effectively.  For all its substantial flaws, Maven 1.0 at least solved that one problem.  While comparing tools.build to Apache Ant is clearly a massive disservice in many ways (tools.build's scripting language, composability, and dependency management pieces are clearly light-eons ahead of anything Ant ever had), the lack of a well-defined &quot;interface&quot; into tools.build-based build scripts has given me a strong feeling of déjà vu...&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11168/tools-build-are-standard-build-tasks-under-consideration</guid>
<pubDate>Thu, 14 Oct 2021 21:40:27 +0000</pubDate>
</item>
</channel>
</rss>