lib/maven/tools/jarfile.rb in maven-tools-1.0.5 vs lib/maven/tools/jarfile.rb in maven-tools-1.0.6

- old
+ new

@@ -31,10 +31,11 @@ def initialize(file = 'Jarfile') @file = file @lockfile = file + ".lock" end + attr_reader :file def mtime ::File.mtime(@file) end @@ -164,20 +165,22 @@ @d ||= [] end end def setup_unlocked( parent ) - Maven::Tools::DSL::Jarfile.new( @file, parent ) + warn 'DEPRECATED use Maven::Tools::DSL::Jarfile instead' + Maven::Tools::DSL::Jarfile.new( parent, @file ) end def setup_locked( parent ) - Maven::Tools::DSL::Jarfile.new( @file, LockedParent.new( parent ) ) + warn 'DEPRECATED use Maven::Tools::DSL::Jarfile instead' + Maven::Tools::DSL::Jarfile.new( LockedParent.new( parent ), @file ) end def populate_unlocked( container = nil, &block ) + warn 'DEPRECATED use Maven::Tools::DSL::Jarfile instead' if ::File.exists?(@file) - dsl = Maven::Tools::DSL::Jarfile.new( @file ) - #dsl.eval_file( @file ) + dsl = Maven::Tools::DSL::Jarfile.new( nil, @file ) if block block.call( dsl ) end # TODO all that container stuff needs to go into jbundler !!!