Clojure build succeeds :) but no uberjar produced

Hi the build succeeds but the uberjar is not there in the target directory.

Here’s my circle.yml. Can anyone see the problem?

I am on a free single node account by the way.

    working_directory: ~/zjbu
      - image: openjdk:8
      - checkout
      - restore_cache:
          key: {{ checksum "project.clj" }}
      - run: bin/lein deps
      - save_cache:
            - ~/.m2
            - ~/.lein
          key: {{ checksum "project.clj" }}
      - run: bin/lein do test, uberjar

Your config.yml file is fine in this case (assuming you are using 2.0) so maybe there’s something going on in your project.clj. Can you paste that?

1 Like
(defproject zebu "0.2.0"
  :dependencies [
                 [org.clojure/clojure "1.9.0-alpha15"]
                 [org.clojure/core.async "0.3.442"]
                 [org.clojure/clojurescript "1.9.229"]
                 [org.clojure/core.match "0.3.0-alpha4"]
                 [org.clojure/java.jdbc "0.7.0-alpha3"]
                 [org.clojure/data.json "0.2.6"]
                 [org.clojure/java.classpath "0.2.3"]
                 [com.cognitect/transit-cljs "0.8.239"]
                 [org.clojure/tools.nrepl "0.2.12"]
                 [com.taoensso/timbre "4.8.0"]
                 [com.taoensso/sente "1.11.0"]
                 [reagent "0.6.1"]
                 [reagent-forms "0.5.29"]
                 [reagent-utils "0.2.1"]
                 [re-frame "0.9.2"]
                 [re-frisk "0.4.4"]
                 [environ "1.1.0"]
                 [mount "0.1.11"]
                 [org.clojars.jburvill/re-com "0.9.3"]
                 [com.h2database/h2 "1.4.193"]
                 [factual/durable-queue "0.1.5"]
                 [bidi "2.0.16"]
                 [kibu/pushy "0.3.7"]
                 [cljs-ajax "0.5.8"]
                 [ring "1.6.0-RC1"]
                 [ring/ring-json "0.4.0"]
                 [ring/ring-defaults "0.2.3"]
                 [ring-middleware-format "0.7.2"]
                 [ring-cors "0.1.9"]
                 [honeysql "0.8.2"]
                 [http-kit "2.2.0"]
                 [buddy "1.3.0"]
                 [clj-time "0.13.0"]
                 [com.lucasbradstreet/cljs-uuid-utils "1.0.2"]
                 [com.andrewmcveigh/cljs-time "0.4.0"]
                 [lasync "0.1.6"]
                 [garden "1.3.2"]
                 [dk.ative/docjure "1.11.0"]
                 [clojure.jdbc/clojure.jdbc-c3p0 "0.3.2"]

  :source-paths ["src/clj"]

  :profiles {:dev {:source-paths ["dev"]}

             :repl {:source-paths ["dev"]}

             :uberjar {;; :source-paths ["dev"]
                       :prep-tasks ["compile" ["cljsbuild" "once" "min"]]
                       :main zebu.www
                       :aot [zebu.www]}}

  :min-lein-version "2.5.3"

  :plugins [[lein-cljsbuild "1.1.5"]
            [lein-figwheel "0.5.9"]
            [lein-environ "1.1.0"]
            [lein-ring "0.11.0"]
            [lein-garden "0.3.0"]]

  ;; :repositories {"local" "file:repo"}

  :clean-targets ^{:protect false} ["resources/public/js/compiled"

  :resource-paths ["resources"]

  :figwheel {:css-dirs ["resources/public/css"]
             :server-port 3449}

  :garden {:builds [{;; Optional name of the build:
                     :id "screen"
                     ;; Source paths where the stylesheet source code is
                     :source-paths ["src/clj"]
                     ;; The var containing your stylesheet:
                     ;; Compiler flags passed to garden.core/css:
                     :compiler {;; Where to save the file:
                                :output-to "resources/public/css/screen.css"
                                ;; Compress the output?
                                :pretty-print? true}}]}

  :cljsbuild {
              :builds {
                       :dev {:source-paths ["src/cljs"]
                             :figwheel {:on-jsload "zebu.core/mount-root"}
                             :compiler {:main zebu.core
                                        :output-to "resources/public/js/compiled/app.js"
                                        :output-dir "resources/public/js/compiled/out"
                                        :asset-path "js/compiled/out"
                                        :optimizations :none
                                        :source-map true
                                        :source-map-timestamp true}}

                       :min {:source-paths ["src/cljs"]
                             :jar true
                             :compiler {:main zebu.core
                                        :output-to "resources/public/js/compiled/app.js"
                                        ;;:output-dir "resources/public/js/compiled/out"
                                        :output-dir "resources/public/js/compiled/min"
                                        ;; :asset-path "js/compiled/out"
                                        :asset-path "js/compiled/min"
                                        :optimizations :advanced
                                        :closure-defines {goog.DEBUG false}
                                        :pretty-print false}}}})

I was missing the version: 2
at the top of the config file, so that was probably the cause.

It will now attempt to build the uberjar, however it almost always fails, which I will post about separately.