Fork me on GitHub
#tools-deps
<
2023-07-11
>
Sagura09114:07:21

hey so I have a question and I may not be in the right channel, but I am trying to package all of my non-compiled cljs code into a maven local repo and use it like a library in my deps.edn file.

borkdude14:07:48

Is there a question?

Sagura09115:07:06

sorry, can I do that using maven without having .js files? right now we have a git sha lib system but we want to transfer it over to maven, and its dependencies.

borkdude15:07:17

yes, there is no difference between a mvn or git dependency when it comes to what files are in your dependency

Sagura09116:07:23

how do I put my entire project into a local mvn repo with out using clojars?

borkdude17:07:44

a local mvn repo? why would you do that?

Sagura09119:07:47

Because some of our content has to be private and we want to add our dependencies to be compiled and included without uncompiled cljs. the issue is we use Git/sha and it's supposed to be a library. but if a developer brings down the library they will have to find the shad include that then do a npm install that may that multiple dependency includes. we want to have self contained dependencies for our lib.

borkdude20:07:03

> Because some of our content has to be private What does this have to do with git or mvn? Both git or mvn can be private or public

borkdude20:07:21

> we want to add our dependencies to be compiled and included without uncompiled cljs ok...

borkdude20:07:00

I'm not sure I understand the rest of what you said. git, mvn and now npm... Perhaps you can try to focus on one clear problem at a time? #clojurescript might also be a good channel to ask questions about this

jjttjj05:07:47

Check out the "Local Maven install" section on this page https://clojure.org/reference/deps_and_cli

thheller07:07:57

if your intent is to have shadow-cljs install npm dependencies of the library you can add a deps.cljs file to that library including {:npm-deps {"that-dep" "1.2.3"}}. when shadow-cljs is started it'll look for those files and install the dependencies via npm install [email protected]

thheller07:07:19

doesn't matter at all whether thats a git, local or maven dep

thheller07:07:21

just needs to be at the root of the classpath. so any of the lib :paths.

Sagura09115:07:51

@U05224H0W Hey I am not trying to be confusing. the git/sha we have is fine, but it is clunky. in our main project, we have packages that we cannot upgrade because it will break our build. the lib has all the current up-to-date npm packages it needs. when we add the lib to the project shadow or clj says "hey can't do this because it, is not the right version" what I am trying to look for, when add our lib to the main project and we start to build it with shadow and web-pack, the lib it does an npm install from its own repo and we don't have to maintain the libs dependencies.

thheller16:07:40

I don't really understand your issue then. I assume you wanted to transfer npm dependencies from the lib to the main project, which I described. how you resolve conflicts is really up to you and a npm issue, neither deps.edn or shadow-cljs will help with that in any way.