buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Duncan" <stephen.dun...@gmail.com>
Subject Re: [buildr] Using the group statement
Date Sun, 03 Feb 2008 20:54:41 GMT
Yeah, I just realized what the problem was, as I hit it myself.  You can
also use Buildr::group.  So, for example:

define "spike" do
 JETTY = Buildr::group("jetty", "jetty-util", "servlet-api-2.5",
:under=>"org.mortbay.jetty", :version=>"6.1.7")
 compile.with JETTY
end

-Stephen

On Feb 3, 2008 3:40 PM, Assaf Arkin <arkin@intalio.com> wrote:

> Each project has a group attribute, so when you call group on the project,
> you're accessing that attribute, not the group method.  You can use the
> group method from outside the project definition.
>
> Assaf
>
> On 2/3/08, Antoine Contal <antoine.contal@gmail.com> wrote:
> >
> > Ok. I guess it means it is a defect that was fixed in the trunk. I
> > will just wait for the 1.3.0 release before using the group statement
> > in that case.
> >
> > Thank you for your help.
> >
> > antoine
> >
> > On Feb 3, 2008 3:43 PM, Stephen Duncan <stephen.duncan@gmail.com> wrote:
> > > Ok, sorry.  I've been testing against trunk (1.3.0).  I thought the
> > :type =>
> > > 'jar' was necessary, but it turns out it isn't anyway.
> > >
> > > -Stephen
> > >
> > >
> > > On Feb 3, 2008 9:26 AM, Antoine Contal <antoine.contal@gmail.com>
> wrote:
> > >
> > > > Hi Stephen,
> > > >
> > > > I tried to add :type=>"jar", but it failed anyway.
> > > >
> > > > $ cat buildfile
> > > > define "spike" do
> > > >  JETTY = group("jetty", "jetty-util", "servlet-api-2.5",
> > > > :under=>"org.mortbay.jetty", :version=>"6.1.7", :type=>"jar")
> > > >  compile.with JETTY
> > > > end
> > > >
> > > > $ buildr
> > > > (in /home/l/code/buildr/bug_in_group)
> > > > Building spike
> > > > rake aborted!
> > > > Don't know how to build task
> '/home/l/code/buildr/bug_in_group/spike'
> > > >
> > > > (See full trace by running task with --trace)
> > > >
> > > > FWIW, I am using Buildr 1.2.10, rjb 1.1.1, ruby 1.8.6, Sun java
> > > > 1.5.0_11 and linux 2.6.22.
> > > >
> > > > antoine
> > > >
> > > > On Feb 3, 2008 3:17 PM, Stephen Duncan <stephen.duncan@gmail.com>
> > wrote:
> > > > > Add :type => 'jar' to the group statement.
> > > > >
> > > > > -Stephen
> > > > >
> > > > >
> > > > > On Feb 3, 2008 7:31 AM, Antoine Contal <antoine.contal@gmail.com>
> > wrote:
> > > > >
> > > > > > Hi buildr folks!
> > > > > >
> > > > > > I am puzzled and I would like some help. I do not understand
how
> > to
> > > > > > use the group statement.
> > > > > >
> > > > > > With the following buildfile, everything works fine.
> > > > > >
> > > > > > define "spike" do
> > > > > >  JETTY = artifacts("org.mortbay.jetty:jetty:jar:6.1.7",
> > > > > >                    "org.mortbay.jetty:jetty-util:jar:6.1.7",
> > > > > >                    "org.mortbay.jetty:servlet-api-2.5:jar:6.1.7
> ")
> > > > > >  compile.with JETTY
> > > > > > end
> > > > > >
> > > > > > But when I try to refactor the duplication by using the group
> > > > > > statement, the build fails.
> > > > > >
> > > > > > define "spike" do
> > > > > >  JETTY = group("jetty", "jetty-util", "servlet-api-2.5",
> > > > > > :under=>"org.mortbay.jetty", :version=>"6.1.7")
> > > > > >  compile.with JETTY
> > > > > > end
> > > > > >
> > > > > > $ buildr
> > > > > > (in /home/l/code/buildr/bug_in_group)
> > > > > > Building spike
> > > > > > rake aborted!
> > > > > > Don't know how to build task
> > '/home/l/code/buildr/bug_in_group/spike'
> > > > > >
> > > > > > (See full trace by running task with --trace)
> > > > > >
> > > > > > $ buildr --trace
> > > > > > (in /home/l/code/buildr/bug_in_group)
> > > > > > ** Invoke buildr:initialize (first_time)
> > > > > > ** Execute buildr:initialize
> > > > > > ** Invoke spike (first_time)
> > > > > > ** Execute spike
> > > > > > ** Invoke spike
> > > > > > ** Invoke default (first_time)
> > > > > > ** Invoke build (first_time)
> > > > > > ** Execute build
> > > > > > ** Invoke spike
> > > > > > ** Invoke spike
> > > > > > Building spike
> > > > > > ** Invoke spike:build (first_time)
> > > > > > ** Invoke /home/l/code/buildr/bug_in_group/target/classes
> > (first_time,
> > > > > > not_needed)
> > > > > > ** Invoke spike:compile (first_time)
> > > > > > ** Invoke spike:prepare (first_time)
> > > > > > ** Execute spike:prepare
> > > > > > ** Invoke spike:resources (first_time)
> > > > > > ** Execute spike:resources
> > > > > > rake aborted!
> > > > > > Don't know how to build task
> > '/home/l/code/buildr/bug_in_group/spike'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1472:in `[]'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/java/compile.rb:219:in
> > > > > > `invoke_prerequisites'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1003:in `each'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1003:in `send'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1003:in `each'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/java/compile.rb:219:in
> > > > > > `invoke_prerequisites'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:12:in
> > > > > > `invoke'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:6:in
> > > > > > `synchronize'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:6:in
> > > > > > `invoke'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:31:in
> > > > > > `invoke_prerequisites'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1003:in `each'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1003:in `send'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1003:in `each'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:31:in
> > > > > > `invoke_prerequisites'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:12:in
> > > > > > `invoke'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:6:in
> > > > > > `synchronize'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:6:in
> > > > > > `invoke'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:31:in
> > > > > > `invoke_prerequisites'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1003:in `each'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1003:in `send'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1003:in `each'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:31:in
> > > > > > `invoke_prerequisites'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:12:in
> > > > > > `invoke'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:6:in
> > > > > > `synchronize'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:6:in
> > > > > > `invoke'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/project.rb:244:in
> > > > > > `local_task'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/project.rb:280:in
> > > > `[]'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/project.rb:280:in
> > > > > > `local_projects'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/project.rb:280:in
> > > > > > `each'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/project.rb:280:in
> > > > > > `local_projects'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/project.rb:242:in
> > > > > > `local_task'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:27:in
> > > > > > `call'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:27:in
> > > > > > `execute'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:27:in
> > > > > > `each'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:27:in
> > > > > > `execute'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:13:in
> > > > > > `invoke'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:6:in
> > > > > > `synchronize'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:6:in
> > > > > > `invoke'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:31:in
> > > > > > `invoke_prerequisites'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1003:in `each'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1003:in `send'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1003:in `each'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:31:in
> > > > > > `invoke_prerequisites'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:12:in
> > > > > > `invoke'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:6:in
> > > > > > `synchronize'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > /lib/core/rake_ext.rb:6:in
> > > > > > `invoke'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1739:in `top_level'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1739:in `each'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1739:in `top_level'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1761:in
> > > > `standard_exception_handling'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1733:in `top_level'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > > > /lib/core/application.rb:54:in
> > > > > > `run'
> > > > > > /usr/lib/ruby/site_ruby/1.8/rake.rb:1761:in
> > > > `standard_exception_handling'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10
> > > > /lib/core/application.rb:51:in
> > > > > > `run'
> > > > > > /usr/lib/ruby/gems/1.8/gems/buildr-1.2.10/bin/buildr:7
> > > > > > /usr/bin/buildr:18:in `load'
> > > > > > /usr/bin/buildr:18
> > > > > >
> > > > > > What is wrong with the way I am using group?
> > > > > >
> > > > > > Cheers.
> > > > > >
> > > > > > antoine
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Stephen Duncan Jr
> > > > > www.stephenduncanjr.com
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > Stephen Duncan Jr
> > > www.stephenduncanjr.com
> >
>
>
>
> --
> CTO, Intalio
> http://www.intalio.com
>



-- 
Stephen Duncan Jr
www.stephenduncanjr.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message