6
6
import org .apache .commons .compress .archivers .ArchiveOutputStream ;
7
7
import org .apache .commons .compress .archivers .ArchiveStreamFactory ;
8
8
import org .apache .commons .compress .archivers .tar .TarArchiveEntry ;
9
+ import org .apache .commons .compress .archivers .tar .TarArchiveOutputStream ;
9
10
import org .apache .commons .io .FileUtils ;
10
11
import org .apache .commons .io .IOUtils ;
11
12
import org .apache .commons .io .filefilter .TrueFileFilter ;
@@ -132,7 +133,7 @@ public static Build startBinaryBuild(final String bcName, Path sources) throws I
132
133
ExecutorService executorService = Executors .newSingleThreadExecutor ();
133
134
final Future <?> future = executorService .submit (() -> {
134
135
Collection <File > filesToArchive = FileUtils .listFiles (sources .toFile (), TrueFileFilter .INSTANCE , TrueFileFilter .INSTANCE );
135
- try (ArchiveOutputStream o = new ArchiveStreamFactory ().createArchiveOutputStream (ArchiveStreamFactory .TAR , pos )) {
136
+ try (TarArchiveOutputStream o = ( TarArchiveOutputStream ) new ArchiveStreamFactory ().createArchiveOutputStream (ArchiveStreamFactory .TAR , pos )) {
136
137
for (File f : filesToArchive ) {
137
138
String tarPath = sources .relativize (f .toPath ()).toString ();
138
139
log .trace ("adding file to tar: {}" , tarPath );
@@ -142,6 +143,7 @@ public static Build startBinaryBuild(final String bcName, Path sources) throws I
142
143
TarArchiveEntry tarArchiveEntry = (TarArchiveEntry )entry ;
143
144
tarArchiveEntry .setModTime (Date .from (Instant .EPOCH ));
144
145
146
+ o .setBigNumberMode (TarArchiveOutputStream .BIGNUMBER_POSIX );
145
147
o .putArchiveEntry (tarArchiveEntry );
146
148
if (f .isFile ()) {
147
149
try (InputStream i = Files .newInputStream (f .toPath ())) {
0 commit comments