buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <alex.boisv...@gmail.com>
Subject Re: remove a file from an external jar
Date Fri, 08 Nov 2013 17:15:40 GMT
It would go something like this ...

bogus = artifact("org.example:bogus:jar:1.0")

# make a copy and remove log4j.xml
clean_bogus = file(_(:target, "bogus-clean.jar")).enhance([bogus]) do |f|
  cp bogus.to_s, f.to_s
  Zip::ZipFile.open(f.to_s) { |zfile| zfile.remove('log4j.xml') }
end

# i'm assuming you're building a webapp ...
package(:war).with :libs => clean_bogus



On Fri, Nov 8, 2013 at 7:57 AM, Jean-Philippe Caruana <jp@target2sell.com>wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> my project depend on a library with a log4j.xml file inside. This file
> is loaded before my own logj configuration files and only writes to
> console... and I need to write to syslog.
>
> How can I remove this file from this external jar ?
> Thanks ?
>
> - --
> Jean-Philippe Caruana
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJSfQnqAAoJEJ+Vqztq6gdiJWEH/24ioQXvAw9Lff+heEuDdAoU
> mjhsGqtx6/Fqyj7ekuJ5PWlNB60kppMTqyMpG+ks3oxBociSsxUFla03Ek9qnRFL
> vqPWIZPzg7XspB/tVyPIAew44VnSSNQAOU/wjEJ14QqlrM8e3vucNSbCNAO1fK6J
> OeJISfj/+8CeXGJaXTEvl6g4sOMfUFsm9NzuhnIQkd2YGyty05gLsjCeHlu8+0yb
> C+q8EBySpMtpKt3+VhMwv7wv1pnpqnALNcv3YP3MEr8LxC7SbXRI+kuIX/oYmqPW
> SYZCgLQ7TeSggmegz2ozF3V8KAGevrOilRrytFCTul0Htr6yb5PKwkVbutNPl9I=
> =W/SH
> -----END PGP SIGNATURE-----
>

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