You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Niklaus Giger <ni...@member.fsf.org> on 2012/04/16 21:38:29 UTC
Questions on howto build a new Buildr plugin
Hi
I am trying to create a Buildr plugin for creating IzPack installers.
I tried to follow the schema outlined at
https://cwiki.apache.org/confluence/display/BUILDR/Setting+up+a+development+environment+for+Buildr+plugin
and stumbled over the following problems:
a) I think instead of using braid it would make more sense to use git
submodules, which would allow an easy upgrade path to an up-to-date Buildr
version and would not pollute a new (probably quite small) plugin with all the
buildr stuff.
Therefore I would propose to replace there the lines about using braid with
somethink like this:
> git clone git://github.com/apache/buildr.git buildr
> # If you want to switch to specific tag/branch use
> cd buildr && git checkout --force 1.4.6 && cd ..
> git submodule add ~/git/buildr buildr
>
> Using git submodules is documented under:
> http://book.git-scm.com/5_submodules.html
b) With the actual rakelib it is not possible to call in a new plug-in "rake
gem", as this would try to compile the Java-Library. The attach patch fixes
this problem. If you want, I can also fork the github-git and send you a pull
request.
Best regards
Niklaus
--
Niklaus Giger
Re: Questions on howto build a new Buildr plugin (Solved)
Posted by Niklaus Giger <ni...@member.fsf.org>.
Hi
The page
https://cwiki.apache.org/confluence/display/BUILDR/Setting+up+a+development+environment+for+Buildr+plugin
was outdated. Changed version_requirements -> requirement and it works!
Thanks for your help!
Cheers
Niklaus
> Hi
>
> > This version_requirements method was removed from rubygems. Are you using
> > a recent version of rubygems ?
>
> I use rvm with ruby-1.9.3. Then gem -v returns "1.8.22", which is current.
>
> But buildr.gemspec forces a rake version of 0.8.7. Current is 0.9.2.2. Is
> this correct?
>
> Cheers
>
> Niklaus
>
> > Cheers,
> >
> > Antoine
> >
> > On Tuesday, April 17, 2012 at 12:54 PM, Niklaus Giger wrote:
> > > > version_requirements
--
Re: Questions on howto build a new Buildr plugin
Posted by Niklaus Giger <ni...@member.fsf.org>.
Hi
> This version_requirements method was removed from rubygems. Are you using a
> recent version of rubygems ?
I use rvm with ruby-1.9.3. Then gem -v returns "1.8.22", which is current.
But buildr.gemspec forces a rake version of 0.8.7. Current is 0.9.2.2. Is this
correct?
Cheers
Niklaus
>
> Cheers,
>
> Antoine
>
> On Tuesday, April 17, 2012 at 12:54 PM, Niklaus Giger wrote:
> > > version_requirements
Re: Questions on howto build a new Buildr plugin
Posted by Antoine Toulme <an...@toulme.name>.
This version_requirements method was removed from rubygems. Are you using a recent version of rubygems ?
Cheers,
Antoine
On Tuesday, April 17, 2012 at 12:54 PM, Niklaus Giger wrote:
> > version_requirements
> >
>
Re: Questions on howto build a new Buildr plugin
Posted by Niklaus Giger <ni...@member.fsf.org>.
Hi
Thanks everybody for the feedback. I think I can live with braid, but it just
never occured to me that you were using it. (I did not yet use git submodules
a lot.) But I have the following questions:
a) Why don't you include the .braids file in the plugin. If it had been there,
I might have stumbled about it a lot earlier.
b) I was able to setup a skeleton (nothing working yet) under
https://github.com/ngiger/buildrizpack by copying the rakelib directory from
buildr and adapting it to buildrizpack.
The rake tasks 'gem', 'install', 'rdoc' work. The only other target I really
am interested in is 'spec'. But it fails with the following error msg
> /home/niklaus/.rvm/rubies/ruby-1.9.2-p318/bin/ruby -S bundle exec rspec
> --format html --out _reports/specs.html --backtrace
> spec/buildrizpack/package_spec.rb
> /opt/src/buildrizpack/spec/spec_helpers.rb:22:in `block in included':
> undefined method `version_requirements' for
> #<Gem::Dependency:0x00000003ca5960> (NoMethodError)
>
> from /opt/src/buildrizpack/spec/spec_helpers.rb:22:in `each'
> from /opt/src/buildrizpack/spec/spec_helpers.rb:22:in `included'
> from /opt/src/buildrizpack/buildr/spec/spec_helpers.rb:53:in
> `include' from
> /opt/src/buildrizpack/buildr/spec/spec_helpers.rb:53:in `<top
> (required)>' from /opt/src/buildrizpack/spec/spec_helpers.rb:29:in
> `require' from /opt/src/buildrizpack/spec/spec_helpers.rb:29:in
> `<top (required)>' from
> /opt/src/buildrizpack/spec/buildrizpack/package_spec.rb:16:in
> `require' from
> /opt/src/buildrizpack/spec/buildrizpack/package_spec.rb:16:in
> `<top (required)>' from
> /home/niklaus/.rvm/gems/ruby-1.9.2-p318@buildr/gems/rspec-core-2.1
> .0/lib/rspec/core/configuration.rb:334:in `load' from
> /home/niklaus/.rvm/gems/ruby-1.9.2-p318@buildr/gems/rspec-core-2.1
> .0/lib/rspec/core/configuration.rb:334:in `block in
> load_spec_files' from
> /home/niklaus/.rvm/gems/ruby-1.9.2-p318@buildr/gems/rspec-core-2.1
> .0/lib/rspec/core/configuration.rb:334:in `map' from
> /home/niklaus/.rvm/gems/ruby-1.9.2-p318@buildr/gems/rspec-core-2.1
> .0/lib/rspec/core/configuration.rb:334:in `load_spec_files' from
> /home/niklaus/.rvm/gems/ruby-1.9.2-p318@buildr/gems/rspec-core-2.1
> .0/lib/rspec/core/command_line.rb:18:in `run' from
> /home/niklaus/.rvm/gems/ruby-1.9.2-p318@buildr/gems/rspec-core-2.1
> .0/lib/rspec/core/runner.rb:55:in `run_in_process' from
> /home/niklaus/.rvm/gems/ruby-1.9.2-p318@buildr/gems/rspec-core-2.1
> .0/lib/rspec/core/runner.rb:46:in `run' from
> /home/niklaus/.rvm/gems/ruby-1.9.2-p318@buildr/gems/rspec-core-2.1
> .0/lib/rspec/core/runner.rb:10:in `block in autorun'
>
> rake aborted!
> ruby -S bundle exec rspec --format html --out _reports/specs.html
> --backtrace spec/buildrizpack/package_spec.rb failed
>
I tried to find a solution but got stucked after a while. Anybody knows about
this problem?
<..<
> I already created a plugin to do makensis installers if you're into that:
> https://github.com/intalio/package_as_exe
I know, but I don't want to force another installer to my project, because
using buildr will be a little intrusive, even if I will try to minimize the
impact.
>
>
>
> Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
>
> On Tuesday, April 17, 2012 at 5:59 AM, Alex Boisvert wrote:
> > On Mon, Apr 16, 2012 at 5:37 PM, Peter Donald <peter@realityforge.org
(mailto:peter@realityforge.org)>wrote:
> > > I would maybe both of them as options and outline the various
> > > strengths/weaknesses of both approaches. I would still tend to use
> > > braid but each to their own ;)
> >
> > Same position here.
> >
> > alex
Best regards
--
Niklaus Giger
Re: Questions on howto build a new Buildr plugin
Posted by Antoine Toulme <an...@toulme.name>.
I used braid back then because git submodules didn't exist :). Makes me feel old.
I already created a plugin to do makensis installers if you're into that:
https://github.com/intalio/package_as_exe
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Tuesday, April 17, 2012 at 5:59 AM, Alex Boisvert wrote:
> On Mon, Apr 16, 2012 at 5:37 PM, Peter Donald <peter@realityforge.org (mailto:peter@realityforge.org)>wrote:
>
> > I would maybe both of them as options and outline the various
> > strengths/weaknesses of both approaches. I would still tend to use
> > braid but each to their own ;)
> >
>
>
> Same position here.
>
> alex
Re: Questions on howto build a new Buildr plugin
Posted by Alex Boisvert <al...@gmail.com>.
On Mon, Apr 16, 2012 at 5:37 PM, Peter Donald <pe...@realityforge.org>wrote:
> I would maybe both of them as options and outline the various
> strengths/weaknesses of both approaches. I would still tend to use
> braid but each to their own ;)
>
Same position here.
alex
Re: Questions on howto build a new Buildr plugin
Posted by Peter Donald <pe...@realityforge.org>.
Hi,
On Tue, Apr 17, 2012 at 5:38 AM, Niklaus Giger
<ni...@member.fsf.org> wrote:
> I am trying to create a Buildr plugin for creating IzPack installers.
>
> I tried to follow the schema outlined at
> https://cwiki.apache.org/confluence/display/BUILDR/Setting+up+a+development+environment+for+Buildr+plugin
> and stumbled over the following problems:
ooer - I had not seen that before.
> a) I think instead of using braid it would make more sense to use git
> submodules, which would allow an easy upgrade path to an up-to-date Buildr
> version
I haven't looked at this example directly but I find braid as a much
much better solution for keeping things up to date. I also find it
quite easy to switch between versions. i.e. keeping it uptodate is
simply "braid update buildr"
> and would not pollute a new (probably quite small) plugin with all the
> buildr stuff.
Thats an unfortunate effect - I agree. IIRC braid is setup to use a
squash strategy when mergin in the other tree which lessens the impact
to some degree.
One of the big negatives of braid is that it did not work well on
windows without a few local hacks.
> Therefore I would propose to replace there the lines about using braid with
> somethink like this:
>> git clone git://github.com/apache/buildr.git buildr
>> # If you want to switch to specific tag/branch use
>> cd buildr && git checkout --force 1.4.6 && cd ..
>> git submodule add ~/git/buildr buildr
>>
>> Using git submodules is documented under:
>> http://book.git-scm.com/5_submodules.html
I would maybe both of them as options and outline the various
strengths/weaknesses of both approaches. I would still tend to use
braid but each to their own ;)
--
Cheers,
Peter Donald