It appears that someone created a useful Eclipse plugin to build executable jars from a java project. And it also works from a clojure-dev project !
I installed the Fat Jar plugin ( updatesite: http://kurucz-grafika.de/fatjar/ , homepage: http://fjep.sourceforge.net) and it worked well. The only trick is that if the class you want as Main is one generated in the classes folder, then Fat Jar fails to present it via the list activated by the button, but you can still type it fully qualified manually, and it creates the jar correctly. If you also save the configuration via the corresponding button, it is then easy to quickly repackage the app after the first time. N.B. : there is also out-of-the-box executable jar support in Eclipse, but we encountered problems with it when the main class is not located in the source folders of the project, as is the case when you generate the main class from a clojure namespace. Regards, -- Laurent 2009/2/13 Laurent PETIT <laurent.pe...@gmail.com> > Hello again, > > As I said in my first answer, clojuredev doesn't provide anything more than > what Eclipse has to offer in this area, at least not yet. > > And honestly, I don't know if eclipse provides such a functionality "out of > the box". > > Cheers, > > -- > Laurent > > 2009/2/11 Rayne <disciplera...@gmail.com> > > >> Do you mean, just exporting it as a normal .jar file, and not an >> executable jar file? In Netbeans, which is what I've been using before >> trying Clojure-dev, there was just a build button that would build an >> executable .jar with a lib folder for Clojure.jar and whatever else >> the project depended on. I haven't used Eclipse enough to know if I >> could do something like this by just using a normal .jar file. >> >> On Feb 10, 6:51 pm, Laurent PETIT <laurent.pe...@gmail.com> wrote: >> > Hello, >> > >> > Normally not currently, or, if it works, it would be unintentional :-) >> > >> > More seriously : this indeed is not an officially supported feature. >> > >> > The long answer is : it depends on what you mean by "jar". >> > >> > Eclipse + clojuredev seems capable of producing a very correct jar with >> what >> > you want : either just clojure source files, or clojure source files + >> > compiled class files, or just compiled class files. >> > No credit to clojuredev here : it's just the use of the out of the box >> > eclipse's "Export as jar" feature. >> > >> > But this jar would not be independent, and would still have to be >> launched >> > with also clojure.jar (and any other third party jar with clojure or >> java >> > code you depend on). >> > >> > I do not consider this a bad practice to have several jars, one for >> clojure, >> > one for your work ... >> > >> > I would even be tempted to consider it bad practice to embed clojure >> source >> > files/classes in your own jar :-). But I can see the advantage for quick >> > demos, though. >> > >> > Please also note that eclipse plays well with ant files, so a little ant >> > file in the root of your java project would solve the problem. >> > >> > I could consider adding such a file (if written in a generic enough way) >> to >> > every newly created clojure project. This could be interesting. >> > >> > HTH, >> > >> > -- >> > Laurent >> > >> > 2009/2/10 Rayne <disciplera...@gmail.com> >> > >> > >> > >> > > I'm not sure, I've never really used Eclipse that much, and I was >> > > wondering if it is possible. I can't see a way how, but maybe I'm >> > > missing something. >> > >> > > Sorry if this isn't quite the right place to post this, but I couldn't >> > > find another place. >> > >> > > Thanks -Rayne >> >> >> > > --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---