lib/maven/tools/dsl.rb in maven-tools-0.34.3 vs lib/maven/tools/dsl.rb in maven-tools-0.34.4

- old
+ new

@@ -183,21 +183,28 @@ end private :setup_gem_support def setup_jruby( jruby, jruby_scope = :provided ) jruby ||= VERSIONS[ :jruby_version ] + + if jruby.match( /-SNAPSHOT/ ) != nil + snapshot_repository( 'http://ci.jruby.org/snapshots/maven', + :id => 'jruby-snapshots' ) + end scope( jruby_scope ) do - if ( jruby < '1.7' ) + if jruby < '1.7' warn 'jruby version below 1.7 uses jruby-complete' jar 'org.jruby:jruby-core', jruby - elsif ( jruby < '1.7.5' ) + elsif jruby.sub( /1\.7\./, '').to_i < 5 jar 'org.jruby:jruby-core', jruby - else - jar 'org.jruby:jruby-noasm', jruby + elsif jruby =~ /-no_asm$/ + pom 'org.jruby:jruby-noasm', jruby.sub( /-no_asm$/, '' ) + else + pom 'org.jruby:jruby', jruby end end end - private :setup_jruby + #private :setup_jruby def jarfile( file = 'Jarfile', options = {} ) if file.is_a? Hash options = file file = 'Jarfile'