buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From as...@apache.org
Subject svn commit: r610286 - in /incubator/buildr/trunk: doc/pages/packaging.textile lib/java/packaging.rb spec/java_packaging_spec.rb
Date Wed, 09 Jan 2008 07:20:05 GMT
Author: assaf
Date: Tue Jan  8 23:20:04 2008
New Revision: 610286

URL: http://svn.apache.org/viewvc?rev=610286&view=rev
Log:
On second thought, dirs is better than map

Modified:
    incubator/buildr/trunk/doc/pages/packaging.textile
    incubator/buildr/trunk/lib/java/packaging.rb
    incubator/buildr/trunk/spec/java_packaging_spec.rb

Modified: incubator/buildr/trunk/doc/pages/packaging.textile
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/doc/pages/packaging.textile?rev=610286&r1=610285&r2=610286&view=diff
==============================================================================
--- incubator/buildr/trunk/doc/pages/packaging.textile (original)
+++ incubator/buildr/trunk/doc/pages/packaging.textile Tue Jan  8 23:20:04 2008
@@ -314,14 +314,14 @@
 and Application Client components under @/jar@.
 
 If you want to place components in different locations you can do so using the
-@:path@ option, or by specifying a different mapping between component type and
-its path.  The following two examples are equivalent:
+@:path@ option, or by specifying a different mapping between component types
+and their destination directory.  The following two examples are equivalent:
 
 {{{!ruby
 # Specify once per component.
 package(:ear).add project('coolWebService').package(:war), :path=>'coolServices'
 # Configure once and apply to all added components.
-package(:ear).map[:war] = 'coolServices'
+package(:ear).dirs[:war] = 'coolServices'
 package(:ear) << project('coolWebService').package(:war)
 }}}
 

Modified: incubator/buildr/trunk/lib/java/packaging.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/java/packaging.rb?rev=610286&r1=610285&r2=610286&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/java/packaging.rb (original)
+++ incubator/buildr/trunk/lib/java/packaging.rb Tue Jan  8 23:20:04 2008
@@ -279,11 +279,11 @@
         # The display-name entry for application.xml
         attr_accessor :display_name
         # Map from component type to path inside the EAR.
-        attr_accessor :map
+        attr_accessor :dirs
 
         def initialize(*args)
           super
-          @map = Hash.new { |h, k| k.to_s }
+          @dirs = Hash.new { |h, k| k.to_s }
           @libs, @components = [], []
           prepare do
             @components.each do |component|
@@ -311,7 +311,7 @@
 
           component = options.merge(:artifact=>artifact, :type=>type,
             :id=>artifact.respond_to?(:to_spec) ? artifact.id : artifact.to_s.pathmap('%n'),
-            :path=>options[:path] || map[type].to_s)
+            :path=>options[:path] || dirs[type].to_s)
           file(artifact.to_s).enhance do |task|
             task.enhance { |task| update_classpath(task.name) }
           end unless :lib == type

Modified: incubator/buildr/trunk/spec/java_packaging_spec.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/java_packaging_spec.rb?rev=610286&r1=610285&r2=610286&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/java_packaging_spec.rb (original)
+++ incubator/buildr/trunk/spec/java_packaging_spec.rb Tue Jan  8 23:20:04 2008
@@ -673,7 +673,7 @@
 
   it 'should accept customization of directory map' do
     define 'foo', :version=>'1.0' do
-      package(:ear).map[:jar] = 'jarred'
+      package(:ear).dirs[:jar] = 'jarred'
       package(:ear).add :jar=>package(:jar)
     end
     inspect_ear { |files| files.should include('jarred/foo-1.0.jar') }
@@ -681,7 +681,7 @@
 
   it 'should accept customization of directory map with nil paths in application.xml' do
     define 'foo', :version=>'1.0' do
-      package(:ear).map[:war] = nil
+      package(:ear).dirs[:war] = nil
       package(:ear).add :war=>package(:war)
       package(:ear).add package(:jar)
     end
@@ -693,7 +693,7 @@
 
   it 'should accept customization of directory map with nil paths in the classpath' do
     define 'foo', :version=>'1.0' do
-      package(:ear).map[:lib] = nil
+      package(:ear).dirs[:lib] = nil
       package(:ear).add :war=>package(:war)
       package(:ear) << package(:jar)
     end



Mime
View raw message