You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Nick Drew <ni...@gmail.com> on 2009/11/09 00:10:11 UTC

Offline builds (e.g. on RunCodeRun)

Hi buildr people

I recently attempted to use RunCodeRun to pull a github project  
organised by buildr.  However, RCR doesn't allow outgoing network  
connections (a wise decision).

I have checked in all necessary dependencies to my source tree - so no  
actual network connection is necessary

Any ways to prevent the downloading of artifacts?

The details:

I have a Rake file, that RunCodeRun
task :default => [:ci]

task :ci do
  puts "Installing buildr gem"
  puts %x{gem install buildr --version 1.3.5}
  puts "Running buildr clean package"
  puts %x{buildr clean package}
end

Which results in the following output.
mkdir -p /home/build/.buildr
Buildr aborted!
Failed to download org.apache.ant:ant:jar:1.7.1, tried the following  
repositories:
http://www.ibiblio.org/maven2/
http://scala-tools.org/repo-releases/
http://scala-tools.org/repo-releases/
/home/build/.gem/ruby/1.8/gems/buildr-1.3.5/lib/buildr/core/ 
application.rb:400:in `raw_load_buildfile'
/home/build/.gem/ruby/1.8/gems/buildr-1.3.5/lib/buildr/core/ 
application.rb:218:in `load_buildfile'
/home/build/.gem/ruby/1.8/gems/buildr-1.3.5/lib/buildr/core/ 
application.rb:213:in `load_buildfile'
(See full trace by running task with --trace)
(in /mnt/repos/PilchardFriendly/ScalaSpike)
Installing buildr gem
Building native extensions.  This could take a while...
To get started run buildr --help
Successfully installed rjb-1.1.9
Successfully installed Antwrap-0.7.0
Successfully installed buildr-1.3.5
3 gems installed
Running buildr clean package
(in /mnt/repos/PilchardFriendly/ScalaSpike, development)
Downloading org.apache.ant:ant:jar:1.7.1
Connection refused - connect(2)
Connection refused - connect(2)
Connection refused - connect(2)

Re: Offline builds (e.g. on RunCodeRun)

Posted by Alex Boisvert <al...@gmail.com>.
Yep, that's probably what I would do as well.  I'd probably set up a Maven2
repository in the same/different git repository and keep it up-to-date with
both libraries required for my project and Buildr's required dependencies.

By the way, instead of changing M2_REPO, you can alternatively set
"respositories.local" to "/path/to/local/m2/repo".

And if you don't want to follow the Maven2 repository naming conventions,
you would have to individually point each artifact to a local path, e.g.
artifact("org.apache.ant:ant:jar:1.7.1").from("/path/to/ant-1.7.1.jar"), but
it seems like more trouble than setting up a local repo.

alex

On Sun, Nov 8, 2009 at 5:45 PM, Tal Rotbart <re...@gmail.com> wrote:

> There's probably a more elegant solution, but checking in the required
> subset of your Maven2 repository and setting the M2_REPO environment
> variable to point to it before running 'buildr clean package' would
> probably do the trick.
>
> Cheers,
> Tal
>
> On Mon, Nov 9, 2009 at 10:10 AM, Nick Drew <ni...@gmail.com> wrote:
> > Hi buildr people
> >
> > I recently attempted to use RunCodeRun to pull a github project organised
> by
> > buildr.  However, RCR doesn't allow outgoing network connections (a wise
> > decision).
> >
> > I have checked in all necessary dependencies to my source tree - so no
> > actual network connection is necessary
> >
> > Any ways to prevent the downloading of artifacts?
> >
> > The details:
> >
> > I have a Rake file, that RunCodeRun
> > task :default => [:ci]
> >
> > task :ci do
> >  puts "Installing buildr gem"
> >  puts %x{gem install buildr --version 1.3.5}
> >  puts "Running buildr clean package"
> >  puts %x{buildr clean package}
> > end
> >
> > Which results in the following output.
> > mkdir -p /home/build/.buildr
> > Buildr aborted!
> > Failed to download org.apache.ant:ant:jar:1.7.1, tried the following
> > repositories:
> > http://www.ibiblio.org/maven2/
> > http://scala-tools.org/repo-releases/
> > http://scala-tools.org/repo-releases/
> >
> /home/build/.gem/ruby/1.8/gems/buildr-1.3.5/lib/buildr/core/application.rb:400:in
> > `raw_load_buildfile'
> >
> /home/build/.gem/ruby/1.8/gems/buildr-1.3.5/lib/buildr/core/application.rb:218:in
> > `load_buildfile'
> >
> /home/build/.gem/ruby/1.8/gems/buildr-1.3.5/lib/buildr/core/application.rb:213:in
> > `load_buildfile'
> > (See full trace by running task with --trace)
> > (in /mnt/repos/PilchardFriendly/ScalaSpike)
> > Installing buildr gem
> > Building native extensions.  This could take a while...
> > To get started run buildr --help
> > Successfully installed rjb-1.1.9
> > Successfully installed Antwrap-0.7.0
> > Successfully installed buildr-1.3.5
> > 3 gems installed
> > Running buildr clean package
> > (in /mnt/repos/PilchardFriendly/ScalaSpike, development)
> > Downloading org.apache.ant:ant:jar:1.7.1
> > Connection refused - connect(2)
> > Connection refused - connect(2)
> > Connection refused - connect(2)
> >
>

