Looks like a documentation bug. It should be Project.local_task :foo http://buildr.apache.org/rdoc/classes/Buildr/Project.html#M000580
alex On Mon, Jan 11, 2010 at 8:05 PM, Nicholas Andrews <[email protected]> wrote: > Hi! > > The quick start at: > > http://buildr.apache.org/quick_start.html > > gives an example using local_task :run to avoid having use a fully > qualified name at the command line to run. I tried to do the same in > my project: > > # Let run be called without the fully qualified name > local_task :run > > define 'buildr_test' do > > project.version = '0.0.1' > compile.with 'org.scala-lang:scala-library:jar:2.7.7' > compile.with 'org.scalanlp:scalala:jar:0.2.2-iesl' > compile.with 'org.scala-tools.testing:specs:jar:1.6.0' > compile.with 'cc.factorie:factorie:jar:0.8.0' > project.group = GROUP > manifest['Implementation-Vendor'] = COPYRIGHT > package :jar > > task :run => :compile do > system 'java -cp target/classes cc.factorie.example.LogicDemo1' > end > end > > But this results in an error: > > (in /export/projects/tto4/miniSCALE/NLIE/src/buildr_test, development) > Buildr aborted! > undefined method `local_task' for main:Object > /export/projects/tto4/miniSCALE/NLIE/src/buildr_test/buildfile:23 > > /usr/lib64/ruby/gems/1.8/gems/buildr-1.3.5/lib/buildr/core/application.rb:398:in > `raw_load_buildfile' > > /usr/lib64/ruby/gems/1.8/gems/buildr-1.3.5/lib/buildr/core/application.rb:218:in > `load_buildfile' > > /usr/lib64/ruby/gems/1.8/gems/buildr-1.3.5/lib/buildr/core/application.rb:213:in > `load_buildfile' > > Am I doing something wrong? > > Cheers, > Nick >
