From 42892e811138c8be65cce66939d0207141ab20cd Mon Sep 17 00:00:00 2001 From: Plamen Totev Date: Sun, 8 Apr 2018 10:56:01 +0300 Subject: [PATCH 1/2] Bump version to 3.6 for the upcoming changes --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8fcb6091a..525157b22 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ plexus-archiver - 3.5.1-SNAPSHOT + 3.6-SNAPSHOT Plexus Archiver Component From 24444fe5bcfcc0db3ab3e2b1e676777b82fa2d88 Mon Sep 17 00:00:00 2001 From: Plamen Totev Date: Sun, 8 Apr 2018 11:22:31 +0300 Subject: [PATCH 2/2] Add new method (postCreateArchive) to AbstractArchiver The purpose of the method is to allow subclasses to augment the archive after it is created. This is going to be used to update Jar archives to modular Jar archives. --- .../plexus/archiver/AbstractArchiver.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/java/org/codehaus/plexus/archiver/AbstractArchiver.java b/src/main/java/org/codehaus/plexus/archiver/AbstractArchiver.java index f88583d44..3fab3dd2a 100755 --- a/src/main/java/org/codehaus/plexus/archiver/AbstractArchiver.java +++ b/src/main/java/org/codehaus/plexus/archiver/AbstractArchiver.java @@ -1007,6 +1007,8 @@ public final void createArchive() { cleanUp(); } + + postCreateArchive(); } protected boolean hasVirtualFiles() @@ -1036,6 +1038,21 @@ protected void validate() { } + /** + * This method is called after the archive creation + * completes successfully (no exceptions are thrown). + * + * Subclasses may override this method in order to + * augment or validate the archive after it is + * created. + * + * @since 3.6 + */ + protected void postCreateArchive() + throws ArchiverException, IOException + { + } + protected abstract String getArchiveType(); private void addCloseable( Object maybeCloseable )