Re: Offline builds (e.g. on RunCodeRun)

Posted by Tal Rotbart <re...@gmail.com>.
There's probably a more elegant solution, but checking in the required
subset of your Maven2 repository and setting the M2_REPO environment
variable to point to it before running 'buildr clean package' would
probably do the trick.

Cheers,
Tal

On Mon, Nov 9, 2009 at 10:10 AM, Nick Drew <ni...@gmail.com> wrote:
> Hi buildr people
>
> I recently attempted to use RunCodeRun to pull a github project organised by
> buildr.  However, RCR doesn't allow outgoing network connections (a wise
> decision).
>
> I have checked in all necessary dependencies to my source tree - so no
> actual network connection is necessary
>
> Any ways to prevent the downloading of artifacts?
>
> The details:
>
> I have a Rake file, that RunCodeRun
> task :default => [:ci]
>
> task :ci do
>  puts "Installing buildr gem"
>  puts %x{gem install buildr --version 1.3.5}
>  puts "Running buildr clean package"
>  puts %x{buildr clean package}
> end
>
> Which results in the following output.
> mkdir -p /home/build/.buildr
> Buildr aborted!
> Failed to download org.apache.ant:ant:jar:1.7.1, tried the following
> repositories:
> http://www.ibiblio.org/maven2/
> http://scala-tools.org/repo-releases/
> http://scala-tools.org/repo-releases/
> /home/build/.gem/ruby/1.8/gems/buildr-1.3.5/lib/buildr/core/application.rb:400:in
> `raw_load_buildfile'
> /home/build/.gem/ruby/1.8/gems/buildr-1.3.5/lib/buildr/core/application.rb:218:in
> `load_buildfile'
> /home/build/.gem/ruby/1.8/gems/buildr-1.3.5/lib/buildr/core/application.rb:213:in
> `load_buildfile'
> (See full trace by running task with --trace)
> (in /mnt/repos/PilchardFriendly/ScalaSpike)
> Installing buildr gem
> Building native extensions.  This could take a while...
> To get started run buildr --help
> Successfully installed rjb-1.1.9
> Successfully installed Antwrap-0.7.0
> Successfully installed buildr-1.3.5
> 3 gems installed
> Running buildr clean package
> (in /mnt/repos/PilchardFriendly/ScalaSpike, development)
> Downloading org.apache.ant:ant:jar:1.7.1
> Connection refused - connect(2)
> Connection refused - connect(2)
> Connection refused - connect(2)
>