You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by bo...@apache.org on 2010/01/12 17:00:05 UTC

svn commit: r898394 - /buildr/trunk/doc/quick_start.textile

Author: boisvert
Date: Tue Jan 12 16:00:05 2010
New Revision: 898394

URL: http://svn.apache.org/viewvc?rev=898394&view=rev
Log:
local_task -> Project.local_task

Modified:
    buildr/trunk/doc/quick_start.textile

Modified: buildr/trunk/doc/quick_start.textile
URL: http://svn.apache.org/viewvc/buildr/trunk/doc/quick_start.textile?rev=898394&r1=898393&r2=898394&view=diff
==============================================================================
--- buildr/trunk/doc/quick_start.textile (original)
+++ buildr/trunk/doc/quick_start.textile Tue Jan 12 16:00:05 2010
@@ -169,7 +169,7 @@
 define 'killer-app' do
   project.version = '0.1.0'
   package :jar
-  
+
   task :run => :compile do
     system 'java -cp target/classes org.apache.killer.Main'
   end
@@ -185,13 +185,13 @@
 This works, but it's clumsy.  The reason we had to give the "@killer-app:@" prefix is because we defined the @run@ task _within_ our project, rather than outside of the @define@ block.  However, if we define @run@ outside of the project, then we don't really have access to the @compile@ task (which is project-specific).  The solution here is a bit of magic known as @local_task@.  This is how tasks like @compile@ and @test@, which are technically project-specific (think: instance methods) can be invoked without the fully-qualified project name:
 
 {% highlight ruby %}
-local_task :run
+Project.local_task :run
 
 define 'killer-app' do
   project.version '0.1.0'
-  
+
   package :jar
-  
+
   task :run => :compile do
     system 'java -cp target/classes org.apache.killer.Main'
   end