The latest release of LockJar has made vast improvements on how Jars are organized and loaded. https://github.com/mguymon/lock_jar Some Mavenisms were traded in for Bundlerisms, in particular scopes were swapped out for groups. This made is possible to experiment with integrating with Bundler. Take the following example Jarfile, with the only difference from the previous DSL is group instead of scope. repository 'http://mirrors.ibiblio.org/pub/mirrors/maven2' jar "org.apache.mina:mina-core:2.0.4" pom 'spec/pom.xml' group 'development' do jar 'com.typesafe:config:jar:0.5.0' end group 'test' do jar 'junit:junit:jar:4.10' end This will product a Jarfile.lock[1] that has a list of dependencies per group, but also a graph of the transitive dependencies. This will allow you to see what Jars are required per group and were they are coming from. Previously scopes were resolved independently, which made it possible to have conflicts when loading multiple scopes. This is done away with in 0.7.1, now the entire set of Jars is resolved and than separated into groups. This means groups can be loaded piecemeal, without fear of conflicts. There is also a registry, to prevent loading duplicates of a jar or Jarfile.lock. In addition, I have started tinkering around with Bundler support again. Now you simply have to require 'lock_jar/bundler' and a Jarfile.lock will be generated from bundle install and bundle update. Any gems defined in the Gemfile that contain a Jarfile will get merged with the local Jarfile to produce the Jarfile.lock. When Bundler.require(groups) or Bundler.setup(groups) is called, the dependencies from the corresponding groups in the Jarfile.lock are loaded. The Bundler support works by directly patching Bundler[1], so I still consider it fairly experimental. While it was fun tinkering around with Bundler, I suspect there is not a huge need for it. If this feature is useful to someone, I would love to get some feedback. I would like to send a shout out to Kristian. We had a fairly in depth discussion about how to handle dependencies for JRuby. While we never quite found the perfect solution for combining jbundler + lock_jar, a lot of good ideas spawned from the collaboration. [1] https://gist.github.com/3903783 [2] https://github.com/mguymon/lock_jar/blob/master/li... thanks, Michael
on 2012-10-17 07:37
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.