lib/maven/tools/dsl.rb in maven-tools-1.0.4 vs lib/maven/tools/dsl.rb in maven-tools-1.0.5

- old
+ new

@@ -284,16 +284,17 @@ end end private :setup_gem_support def setup_jruby( jruby, jruby_scope = :provided ) + warn "deprecated: use jruby DSL directly" jruby ||= VERSIONS[ :jruby_version ] - if jruby.match( /-SNAPSHOT/ ) != nil - snapshot_repository( 'http://ci.jruby.org/snapshots/maven', - :id => 'jruby-snapshots' ) - end + # if jruby.match( /-SNAPSHOT/ ) != nil + # snapshot_repository( 'http://ci.jruby.org/snapshots/maven', + # :id => 'jruby-snapshots' ) + # end scope( jruby_scope ) do if ( jruby < '1.6' ) raise 'jruby before 1.6 are not supported' elsif ( jruby < '1.7' ) warn 'jruby version below 1.7 uses jruby-complete' @@ -317,32 +318,28 @@ unless file.is_a?( Maven::Tools::Jarfile ) file = Maven::Tools::Jarfile.new( ::File.expand_path( file ) ) end if options[ :skip_locked ] or not file.exists_lock? - file.populate_unlocked do |dsl| - jarfile_dsl( dsl ) - dsl.artifacts.each do |a| - _dependency a - end - end + dsl = file.setup_unlocked( @current ) + # TODO this setup should be partly part of Jarfile + jarfile_dsl( dsl ) else file.locked.each do |dep| artifact( dep ) end file.populate_unlocked do |dsl| + dsl = file.setup_locked( @current ) + # TODO this setup should be partly part of Jarfile jarfile_dsl( dsl ) - dsl.artifacts.each do |a| - if a[ :system_path ] - dependeny a - end + dsl.parent.dependencies.each do |d| + @current.dependencies << d if d.system_path end end end end def jarfile_dsl( dsl ) - setup_jruby( dsl.jruby ) dsl.repositories.each do |r| repository r.merge( {:id => r[:name] } ) end dsl.snapshot_repositories.each do |r| snapshot_repository r.merge( {:id => r[:name] } )