lib/java/packaging.rb in buildr-0.19.0 vs lib/java/packaging.rb in buildr-0.20.0
- old
+ new
@@ -63,11 +63,10 @@
end
protected
def create(zip) #:nodoc:
- zip.mkdir "META-INF"
meta_inf.map(&:to_s).uniq.each { |file| zip.add "META-INF/#{File.basename(file)}", file }
unless manifest == false
zip.file.open("META-INF/MANIFEST.MF", "w") do |output|
output.write MANIFEST_HEADER
if manifest
@@ -162,12 +161,10 @@
#
# The first argument declares the package type. For example, :jar to create a JAR file.
# The second argument provides additional options used when defining the package.
#
# The following options are supported by all package types:
- # * :file_name -- The package file name. By default it uses the artifact identifier,
- # version number and file type to create a file name (id-version.type).
# * :id -- The artifact identifier. By default, uses the project's #id property.
# * :group -- The group identifier. By default, uses the project's #group property.
# * :version -- The version number. By default, uses the project's #version property.
# * :classifier -- Artifact classifier. By default, the artifact has no classifier.
#
@@ -228,11 +225,11 @@
options = options.nil? ? {} : options.dup
options[:id] ||= self.id
options[:group] ||= self.group
options[:version] ||= self.version
options[:type] = type
- file_name = options[:file_name] || path_to("target", Artifact.hash_to_file_name(options))
+ file_name = path_to("target", Artifact.hash_to_file_name(options))
packager = method("package_as_#{type}") rescue
fail("Do not 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.
@@ -272,10 +269,10 @@
task "uninstall" do |task|
verbose(Rake.application.options.trace || false) do
[ installed, package.pom ].map(&:to_s).each { |file| rm file if File.exist?(file) }
end
end
- task("deploy") { deploy(installed, package.pom) }
+ task("deploy") { deploy(package, package.pom) }
# Add the package to the list of packages created by this project, and
# register it as an artifact. The later is required so if we look up the spec
# we find the package in the project's target directory, instead of finding it
# in the local repository and attempting to install it.