2010/10/12 <lprefonta...@softaddicts.ca>

> a) Assuming all the dependencies are published in a maven repo out there:
>
>  If you put all your deps in project.clj, the pom.xml file generated by
>  leiningen will reference all of them as dependencies to your own lib.
>  You only need to publish your own library and the pom.xml to Clojars.
>
>  Anyone pulling your lib using lein deps (and of course specifying your lib
>  as a dependcy in project.clj) will pull them also from the maven repos
>

How can I publish a dependency in a maven repo like rosejn did for
jsyntaxpane, for example [1]?

I think this way can help other people that will need the non-clojure jar in
the future, right?


> b1) Assuming some of your dependencies are not published in a maven repo:
>
>   You could create a uberjar using leiningen and then publish it to
> Clojars.
>   But that would include all the dependencies in your lib. Including
>   the Clojure runtime... You may have to be careful maintaining multiple
>   versions to comply with different version of Clojure and contrib.
>   A bit ugly..
>

I agree. It's tricky. Maintaning multiple versions will be a pain.


> b2) There's a third alternative but that requires some scripting outside of
>    leiningen. You may prefer to avoid this one :))) I assume you
>    use U*X but it's essentially the same steps under Windows:
>
>   - create a temp folder in your project.
>   - expand every dependency not available in maven into this temp folder:
>     (cd temp; jar -xf ../lib/dddd.jar)
>   - expand your own library into this folder:
>     (cd temp; jar -xf ../xxxx.jar)
>   - recreate your library jar file:
>     (cd temp; jar -cf ../xxxx.jar)
>
>    The above should include all the class files, resource, ... from all
>    the dependencies you want to include.
>
>    You would have to run this manually after every new build you want
>    to publish to Clojars. Do notmix up the steps. You library has to be the
>    last to get expanded in the temporary folder.
>

Maybe I can do that for every dependency library, generate a pom and push to
clojars, can I?

All the best.

[1] http://clojars.org/org.clojars.rosejn/jsyntaxpane
<http://clojars.org/org.clojars.rosejn/jsyntaxpane>
-- 
Vilson Vieira

vil...@void.cc

((( http://automata.cc )))

((( http://musa.cc )))

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to