FAQ
Hi,

In my limited experience with Clojure based web apps that are comprised of
jetty + ring + compojure I've used the lein-ring plugin to create jars or
wars depending on deployment needs. I'm curious to learn:

1. How can I create a deployable jar or war manually (or at least in a
less auto-magically way), i.e. without the lein-ring (or lien-war) plugin?
2. How can I create a deployable jar or war -- with or without
lein-ring/lein-war -- when the app relies on an alternative adapter such as
aleph, http-kit, etc?

Thanks.

-Ari

--
--
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/groups/opt_out.

Search Discussions

  • Phil Hagelberg at Feb 13, 2013 at 5:31 pm

    Ari writes:

    1. How can I create a deployable jar or war manually (or at least in a
    less auto-magically way), i.e. without the lein-ring (or lien-war) plugin?
    This is fairly straightforward, and it's my favourite way to package web
    applications because it doesn't involve any behind-the-scenes magic.
    Clojars just calls ring-jetty-adapter from its -main function:

    https://github.com/ato/clojars-web/blob/master/src/clojars/main.clj

    If you are only launching jetty it's even simpler than the Clojars
    setup; you can do it in 3 lines or so. Just be sure to put :gen-class in
    the ns form and have :main in project.clj point to it.

    -Phil

    --
    --
    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/groups/opt_out.
  • Feng Shen at Feb 14, 2013 at 2:46 am
    Hi, here is one solution:

    add (:gen-class) to the main namespace, add something in your project.clj

    :aot [rssminer.main, rssminer.admin]
    :main rssminer.main
    :uberjar-name "rssminer-standalone.jar"


    lein uberjar

    Package up the project files and all dependencies into a jar file

    java -jar rssminer-standalone.jar

    Starts your application


    On Thursday, February 14, 2013 12:47:11 AM UTC+8, Ari wrote:

    Hi,

    In my limited experience with Clojure based web apps that are comprised of
    jetty + ring + compojure I've used the lein-ring plugin to create jars or
    wars depending on deployment needs. I'm curious to learn:

    1. How can I create a deployable jar or war manually (or at least in a
    less auto-magically way), i.e. without the lein-ring (or lien-war) plugin?
    2. How can I create a deployable jar or war -- with or without
    lein-ring/lein-war -- when the app relies on an alternative adapter such as
    aleph, http-kit, etc?

    Thanks.

    -Ari
    --
    --
    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/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupclojure @
categoriesclojure
postedFeb 13, '13 at 4:47p
activeFeb 14, '13 at 2:46a
posts3
users3
websiteclojure.org
irc#clojure

3 users in discussion

Ari: 1 post Feng Shen: 1 post Phil Hagelberg: 1 post

People

Translate

site design / logo © 2022 Grokbase