lib/jbundler/executable_pom.rb in jbundler-0.5.5 vs lib/jbundler/executable_pom.rb in jbundler-0.6.0
- old
+ new
@@ -19,11 +19,10 @@
File.join( jworkdir, BOOTSTRAP ) )
def jruby_home( path )
File.join( 'META-INF/jruby.home/lib/ruby/gems/shared', path )
end
-
jfile.locked.each do |dep|
artifact( dep )
end
@@ -52,22 +51,16 @@
'tesla.dump.pom' => 'pom.xml',
'project.build.sourceEncoding' => 'utf-8' )
jfile.populate_unlocked do |dsl|
- # setup jruby version
- jruby_version = dsl.jruby || JRUBY_VERSION
- if ( jruby_version < '1.6' )
- raise 'jruby before 1.6 are not supported'
- elsif ( jruby_version < '1.7' )
- warn 'jruby version below 1.7 uses jruby-complete'
- jar 'org.jruby:jruby-complete', jruby_version
- elsif ( jruby_version < '1.7.5' )
- jar 'org.jruby:jruby-core', jruby_version
- else
- jar 'org.jruby:jruby', jruby_version
+ setup_jruby( dsl.jruby || JRUBY_VERSION, :compile )
+ dsl.artifacts.select do |a|
+ a[ :scope ] == :provided
+ end.each do |a|
+ a[ :scope ] = :compile
+ artifact( a )
end
-
local = dsl.artifacts.select do |a|
a[ :system_path ]
end
# setup a localrepo for the local jars if needed