lib/maven/tools/dsl.rb in maven-tools-1.0.0.rc3 vs lib/maven/tools/dsl.rb in maven-tools-1.0.0.rc4
- old
+ new
@@ -355,11 +355,13 @@
end
spec.licenses.each do |l|
license( l )
end
- spec.authors.zip( spec.email || [] ).each do |d|
+ authors = [ spec.authors || [] ].flatten
+ emails = [ spec.email || [] ].flatten
+ authors.zip( emails ).each do |d|
developer( :name => d[0], :email => d[1] )
end
unless options[ :only_metadata ]
packaging 'gem'
extension 'de.saumya.mojo:gem-extension:${jruby.plugins.version}'
@@ -523,12 +525,16 @@
fill_options( relocation, options )
nested_block( :relocation, relocation, block ) if block
@current.relocation = relocation
end
- def system( arg )
- @current.system = arg
+ def system( *args )
+ if @current && @current.respond_to?( :system )
+ @current.system = args[ 0 ]
+ else
+ Kernel.system( *args )
+ end
end
def notifier( *args, &block )
n = Notifier.new
args, options = args_and_options( *args )
@@ -1300,12 +1306,18 @@
c = options.delete( 'releases' ) if c.nil?
unless c.nil?
r.releases = repository_policy( r.releases, c )
end
end
- r.id = args[ 0 ]
- r.url = args[ 1 ]
- r.name = args[ 2 ]
+ if options.size == 1 && args.size == 1
+ warn "deprecated repository, use :url => '...'"
+ # allow old method signature
+ r.url = args[ 0 ]
+ else
+ r.id = args[ 0 ]
+ r.url = args[ 1 ]
+ r.name = args[ 2 ]
+ end
fill_options( r, options )
nested_block( :repository, r, block ) if block
case method
when :plugin
@current.plugin_repositories << r