Hi,
I have two ClojureScript projects. From the first one (html-ui-lib) I created a JAR file with the following commands and installed it in a local repository:
lein with-profile prod jar
lein localrepo install -r /home/muenkel/soft/Global/clojure-repo target/html-ui-lib-0.1.2-SNAPSHOT.jar html-ui-lib 0.1.2-SNAPSHOT
In the second project (via-trans) I try to use this library. For this purpose I have included the library in the project file. Unfortunately, not all files of the JAR file are installed. What am I doing wrong?
Here is the content of the JAR file:
245 Fri Aug 11 00:02:34 CEST 2023 META-INF/MANIFEST.MF
3268 Fri Aug 11 00:02:34 CEST 2023 META-INF/maven/html-ui-lib/html-ui-lib/pom.xml
3183 Fri Aug 11 00:02:34 CEST 2023 META-INF/leiningen/html-ui-lib/html-ui-lib/project.clj
783 Fri Aug 11 00:02:34 CEST 2023 META-INF/leiningen/html-ui-lib/html-ui-lib/README.md
0 Fri Aug 11 00:02:32 CEST 2023 META-INF/
0 Fri Aug 11 00:02:32 CEST 2023 META-INF/maven/
0 Fri Aug 11 00:02:32 CEST 2023 META-INF/maven/html-ui-lib/
0 Fri Aug 11 00:02:32 CEST 2023 META-INF/maven/html-ui-lib/html-ui-lib/
158 Fri Aug 11 00:02:32 CEST 2023 META-INF/maven/html-ui-lib/html-ui-lib/pom.properties
0 Fri Aug 11 00:01:30 CEST 2023 public/
0 Tue Jul 11 23:15:06 CEST 2023 public/css/
2715 Tue Jul 11 23:15:06 CEST 2023 public/css/style.css
151 Sun Mar 26 21:35:54 CEST 2023 public/test.html
0 Fri Aug 11 00:02:32 CEST 2023 public/cljs-out/
554 Mon Apr 17 22:11:34 CEST 2023 public/index.html
417 Sat Apr 08 23:03:08 CEST 2023 public/devcards.html
0 Sat Jul 22 23:08:08 CEST 2023 html_ui_lib/
0 Wed May 10 20:49:58 CEST 2023 html_ui_lib/util/
1100 Wed May 10 20:49:58 CEST 2023 html_ui_lib/util/limit-lines.cljs
1123 Thu May 04 23:27:52 CEST 2023 html_ui_lib/core.cljs
0 Tue Jul 18 21:06:24 CEST 2023 html_ui_lib/spec/
272 Sun Jun 04 00:13:12 CEST 2023 html_ui_lib/spec/email-value-specs.cljs
1883 Tue Jul 18 21:06:24 CEST 2023 html_ui_lib/spec/value_specs.cljs
213 Wed Jun 07 23:31:32 CEST 2023 html_ui_lib/spec/text_value_specs.cljs
3871 Wed Jun 07 23:14:28 CEST 2023 html_ui_lib/spec/ui-specs.cljs
267 Wed Jun 07 23:26:06 CEST 2023 html_ui_lib/spec/number_value_specs.cljs
185 Sat May 20 23:56:54 CEST 2023 html_ui_lib/spec/date_value_specs.cljs
178 Wed May 31 00:26:16 CEST 2023 html_ui_lib/spec/drop_down_value_specs.cljs
1545 Mon Jul 17 22:55:08 CEST 2023 html_ui_lib/spec/type_specs.cljs
0 Tue Jul 18 20:59:58 CEST 2023 html_ui_lib/ui/
3234 Tue Jun 06 21:32:30 CEST 2023 html_ui_lib/ui/input_email.cljs
4298 Tue Jul 18 20:59:58 CEST 2023 html_ui_lib/ui/tree_view.cljs
3361 Wed May 24 22:41:30 CEST 2023 html_ui_lib/ui/input_text.cljs
3420 Sat Jun 03 21:42:24 CEST 2023 html_ui_lib/ui/input_date.cljs
6013 Wed Jun 07 23:35:28 CEST 2023 html_ui_lib/ui/input_number.cljs
2029 Wed Jul 12 22:42:44 CEST 2023 html_ui_lib/ui/core.cljs
396 Fri Apr 07 21:19:26 CEST 2023 html_ui_lib/ui/button.cljs
844 Tue Jul 11 23:13:50 CEST 2023 html_ui_lib/ui/output_boolean.cljs
1127 Wed Jul 12 23:57:34 CEST 2023 html_ui_lib/ui/input_checkbox.cljs
276 Sun Apr 23 22:59:54 CEST 2023 html_ui_lib/ui/grid_container.cljs
603 Thu Jun 08 22:50:00 CEST 2023 html_ui_lib/ui/output_number.cljs
1613 Mon Jul 10 21:58:34 CEST 2023 html_ui_lib/ui/input_radio.cljs
381 Sun Apr 09 00:16:22 CEST 2023 html_ui_lib/ui/table.cljs
1775 Sat Jul 01 22:19:10 CEST 2023 html_ui_lib/ui/drop_down_list.cljs
2789 Wed Jun 28 22:57:44 CEST 2023 html_ui_lib/ui/leaf_template.cljs
313 Thu Jun 08 23:19:22 CEST 2023 html_ui_lib/ui/output_text.cljs
2160 Thu Jul 13 23:36:30 CEST 2023 html_ui_lib/ui/input_password.cljs
519 Wed Jun 07 22:44:34 CEST 2023 html_ui_lib/test_runner.cljs
860 Wed Jun 07 22:57:28 CEST 2023 html_ui_lib/number_value_specs_test.cljs
273 Wed May 24 21:17:16 CEST 2023 html_ui_lib/text_value_specs_test.cljs
1090 Tue May 30 23:24:06 CEST 2023 html_ui_lib/value_specs_test.cljs
7280 Wed Jun 07 23:07:38 CEST 2023 html_ui_lib/ui_specs_test.cljs
2274 Wed May 24 21:37:08 CEST 2023 html_ui_lib/type_specs_test.cljs
305 Wed May 24 23:44:04 CEST 2023 html_ui_lib/drop_down_value_specs_test.cljs
260 Sun Mar 26 21:35:54 CEST 2023 html_ui_lib/core_test.cljs
Here, on the other hand, is the content of the directory with the library. As you can see, only the files of the namespace ui are contained here:
via-trans/resources/public/cljs-out/dev/html_ui_lib/
└── ui
├── core.cljs
├── core.cljs.cache.json
├── core.js
├── core.js.map
├── input_text.cljs
└── input_text.js
Here is the project.clj file of html_ui_lib:
(defproject html-ui-lib "0.1.2-SNAPSHOT"
:description "FIXME: write this!"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:min-lein-version "2.7.1"
:dependencies [[clj-commons/citrus "3.3.0"]
[cljs-ajax "0.8.1"]
[funcool/struct "1.4.0"]
[org.clojure/clojure "1.10.0"]
[org.clojure/clojurescript "1.11.60"]
[rum "0.12.10"]]
;;:deps {io.github.clj-kondo/config-rum-rum {:mvn/version "0.12.10"}}
:global-vars {warn-on-reflection true}
;;:global-vars {asserts false}
:source-paths ["src/cljs" "test/cljs"]
:aliases {"fig:build" ["trampoline" "run" "-m" "figwheel.main" "-b" "dev" "-r"]
"fig:min" ["run" "-m" "figwheel.main" "-O" "advanced" "-bo" "dev"]
"prod:build" ["run" "-m" "figwheel.main" "-O" "advanced" "-bo" "prod"]}
:profiles {:dev {:dependencies [[com.bhauman/figwheel-main "0.2.18"]
[org.slf4j/slf4j-nop "1.7.30"]
[com.bhauman/rebel-readline-cljs "0.1.4"]
[devcards "0.2.7"]
;; for informing the linter clj-kondo, that the macros
;; defc etc defines symbols
[io.github.clj-kondo/config-rum-rum "1.0.0"]]
:source-paths ["devcards/cljs"]
:resource-paths ["target"]
;; need to add the compiled assets to the :clean-targets
:clean-targets ^{:protect false} ["target" "resources/public/cljs-out"]
#_:global-vars #_{*asserts* false}}
:prod {:dependencies [[com.bhauman/figwheel-main "0.2.18"]]
:compiler {:optimizations :advanced
:pretty-print false}
:clean-targets ^{:protect false}
["target"
"resources/public/cljs-out/prod"
"resources/public/cljs-out/prod-main.js"]
:cljsbuild {:builds
[{:source-paths ["src/cljs"]
:compiler
{:output-to "resources/public/cljs-out/prod-main.js"
:optimizations :advanced
:pretty-print false}
:build nil}]}
:plugins [[lein-cljsbuild "1.1.8"]]}}
:plugins [[com.github.clj-kondo/lein-clj-kondo "0.2.4"]
[com.fabiodomingues/lein-clj-depend "0.3.0"] ;; Usage: lein clj-depend
;; Detects curcular referencies
[lein-kibit "0.1.8"] ; Code Analyzer: https://github.com/clj-commons/kibit
; Anounced better code alternatives
; Usage: lein kibit
; Automatic: lein auto kibit
; With replace: lein kibit --replace --interactive
])
Here is the project file of via-trans:
(defproject via-trans "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:dependencies [;;[camel-snake-kebab "0.4.3"] ; Libray used for converting keywords
[ch.qos.logback/logback-classic "1.4.4"]
[cljs-ajax "0.8.1"]
[clj-commons/citrus "3.3.0"]
;;[clojure.java-time "1.1.0"]
;;[cljc.java-time "RENAMED"]
[cljc.java-time "0.1.18"]
[conman "0.9.6"] ; Library used for creating functions from sql
[cprop "0.1.19"] ; Configuration
[devcards "0.2.7"]
[expound "0.9.0"]
[funcool/struct "1.4.0"]
[com.layerware/hugsql "0.5.3"] ; Replacement for conman
;[hugsql-adapter-case "0.1.0"] ; case adapter for db table columns
[html-ui-lib "0.1.2-SNAPSHOT"]
[json-html "0.4.7"]
[luminus-transit "0.1.5"]
[luminus-undertow "0.1.18"]
[luminus/ring-ttl-session "0.3.3"]
[org.mariadb.jdbc/mariadb-java-client "1.1.5"]
;;[mysql/mysql-connector-java "8.0.18"]
[markdown-clj "1.11.3"]
[metosin/muuntaja "0.6.8"]
[metosin/reitit "0.5.18"]
[metosin/ring-http-response "0.9.3"]
[mount "0.1.16"]
[nrepl "1.0.0"]
[org.clojure/clojure "1.11.1"]
[org.clojure/clojurescript "1.11.60"]
[org.clojure/tools.cli "1.0.214"]
[org.clojure/tools.logging "1.2.4"]
[org.webjars.npm/bulma "0.9.4"]
[org.webjars.npm/material-icons "1.10.8"]
[org.webjars/webjars-locator "0.45"]
[org.webjars/webjars-locator-jboss-vfs "0.1.0"]
[ring-webjars "0.2.0"]
[ring/ring-core "1.9.6"]
[ring/ring-defaults "0.3.4"]
[rum "0.12.10"]
[selmer "1.12.55"]]
:min-lein-version "2.0.0"
:source-paths ["src/clj" "src/cljc" "src/cljs" "devcards/cljs"]
:test-paths ["test/clj" "test/cljc" "test/cljs"]
:resource-paths ["resources" "target"]
:clean-targets ^{:protect false} ["target" "resources/public/cljs-out"]
:target-path "target/%s/"
:main ^:skip-aot via-trans.core
:plugins []
:profiles
{:uberjar {:omit-source true
:aot :all
:uberjar-name "via-trans.jar"
:source-paths ["env/prod/clj" ]
:resource-paths ["env/prod/resources"]}
:dev [:project/dev :profiles/dev]
:test [:project/dev :project/test :profiles/test]
:project/dev {:jvm-opts ["-Dconf=dev-config.edn" ]
:dependencies [[com.bhauman/figwheel-main "0.2.18"]
[com.bhauman/rebel-readline-cljs "0.1.4"]
[org.clojure/tools.namespace "1.3.0"]
[pjstadig/humane-test-output "0.11.0"]
[prone "2021-04-23"]
[ring/ring-devel "1.9.6"]
[ring/ring-mock "0.4.0"]]
:plugins [[com.jakemccrary/lein-test-refresh "0.24.1"]
[jonase/eastwood "1.2.4"]
;;[cider/cider-nrepl "0.28.4"] ; ist in .lein/profiles.clj
]
:source-paths ["env/dev/clj" ]
:resource-paths ["env/dev/resources" "target"]
:repl-options {:init-ns user
:timeout 120000}
:injections [(require 'pjstadig.humane-test-output)
(pjstadig.humane-test-output/activate!)]}
:project/test {:jvm-opts ["-Dconf=test-config.edn" ]
:resource-paths ["env/test/resources"] }
:profiles/dev {}
:profiles/test {}})