buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rhett Sutphin <rh...@detailedbalance.net>
Subject Re: Flag this message Error trying to initialize Antwrap's Antproject
Date Thu, 12 Feb 2009 00:24:06 GMT
Hi Watt,

On Feb 11, 2009, at 6:17 PM, Watt Poosanguansit wrote:

> I am new to buildr.  I am trying to have my script build exisiting  
> code.  I have ant tasks that I need to invoke.  As soon as I add in  
> the Antwrap code:
>
>
> @ant = AntProject.new()


You can use Antwrap via buildr's "ant" helper:

ant('some_name') do |antp|
   # antp is an AntProject instance
   # Do whatever you need with it
end

If you want to use AntProject directly, you'll either need to include  
the Antwrap module first:

include Antwrap

Or refer to it including its module name:

@ant = Antwrap::AntProject.new

Rhett

On Feb 11, 2009, at 6:17 PM, Watt Poosanguansit wrote:

> I am new to buildr.  I am trying to have my script build exisiting  
> code.  I have ant tasks that I need to invoke.  As soon as I add in  
> the Antwrap code:
>
>
> @ant = AntProject.new()
>
> I get this error
>
> [Failed] Your build failed with an error: C:/Program Files/eclipse/ 
> workspace/project:
> uninitialized constant AntProject
> buildr aborted!
> ←[31muninitialized constant AntProject←[0m
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:2237:in  
> `const_missing'
> C:/Program Files/eclipse/workspace/TMYSWeb/buildfile:50
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> project.rb:225:in `i
> nstance_eval'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> project.rb:225:in `d
> efine'
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> project.rb:623:in `e
> xecute'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:190:i
> n `switch_to_namespace'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> project.rb:622:in `e
> xecute'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:482:i
> n `invoke_with_call_chain'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:468:i
> n `synchronize'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:468:i
> n `invoke_with_call_chain'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:463:i
> n `invoke'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/util.rb: 
> 168:in `__se
> nd__'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/util.rb: 
> 168:in `to_p
> roc'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> project.rb:280:in `e
> ach'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> project.rb:280:in `p
> rojects'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> project.rb:861:in `p
> rojects'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> project.rb:868
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:482:i
> n `invoke_with_call_chain'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:468:i
> n `synchronize'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:468:i
> n `invoke_with_call_chain'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:463:i
> n `invoke'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:169:i
> n `run'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:321:i
> n `standard_exception_handling'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:161:i
> n `run'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/bin/buildr:20
> C:/Ruby/bin/buildr:19:in `load'
> C:/Ruby/bin/buildr:19
>
> C:\Program Files\eclipse\workspace\TMYSWeb>buildr > log.txt
> buildr aborted!
> uninitialized constant AntProject
> C:/Program Files/eclipse/workspace/TMYSWeb/buildfile:50
> (See full trace by running task with --trace)
>
> C:\Program Files\eclipse\workspace\TMYSWeb>buildr > log.txt
> buildr aborted!
> uninitialized constant AntProject
> C:/Program Files/eclipse/workspace/TMYSWeb/buildfile:50
> (See full trace by running task with --trace)
>
> C:\Program Files\eclipse\workspace\TMYSWeb>buildr --trace > log.txt
> buildr aborted!
> uninitialized constant AntProject
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:2237:in  
> `const_missing'
> C:/Program Files/eclipse/workspace/TMYSWeb/buildfile:50
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> project.rb:225:in `i
> nstance_eval'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> project.rb:225:in `d
> efine'
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> project.rb:623:in `e
> xecute'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:190:i
> n `switch_to_namespace'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> project.rb:622:in `e
> xecute'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:482:i
> n `invoke_with_call_chain'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:468:i
> n `synchronize'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:468:i
> n `invoke_with_call_chain'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:463:i
> n `invoke'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/util.rb: 
> 168:in `__se
> nd__'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/util.rb: 
> 168:in `to_p
> roc'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> project.rb:280:in `e
> ach'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> project.rb:280:in `p
> rojects'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> project.rb:861:in `p
> rojects'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> project.rb:868
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'
> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:482:i
> n `invoke_with_call_chain'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:468:i
> n `synchronize'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:468:i
> n `invoke_with_call_chain'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:463:i
> n `invoke'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:169:i
> n `run'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:321:i
> n `standard_exception_handling'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/lib/buildr/core/ 
> application.rb:161:i
> n `run'
> C:/Ruby/lib/ruby/gems/1.8/gems/buildr-1.3.3/bin/buildr:20
> C:/Ruby/bin/buildr:19:in `load'
> C:/Ruby/bin/buildr:19
>
> I am really at a lost.  I googled but nothing came up.  Also I would  
> appreciate if anyone can demonstrate how to use Antwrap in buildr as  
> well.  Again, I googled and nothing showed up at all.
>
>
> Thanks,
>
>
>
> W.P.
>
>
>
>
>
>


Mime
View raw message