You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by to...@apache.org on 2010/04/10 18:20:02 UTC
svn commit: r932753 - /buildr/trunk/spec/java/packaging_spec.rb
Author: toulmean
Date: Sat Apr 10 16:20:02 2010
New Revision: 932753
URL: http://svn.apache.org/viewvc?rev=932753&view=rev
Log:
fix for BUILDR-422 Make sure MANIFEST.MF is the first entry of the jar
Modified:
buildr/trunk/spec/java/packaging_spec.rb
Modified: buildr/trunk/spec/java/packaging_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/java/packaging_spec.rb?rev=932753&r1=932752&r2=932753&view=diff
==============================================================================
--- buildr/trunk/spec/java/packaging_spec.rb (original)
+++ buildr/trunk/spec/java/packaging_spec.rb Sat Apr 10 16:20:02 2010
@@ -410,6 +410,15 @@ describe Packaging, 'jar' do
it_should_behave_like 'package with meta_inf'
before { @meta_inf_ignore = 'MANIFEST.MF' }
+ it 'should place the manifest as the first entry of the file' do
+ write 'src/main/java/Test.java', 'class Test {}'
+ define('foo', :version=>'1.0') { package(:jar) }
+ project('foo').package(:jar).invoke
+ Zip::ZipFile.open(project('foo').package(:jar).to_s) do |jar|
+ jar.entries.map(&:to_s).first.should == 'META-INF/MANIFEST.MF'
+ end
+ end
+
it 'should use files from compile directory if nothing included' do
write 'src/main/java/Test.java', 'class Test {}'
define('foo', :version=>'1.0') { package(:jar) }