Skip to content

Commit 24444fe

Browse files
committed
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.
1 parent 42892e8 commit 24444fe

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/main/java/org/codehaus/plexus/archiver/AbstractArchiver.java

+17
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,8 @@ public final void createArchive()
10071007
{
10081008
cleanUp();
10091009
}
1010+
1011+
postCreateArchive();
10101012
}
10111013

10121014
protected boolean hasVirtualFiles()
@@ -1036,6 +1038,21 @@ protected void validate()
10361038
{
10371039
}
10381040

1041+
/**
1042+
* This method is called after the archive creation
1043+
* completes successfully (no exceptions are thrown).
1044+
*
1045+
* Subclasses may override this method in order to
1046+
* augment or validate the archive after it is
1047+
* created.
1048+
*
1049+
* @since 3.6
1050+
*/
1051+
protected void postCreateArchive()
1052+
throws ArchiverException, IOException
1053+
{
1054+
}
1055+
10391056
protected abstract String getArchiveType();
10401057

10411058
private void addCloseable( Object maybeCloseable )

0 commit comments

Comments
 (0)