buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harish Krishnaswamy" <>
Subject Re: Can I package artifacts in a zip?
Date Fri, 11 Apr 2008 23:50:47 GMT
That works thanks!

The package task should support this out of the box, I think. Why can't you
zip anything and everything?


Sure, the following foo:archive task, would create an archive containing
some produced packages, artifacts, and some files :)

define 'foo' do
# create some packages, and files to include later
define 'baz' do
define 'bar' do
write 'some/files/a.txt', '1'
write 'some/files/a/b/c.txt', '2'

# Now the relevant part

archive = package(:zip, :id => 'archive')
archive.add project('baz').package(:jar)
archive.add project('bar').package(:zip)
archive.add [artifacts('org.springframework:spring:jar:2.5',
'log4j:log4j:jar:1.2.15')], :path => 'artifacts'
archive.add FileList['some/files/**/*.txt'], :path => 'docs'

# Create the archive containing this projects packages and some artifact
task :archive => archive

vic@odam ~/tmp/pkg $ buildr foo:archive
(in /home/vic/tmp/pkg, development)
Completed in 0.899s
vic@odam ~/tmp/pkg $ unzip -t target/
Archive: target/
testing: artifacts/ OK
testing: artifacts/log4j-1.2.15.jar OK
testing: artifacts/spring-2.5.jar OK
testing: docs/ OK
testing: docs/a.txt OK
testing: docs/c.txt OK
testing: OK
testing: foo-baz-1.0.0.jar OK
No errors detected in compressed data of target/

Hope this helps.

Quaerendo invenietis.

On Thu, Apr 10, 2008 at 11:05 PM, Harish Krishnaswamy <> wrote:

> My situation is, I build a bunch of jars and then I have to zip them up
> along with some files. So I tried to include my installed artifacts, but it
> considers them as tasks rather than artifacts. How would I do this? Thanks.
> -Harish

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