FAQ
Hi everyone,
I've recently need to come up with a workaround for building a project that
basically entails running a Leiningen build within Maven.

I think that it will get the job done, but it's also definitely not my
proudest moment... which is why I would like to know if anyone understands
the original problem, which has something to do with the classloader and
how the Clojure code gets built (by Leiningen vs. by Maven):

http://www.elangocheran.com/blog/2015/12/compiling-a-leiningen-project-from-maven/

And out of curiosity, I wonder if anyone out there has thought about
quietly slipping in a Leiningen build step into a Maven build?

Thanks,
Elango

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Mikera at Dec 28, 2015 at 10:02 am
    Thanks for sharing, this is definitely something I have been interested in.

    My use case is a little more specific: I'd like to be able to run a
    Clojurescript test suite as part of a larger Maven build. Has anyone
    managed to get something like this to work?
    On Monday, 28 December 2015 05:06:23 UTC, Elango wrote:

    Hi everyone,
    I've recently need to come up with a workaround for building a project
    that basically entails running a Leiningen build within Maven.

    I think that it will get the job done, but it's also definitely not my
    proudest moment... which is why I would like to know if anyone understands
    the original problem, which has something to do with the classloader and
    how the Clojure code gets built (by Leiningen vs. by Maven):


    http://www.elangocheran.com/blog/2015/12/compiling-a-leiningen-project-from-maven/

    And out of curiosity, I wonder if anyone out there has thought about
    quietly slipping in a Leiningen build step into a Maven build?

    Thanks,
    Elango
    --
    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+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/clojure?hl=en
    ---
    You received this message because you are subscribed to the Google Groups "Clojure" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Elango Cheran at Jan 5, 2016 at 6:47 am
    I'm guessing that you might be able to accomplish running Clojurescript
    tests within a Maven build by combining the following:

    1. Take a look at the approach of building Clojurescript by running a
    build.clj script (ex:
    https://github.com/clojure/clojurescript/wiki/Quick-Start)
    2. Clojurescript tests can be easily kicked off if you create a test runner
    namespace that calls the other test namespaces (
    https://github.com/clojure/clojurescript/wiki/Testing)
    3. You can execute a Clojure script from within Maven either using
    maven-exec-plugin or clojure-maven-plugin (ex:
    https://gist.github.com/stuartgunter/3727047/d628cfdd24f2d879f7c621865bdcb8758cda087b).
    In either case, within the <execution>, you can choose the <phase> to
    attach the goal to. The maven-exec-plugin approach is just the equivalent
    of what you would do at the command line when running java -cp
    clojure.jar:<classpath> clojure.main <script> (
    http://clojure.org/repl_and_main) If you choose the maven-exec-plugin
    style, you may have to use the "exec" goal, and if so, remember to include
    <classpath/> inside <arguments>.

    So if you had a test runner namespace like my.app.run-tests, then you would
    have the .clj file my/app/run_tests.clj, and you would choose a plugin to
    run that during the test phase.
    On Mon, Dec 28, 2015 at 2:02 AM, Mikera wrote:

    Thanks for sharing, this is definitely something I have been interested in.

    My use case is a little more specific: I'd like to be able to run a
    Clojurescript test suite as part of a larger Maven build. Has anyone
    managed to get something like this to work?

    On Monday, 28 December 2015 05:06:23 UTC, Elango wrote:

    Hi everyone,
    I've recently need to come up with a workaround for building a project
    that basically entails running a Leiningen build within Maven.

    I think that it will get the job done, but it's also definitely not my
    proudest moment... which is why I would like to know if anyone understands
    the original problem, which has something to do with the classloader and
    how the Clojure code gets built (by Leiningen vs. by Maven):


    http://www.elangocheran.com/blog/2015/12/compiling-a-leiningen-project-from-maven/

    And out of curiosity, I wonder if anyone out there has thought about
    quietly slipping in a Leiningen build step into a Maven build?

    Thanks,
    Elango
    --
    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+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/clojure?hl=en
    ---
    You received this message because you are subscribed to the Google Groups
    "Clojure" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to clojure+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    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+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/clojure?hl=en
    ---
    You received this message because you are subscribed to the Google Groups "Clojure" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupclojure @
categoriesclojure
postedDec 28, '15 at 5:06a
activeJan 5, '16 at 6:47a
posts3
users2
websiteclojure.org
irc#clojure

2 users in discussion

Elango Cheran: 2 posts Mikera: 1 post

People

Translate

site design / logo © 2022 Grokbase