lib/buildr/ivy_extension.rb in ivy4r-0.11.1 vs lib/buildr/ivy_extension.rb in ivy4r-0.12.0

- old
+ new

@@ -185,10 +185,16 @@ # Cleans the ivy cache def cleancache ivy4r.cleancache end + + # Simple call to makepom with projects ivy.xml as input. + # The filename in target folder can be changed with the optional filename parameter + def makepom(filename = project.name.gsub(':', '_', + '.pom') + ivy4r.makepom :ivyfile => file, :pomfile => project.path_to(:target, filename) + end # Publishs the project as defined in ivy file if it has not been published already def __publish__ if @base_ivy @@ -674,10 +680,13 @@ desc 'Creates a dependency report for the project' task :report desc 'Clean the local Ivy cache and the local ivy repository' task :clean + + desc 'Creates default Maven POM for project from ivy.xml' + task :makepom desc 'Clean the local Ivy result cache to force execution of ivy targets' task :clean_result_cache desc 'Enable the local Ivy result cache by creating the marker file' @@ -730,10 +739,14 @@ end task :publish => "#{project.name}:ivy:resolve" do project.ivy.__publish__ end + + task :makepom => "#{project.name}:ivy:resolve" do + project.ivy.makepom + end end end end end @@ -772,9 +785,16 @@ task :publish => :package do info "Publishing all distinct ivy files" Buildr.projects.find_all{ |p| p.ivy.own_file? }.each do |project| project.task('ivy:publish').invoke + end + end + + task :makepom => :resolve do + info "Create Maven POMs for all projects with distinct ivy files" + Buildr.projects.find_all{ |p| p.ivy.own_file? }.each do |project| + project.task('ivy:makepom').invoke end end end class Buildr::Project # :nodoc: