hi,. I would like to add my comments on this
Mvnfile --- org.apache.solr:solr-solrj:3.5.0 org.apache.poi:poi:3.7 and using the patch from https://github.com/ANithian/bundler/commit/a29d4550dfb2f24372bf6e60f00e633ff92d5d64 (https://github.com/carlhuda/bundler/pull/1683) - at least as far as needed. to do the maven dependencies resolution after the call Bundler.setup I can easily setup next week. I am in an internet cafe in India right now. so all it needs is either a hook in Bundler or a way to do the same from with jruby (if that is at all possible). it will be close enough to current maven support for rubygems and good enough to start to the real thing, i.e. get it more bundler like: Mvnfile --- org.apache.solr:solr-solrj org.apache.poi:poi and the when there is no Mvnfile.lock you produce one (in a similar manner as bundler). or adding groups to the Mvnfile like bundler, getting a cli command to update one or all dependencies. or getting the whole maven code using "embedded" maven instead of parsing stdout, add repositories in DSL, etc again the first part I am happy to produce and it will have the same "quality" as the current maven support of rubygems. the second part to get it nice and shiny I am NOT the right person. I am driven by need and having the Mvnfile with versions would be just superb and resolves a lot of workarounds I need with the jruby-maven-plugins and ruby-maven. about the maven support of rubygems I have to mention that the last issues which came up with it I did not really follow up anymore (though I do not remember what it was) but overall I have the feeling it is the wrong path to follow - the code is messy, it is full of "special" case handling, there are plenty of maven artifacts around which do not work and will never work. version resolution of rubygems is incompatible with maven. and looking at the current bundler idea there is no need to go via rubygems and it is 100% maven compatible. with I use Mvnfile to declare my dependencies or a pom.xml they both use just maven to setup the classpath/classloader so I really want to dump the gemify-maven-plugin from the jruby-maven-plugins. I am happy to fix bugs when they are of a general nature, but these super special cases are usually really tricky. I am personally very excited about this bundler approach since it might be just a maven with a ruby DSL which can handle maven artifacts with version ranges in the same manner as bundler. i.e. it could be the bundler for maven. it can become a bridge between both worlds which you can go in both directions. regards, Kristian PS maybe we start the Mvnfile --- jar 'org.apache.solr:solr-solrj', '3.5.0' jar 'org.apache.poi:poi' ,'3.7' to have a DSL right away On Fri, Mar 30, 2012 at 7:08 PM, Rodrigo Rosenfeld Rosas <rr.ro...@gmail.com> wrote: > I'd love to see this completed until 1.7 release date, about May. > > But honestly, this requires a lot of energy for discussing some approach > with the Bundler team that would work for all of us in a sustainable way. > > Personally, I think it would be better to separate the Maven integration > concerns from the Bundler repository itself. We should define an API so that > we can keep working on the Maven integration as a separate gem that would be > used by Bundler through an API (I'm thinking in some hook here). > > So, it is not just about implementing some solution that works, but about > discussing the proper way to achieve it so that the JRuby community can make > progress on the Maven integration to Bundler in a fast pace instead of > depending on pull requests to be approved by the Bundler team which is > naturally more interested in Ruby related issues than on Java integration > ones. > > This can require a lot of time and having someone allocated by the GSoc > would help this getting traction. > > Personally, in the meanwhile I'm using this solution right now while making > some experiments with a JRuby on Rails project. > > I've created some files in the root of my project: > > Mvnfile > --- > #org.apache.solr:solr-solrj:3.5.0 > org.apache.poi:poi:3.7 > --- > > pom.xml.template > --- > <project> > <modelVersion>4.0.0</modelVersion> > <groupId>ignore</groupId> > <artifactId>ignore</artifactId> > <version>1</version> > <dependencies> > <%= dependencies %> > </dependencies> > </project> > --- > > resolve-maven-dependencies.sh > --- > #!/bin/bash > source $HOME/.rvm/scripts/rvm > source .rvmrc > # optionally we can run bundle too from here > # bundle > rvm 1.9.3 > ruby generate-pom.rb > rm -rf lib/mvn > mvn -DoutputDirectory=lib/mvn/ dependency:copy-dependencies > --- > > .rvmrc > --- > rvm jruby@my_application --create > --- > > generate-pom.rb > --- > require 'erb' > > dependencies = '' > File.read('Mvnfile').each_line do |dep| > dep = dep.chomp.strip > next if dep.empty? || dep.start_with?('#') > group, artifactId, version = dep.split ':' > dependencies += " > <dependency> > <groupId>#{group}</groupId> > <artifactId>#{artifactId}</artifactId> > <version>#{version}</version> > </dependency> > " > end > > File.write 'pom.xml', ERB.new(File.read('pom.xml.template')).result(binding) > --- > > config/initializers/0-add-maven-dependencies-to-classpath.rb > --- > if RUBY_PLATFORM == 'java' > require 'java' # not actually needed, but better to be explicit about it > Dir["#{Rails.root}/lib/mvn/*.jar"].each{|f| require f} > end > --- > > This is working for me and I don't have any problems with this setup. My > only concern is that someone deciding between JRuby on Rails and Grails will > find their integration to Maven much simpler. > > Best, > Rodrigo. > > Em 30-03-2012 09:31, Charles Oliver Nutter escreveu: > >> My primary concern is that we had really hoped to have the >> maven/rubygems/bundler support *finalized* for JRuby 1.7, which will >> preview in May for JRubyConf. The final release schedule isn't >> decided, but it will certainly be long before the end of summer... >> >> Is that unreasonable? We're talking about preview in a bit over a >> month and a half. >> >> We also want time for people to test the capability. Is this too big a >> thing to "add" or "fix" in a 1.7.x release? >> >> I have no objection to this being a GSoC project in general...it's >> just timeframes that concern me. >> >> - Charlie >> >> On Fri, Mar 30, 2012 at 5:35 AM, kristian<m.krist...@web.de> wrote: >>> >>> so I just put it briefly: >>> >>> there is a demand to get bundler with maven artifact integration. >>> >>> I am happy to help supervising such a project (with the help and input >>> of other on certain issue of course) >>> >>> so for me the question is how does could this materialize ? >>> >>> I could register myself as GSoC mentor and then what ? >>> >>> regards, >>> Kristian >>> >>> On Fri, Mar 30, 2012 at 1:46 AM, Charles Oliver Nutter >>> <head...@headius.com> wrote: >>>> >>>> Sorry I have been absent...out of town halfway around the world... >>>> >>>> I'm here to answer any questions about GSoC, for which student >>>> proposals end NEXT WEEK... >>>> >>>> So fire away with any remaining questions and we'll try to get all >>>> answered! >>>> >>>> - Charlie >>>> > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email