Daniel Jomphe wrote: > Rich Hickey wrote: > > I don't mind the build producing clojure-1.0.0.jar etc, but it doesn't > > now. The master build is Ant. Where is the best place to put the > > version info so it can be leveraged by Ant, Maven and the clojure core > > runtime in order to produce *clojure-version* ? > > > What changes are needed to the build scripts to produce version- > > numbered jars? > > Since Java is so much geared towards properties files, I suppose a > "version.properties" file would ease integration with each build tool. > > *Ant* could easily fetch what it needs from the props file. Not sure > how one does it though. > *Maven*: if I remember well from my experience, the version of the > maven artifact couldn't be populated dynamically. If it could, the > props file would be one of the closest things to help make it work. > *Clojure runtime* could easily populate its *clojure-version* on > startup from the props file. > > That said, if the "dynamic fetching from a props file" approach isn't > workable, an easier approach would be filling a few holes on pre-build > time, using a script that calls to a template engine like > StringTemplate, to inject the version as needed, where needed. Of > course, this sounds ugly, especially considering it would be alien to > automated tools like IDEs and etc. > > Let's hope someone knows better than I do.
BTW, the most common approach I've seen to this problem is "capitulate; let's just manually hard-code the version in the three places; anyways, we won't have to change it often". --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---