the uberjar option bundles clojure.jar (as well as any other dependencies
you specify in your project.clj) into the output jar for you

On Mon, Oct 16, 2017 at 6:36 AM Damien Mattei <[email protected]>
wrote:

> following this tutorial :
> https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md#tutorial
> i succeed with leiningen to build a project,run it and after make a jar
> file :
>
> lein new app my-stuff
> cd my-stuff
> lein uberjar
> lein run
> or : cd target; java -jar my-stuff-0.1.0-SNAPSHOT-standalone.jar
>
> with some simplified from tutorial files:
>
> project.clj
>
> (defproject my-stuff "0.1.0-SNAPSHOT"
>   :description "FIXME: write description"
>   :url "http://example.com/FIXME";
>   :license {:name "Eclipse Public License"
>             :url "http://www.eclipse.org/legal/epl-v10.html"}
>   :dependencies [[org.clojure/clojure "1.8.0"]]
>
>   :main my-stuff.core
>   :aot [my-stuff.core])
>
> core.clj
>
> (ns my-stuff.core
>   (:gen-class))
>
> (defn -main [& args]
>   (println "Welcome to my project! These are your args:" args))
>
> the jar file in target/ could be loaded in the netbeans project Netbeans
> as a library/jar file and i can see the classes and definition in the
> netbeans IDE,
> so it seems ok, note that at this point i can test it (on the tomcat
> server) but it should work (if i add also the clojure.jar runtime library i
> suppose)
> also i do not need to make a full .war file from scratch, so it is more
> easy.
>
> thank for your help
>
>
> Damien
>
>
> On Monday, October 16, 2017 at 8:10:24 AM UTC+2, Terje Sten Bjerkseth
> wrote:
>>
>> Damien: A good starting point for a simple web server might be to use
>>
>> lein new pedestal-service
>>
>> Then you can do lein uberjar to get a jar ready to run. Or check the
>> README for running local dev with a local REPL.
>>
>> If instead you want a WAR, you can switch from pedestal.jetty to
>> pedestal.immutant in project.clj and add the Immutant plugin:
>>
>> :plugins [[lein-immutant "2.1.0"]]
>>
>> Then do a lein immutant war to get your WAR for deployment to e.g.
>> WildFly 10.
>>
>> If you also want a nREPL to repl directly into the running server, have
>> in project.clj e.g.:
>>
>> :plugins [[lein-immutant "2.1.0"] [cider/cider-nrepl "0.15.1"]]
>> :immutant {:war {:nrepl {:port XXXX}}}
>>
>> and do a lein immutant war --nrepl-start when making your WAR (check your
>> security on the nREPL port).
>>
>> Cheers,
>> Terje
>>
>> (Haven't looked at WildFly 11 RC yet and don't know if Immutant works
>> with it. Considering moving some of our services from WildFly to separate
>> Jetty services instead, but WildFly 10 has worked very well.)
>>
>>
>>
>> søndag 15. oktober 2017 10.43.36 UTC+2 skrev Damien Mattei følgende:
>>>
>>> thanks for the answers and comments of John, James and others,
>>> the discussion has opened many aspect of web application development and
>>> it is is positive.
>>>
>>> about the IDE, i'm not using Netbeans with Scheme or LisP exclusively,
>>> in fact Netbeans was used in the office just to create web service in Java,
>>> this thing can be done by hand in command line too, Kawa Scheme also can
>>> do it itself :
>>>  https://www.gnu.org/software/kawa/Servlets.html
>>>
>>> from the discussion i see now many solution to test ,I will install
>>> Leiningen, also i see in the doc of Immutant that it is possible to
>>> generate some war files :
>>> http://immutant.org/documentation/current/apidoc/guide-wildfly.html#h3386
>>>
>>> i hope i could use Clojure for that because it seems a really fun and
>>> solid LisP dialect.
>>> I will post updates when i have a concrete usable solution.
>>>
>>> Regards,
>>>
>>> Damien
>>>
>>> On Saturday, October 14, 2017 at 5:07:08 PM UTC+2, John M. Switlik wrote:
>>>>
>>>> James,
>>>>
>>>> Thanks. I saw a writeup mentioning Leiningen that I will go back to.
>>>>
>>>> It is not the 'toy' issue that concerns me. It is that all sorts of
>>>> browsers exist as well as a whole slew of different types of users. And, if
>>>> I am going to push something down to a remote device, I want to expect that
>>>> it would be handled in a nice manner.
>>>>
>>>> As for example projects, these are prime; but, they are supported by
>>>> working professionals. So, Clojure does have a lot to offer.
>>>>
>>>>    http://base2s.com/work/
>>>>
>>>> I am sure that I'll look back and see that it was easy. But, this seems
>>>> like an opportunity to step through the thing (that is, the hugely
>>>> complicated world of the muddy cloud) and see how things evolved. Those
>>>> little interpreters are up there as a lure in the meantime.
>>>>
>>>> Cheers,
>>>> John
>>>>
>>> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]
> 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 [email protected].
> 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 [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to