Skip to content

Allow archives to be augmented after they are created #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>

<artifactId>plexus-archiver</artifactId>
<version>3.5.1-SNAPSHOT</version>
<version>3.6-SNAPSHOT</version>
<name>Plexus Archiver Component</name>

<scm>
Expand Down
17 changes: 17 additions & 0 deletions src/main/java/org/codehaus/plexus/archiver/AbstractArchiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,8 @@ public final void createArchive()
{
cleanUp();
}

postCreateArchive();
}

protected boolean hasVirtualFiles()
Expand Down Expand Up @@ -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 )
Expand Down