lib/java/packaging.rb in buildr-0.22.0 vs lib/java/packaging.rb in buildr-1.0.0

- old
+ new

@@ -238,11 +238,11 @@ packager = method("package_as_#{type}") rescue fail("Don't know how to create a package of type #{type}") packager.call(file_name, options) do |package| # Make it an artifact using the specifications, and tell it how to create a POM. package.extend ActsAsArtifact - package.send :apply_spec, options + package.send :apply_spec, Hash[*Artifact::ARTIFACT_ATTRIBUTES.map { |k| [ k,options[k]] }.flatten] # Another task to create the POM file. pom_spec = package.to_spec_hash.merge(:type=>:pom) pom = file(Buildr.repositories.locate(pom_spec)) pom.extend ActsAsArtifact pom.send :apply_spec, pom_spec @@ -308,11 +308,11 @@ protected def package_as_jar(file_name, options) #:nodoc: unless Rake::Task.task_defined?(file_name) - fu_check_options options, *PACKAGE_OPTIONS + [:manifest, :meta_inf, :include] + rake_check_options options, *PACKAGE_OPTIONS + [:manifest, :meta_inf, :include] Java::Packaging::JarTask.define_task(file_name).tap do |jar| jar.manifest = options.has_key?(:manifest) ? options[:manifest] : manifest jar.meta_inf = options[:meta_inf] || meta_inf if options[:include] jar.include options[:include] @@ -321,18 +321,18 @@ enhance { jar.include compile.target, :as=>"." } end yield jar end else - fu_check_options options, *PACKAGE_OPTIONS + rake_check_options options, *PACKAGE_OPTIONS end file(file_name) end def package_as_war(file_name, options) #:nodoc: unless Rake::Task.task_defined?(file_name) - fu_check_options options, *PACKAGE_OPTIONS + [:manifest, :meta_inf, :classes, :libs, :include] + rake_check_options options, *PACKAGE_OPTIONS + [:manifest, :meta_inf, :classes, :libs, :include] Java::Packaging::WarTask.define_task(file_name).tap do |war| war.manifest = options.has_key?(:manifest) ? options[:manifest] : manifest war.meta_inf = options[:meta_inf] || meta_inf # Add libraries in WEB-INF lib, and classes in WEB-INF classes if options[:classes] @@ -354,25 +354,25 @@ war.include path_to("src/main/webapp"), :as=>"." end yield war end else - fu_check_options options, *PACKAGE_OPTIONS + rake_check_options options, *PACKAGE_OPTIONS end file(file_name) end def package_as_zip(file_name, options) #:nodoc: unless Rake::Task.task_defined?(file_name) - fu_check_options options, *PACKAGE_OPTIONS + [:include] + rake_check_options options, *PACKAGE_OPTIONS + [:include] ZipTask.define_task(file_name).tap do |zip| if options[:include] zip.include options[:include] end yield zip end else - fu_check_options options, *PACKAGE_OPTIONS + rake_check_options options, *PACKAGE_OPTIONS end file(file_name) end end