buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boisv...@apache.org
Subject svn commit: r1021832 - in /buildr/trunk: CHANGELOG lib/buildr/packaging/package.rb spec/java/packaging_spec.rb
Date Tue, 12 Oct 2010 16:41:44 GMT
Author: boisvert
Date: Tue Oct 12 16:41:44 2010
New Revision: 1021832

URL: http://svn.apache.org/viewvc?rev=1021832&view=rev
Log:
BUILDR-532 package_as_source does not package resources (Tammo van Lessen)

Modified:
    buildr/trunk/CHANGELOG
    buildr/trunk/lib/buildr/packaging/package.rb
    buildr/trunk/spec/java/packaging_spec.rb

Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=1021832&r1=1021831&r2=1021832&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Tue Oct 12 16:41:44 2010
@@ -14,6 +14,7 @@
 * Fixed:  BUILDR-526 Gracefully handle h2 sections with no id in documentation (Peter Donald)
 * Fixed:  BUILDR-527 package(:war) if libs passed are files (instead of artifacts)
 * Fixed:  BUILDR-528 Stop using deprecated method Gem::Dependency.version_requirements correctly
(Peter Donald)
+* Fixed:  BUILDR-532 package_as_source does not package resources (Tammo van Lessen)
 * Fixed:  JavaRebel was previously not correctly detected.
 
 1.4.2 (2010-09-18)

Modified: buildr/trunk/lib/buildr/packaging/package.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/packaging/package.rb?rev=1021832&r1=1021831&r2=1021832&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/packaging/package.rb (original)
+++ buildr/trunk/lib/buildr/packaging/package.rb Tue Oct 12 16:41:44 2010
@@ -237,7 +237,7 @@ module Buildr
 
     def package_as_sources(file_name) #:nodoc:
       ZipTask.define_task(file_name).tap do |zip|
-        zip.include :from=>compile.sources
+        zip.include :from=>[compile.sources, resources.target].compact
       end
     end
 

Modified: buildr/trunk/spec/java/packaging_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/java/packaging_spec.rb?rev=1021832&r1=1021831&r2=1021832&view=diff
==============================================================================
--- buildr/trunk/spec/java/packaging_spec.rb (original)
+++ buildr/trunk/spec/java/packaging_spec.rb Tue Oct 12 16:41:44 2010
@@ -1113,11 +1113,13 @@ describe Packaging, 'sources' do
     end
   end
 
-  it 'should contain source files' do
+  it 'should contain source and resource files' do
     write 'src/main/java/Source.java'
+    write 'src/main/resources/foo.properties', 'foo=bar'
     define('foo', :version=>'1.0') { package(:sources) }
     project('foo').task('package').invoke
     project('foo').packages.first.should contain('Source.java')
+    project('foo').packages.first.should contain('foo.properties')
   end
 
   it 'should be a ZipTask' do



Mime
View raw message