3

Currently, maven-assembly-plugin allows only pre-defined output archive formats, such as .zip, tar.gz. The docs do not mention straightforward configuration to create --rsyncable gzip.

So far, I've gotten as far as maven-archiver should be configured, however the docs are rather scarce.

Just wondering, anyone already explored this?

Update: Maven-archiver uses org.codehaus.plexus.archiver.gzip, which uses java.util.zip.GZIPOutputStream, which is a standard impl of zip, expectedly without --rsyncable support.

Looks like the most feasible option is to search for alternative zip implementation and promote it to plexus guys.

Ivan Balashov
  • 1,897
  • 1
  • 23
  • 33

1 Answers1

1

I had the same problem and tried to find a way to create rsyncable tar.gz archives but to no avail. However I could solve it by using 'zip' as format. 'zip' seems to be rsyncable by default. Most probably 'jar' will do the trick as well. So, if there is no specific reason to use 'tar.gz' or 'tar.bz2', I prefer 'zip' now for packaging in order to get the advantage from rsync on transfering my packages to remote machines.

christian
  • 11
  • 1
  • Jars are in fact zips. And as far as I could say at the time these archives created by maven were not rsyncable. Could it be that rsyncability of maven zips depend on package contents? What speedup do you get with them? – Ivan Balashov Sep 26 '14 at 14:32
  • 1
    Zip files are "rsyncable" because each file is compressed individually with no entropy sharing. If you change the contents of one file, the others may get moved around, but their compressed bits won't get changed (unless you do something else like change the compression level). Tar.gz files _aren't_ because the gzip happens to the whole tarball. (If you gzipped all the individual files first and tarred it, you'd have something similar to zip.) Whether a particular zip benefits from rsync depends on what's inside it. If it's large compressed files (e.g., a war) it may not get much compression. – Sarah G Sep 15 '15 at 21:20