Hi, On Fri, Mar 13, 2015 at 7:05 PM, Tammo van Lessen <[email protected]> wrote: > I also ask about the problems they experience with Buildr, since for me in > most cases it just works. The main complaint is that Buildr is difficult to > get installed and started with.
I have heard roughly the same. The other thing that is usually mentioned is that it is ruby and they don't know ruby. However ... after a few weeks they like that it is ruby :) > What I'd like to discuss is whether or how we could improve this situation. > I think the Gradle team found a neat way to approach this topic with their > "gradle wrapper". This is a combination of sh/batch files along with a tiny > jar that is capable to download gradle into the working copy. This allows > to bootstrap the build with only Java as a prerequisite and is added to > version control. > > I think having something similar would significantly improve the > "occasional user experience". > > Would you agree up to this point? 100% > If so, I wonder what would be the easiest and Buildr/Ruby-ish way to get to > such a solution, since Buildr is somewhat different to Gradle regarding its > dependencies. For instance I usually use a Gemfile to define the required > Buildr version and additional dependencies. I often wonder how many additional dependencies people really use. For the majority of users I expect they use no other dependencies other than those that are transitively available via Buildr. > I think a usable approach could be to have a similar wrapper jar that just > downloads a stable jruby (version configurable) from Maven Central, > deflates its to a .buildr/jruby directory within the working copy and then > run jruby in jailed fashion (to make sure that Buildr and deps are > installed into this directory in the working copy), invoking bundler and > finally buildr. > > Do you think thats feasible and worth the effort? Are there additional > corner cases to address? Do you have some experience in mixing Java and > Ruby code for such a launcher? They way I have envisioned doing this in the past is to try and package jruby+buildr+dependencies into a single jar file. In the past I have seen logstash do this and they also added a bunch of monkey patches that made the jruby runtime significantly faster for all the dependencies included in the jar. Their install experience was simply to download a jar and run it. Trying logstash was really really easy. I did try to initiate this with Buildr [1] but did not have cycles to follow through with it. If we could do this then the wrapper would be able to simply download the jar and run it. That would be my preference but I would be happy with any approach. I definitely think it is an approach worth pursuing and will try to help out. [1] https://issues.apache.org/jira/browse/BUILDR-658 -- Cheers, Peter Donald
