From ea25d07a7abe1601da8447db45fe93544279a2f5 Mon Sep 17 00:00:00 2001 From: Plamen Totev Date: Sat, 15 Sep 2018 19:37:34 +0300 Subject: [PATCH] Make JarArchiver#createManifest protected That would allow subclasses of `JarArchiver` to update or inspect the manifest file that is going to be added to the archive. --- .../org/codehaus/plexus/archiver/jar/JarArchiver.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/codehaus/plexus/archiver/jar/JarArchiver.java b/src/main/java/org/codehaus/plexus/archiver/jar/JarArchiver.java index 671593f54..8c6c24739 100644 --- a/src/main/java/org/codehaus/plexus/archiver/jar/JarArchiver.java +++ b/src/main/java/org/codehaus/plexus/archiver/jar/JarArchiver.java @@ -319,7 +319,16 @@ protected boolean hasVirtualFiles() || super.hasVirtualFiles(); } - private Manifest createManifest() + /** + * Creates the manifest to be added to the JAR archive. + * Sub-classes may choose to override this method + * in order to inspect or modify the JAR manifest file. + * + * @return the manifest for the JAR archive. + * + * @throws ArchiverException + */ + protected Manifest createManifest() throws ArchiverException { Manifest finalManifest = Manifest.getDefaultManifest();