On Thu, Nov 19, 2009 at 8:34 AM, Greg Lucas wrote: > Just in case anyone else is looking to do the same (produce an XML artifact > as build output): > > I ended up defining a new package type for this after all. The > artifact.from approach works (thanks for the fix!) but behaves a bit > differently than I'd like - for example the file gets generated when you do > 'buildr artifacts'. > > So now I'm doing it this way: > > def package_as_file(file_name) > file file_name => [...] do > ... #generate the file > end > end > def package_as_file_spec(spec) > spec.merge({ :type=>:xml }) > end > > package(:file) > > In my case generating the file means copying a template file and replacing > various tokens. I wonder if there should be a built-in package type for > files to simplify this a bit, so you could specify a src file and define a > block to produce the target file? > Yes, I think a built-in support is warranted. Do you want to provide a patch? Otherwise, I can take care of it. alex