From 231c7accd135534f2e7657f9cabb034899f701e7 Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Tue, 25 Jul 2023 09:06:02 +0200 Subject: [PATCH 01/19] [maven-release-plugin] prepare for next development iteration --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index a9a837e9..27c90182 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ plexus-archiver - 4.8.0 + 4.8.1-SNAPSHOT Plexus Archiver Component https://codehaus-plexus.github.io/plexus-archiver/ @@ -30,7 +30,7 @@ scm:git:https://github.com/codehaus-plexus/plexus-archiver.git scm:git:https://github.com/codehaus-plexus/plexus-archiver.git - plexus-archiver-4.8.0 + HEAD https://github.com/codehaus-plexus/plexus-archiver/tree/${project.scm.tag}/ @@ -47,7 +47,7 @@ 0.9.0.M2 1.7.36 - 2023-07-25T07:04:55Z + 2023-07-25T07:06:02Z From 8ebec4327f8b19af449c0e8f48c3a9d4fbc93200 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 23:30:19 +0000 Subject: [PATCH 02/19] Bump org.apache.commons:commons-compress from 1.23.0 to 1.24.0 Bumps org.apache.commons:commons-compress from 1.23.0 to 1.24.0. --- updated-dependencies: - dependency-name: org.apache.commons:commons-compress dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 27c90182..f9648b06 100644 --- a/pom.xml +++ b/pom.xml @@ -77,7 +77,7 @@ org.apache.commons commons-compress - 1.23.0 + 1.24.0 From 26c0b0469757eaeaf5fe5b12e03d34230f0b4f45 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Sep 2023 23:46:37 +0000 Subject: [PATCH 03/19] Bump commons-io:commons-io from 2.13.0 to 2.14.0 Bumps commons-io:commons-io from 2.13.0 to 2.14.0. --- updated-dependencies: - dependency-name: commons-io:commons-io dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f9648b06..9a302396 100644 --- a/pom.xml +++ b/pom.xml @@ -72,7 +72,7 @@ commons-io commons-io - 2.13.0 + 2.14.0 org.apache.commons From 145128f9601e7be9114fba2e9fabd96dec9ab620 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 23:48:53 +0000 Subject: [PATCH 04/19] Bump com.github.luben:zstd-jni from 1.5.5-5 to 1.5.5-6 Bumps [com.github.luben:zstd-jni](https://github.com/luben/zstd-jni) from 1.5.5-5 to 1.5.5-6. - [Commits](https://github.com/luben/zstd-jni/compare/v.1.5.5-5...v1.5.5-6) --- updated-dependencies: - dependency-name: com.github.luben:zstd-jni dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9a302396..62db1498 100644 --- a/pom.xml +++ b/pom.xml @@ -99,7 +99,7 @@ com.github.luben zstd-jni - 1.5.5-5 + 1.5.5-6 runtime From 1fe44623b248be56d63f5ee17195e7e131df16e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 23:34:12 +0000 Subject: [PATCH 05/19] Bump org.codehaus.plexus:plexus from 14 to 15 Bumps [org.codehaus.plexus:plexus](https://github.com/codehaus-plexus/plexus-pom) from 14 to 15. - [Release notes](https://github.com/codehaus-plexus/plexus-pom/releases) - [Commits](https://github.com/codehaus-plexus/plexus-pom/commits) --- updated-dependencies: - dependency-name: org.codehaus.plexus:plexus dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 62db1498..376fd812 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.codehaus.plexus plexus - 14 + 15 plexus-archiver From d17943230b0d18debf101e15ad825bcc238090b9 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Wed, 4 Oct 2023 19:24:00 +0200 Subject: [PATCH 06/19] Cleanup after parent pom update --- pom.xml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index 376fd812..6761de42 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,6 @@ - 0.9.0.M2 1.7.36 2023-07-25T07:06:02Z @@ -129,7 +128,7 @@ org.eclipse.sisu org.eclipse.sisu.inject - ${sisuVersion} + ${sisuMavenPluginVersion} test @@ -161,16 +160,6 @@ org.eclipse.sisu sisu-maven-plugin - ${sisuVersion} - - - index-project - - main-index - test-index - - - org.apache.maven.plugins From 991aa4c7f4037e7722deeae869b82d81d8c7c25d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 23:49:28 +0000 Subject: [PATCH 07/19] Bump commons-io:commons-io from 2.14.0 to 2.15.0 Bumps commons-io:commons-io from 2.14.0 to 2.15.0. --- updated-dependencies: - dependency-name: commons-io:commons-io dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6761de42..3947fcf6 100644 --- a/pom.xml +++ b/pom.xml @@ -71,7 +71,7 @@ commons-io commons-io - 2.14.0 + 2.15.0 org.apache.commons From 25ed6df1dd1cbfba7951be6be2b5175888fe94cb Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Sun, 29 Oct 2023 01:16:28 +0200 Subject: [PATCH 08/19] Allow copy all files without timestamp checking by DirectoryArchiver Implements forced options. --- .../archiver/dir/DirectoryArchiver.java | 46 +++++++- .../plexus/archiver/util/ResourceUtils.java | 35 ++---- .../jar/DirectoryArchiverUnpackJarTest.java | 107 +++++++++++++++--- .../archiver/util/ResourceUtilsTest.java | 43 +++++++ 4 files changed, 181 insertions(+), 50 deletions(-) create mode 100644 src/test/java/org/codehaus/plexus/archiver/util/ResourceUtilsTest.java diff --git a/src/main/java/org/codehaus/plexus/archiver/dir/DirectoryArchiver.java b/src/main/java/org/codehaus/plexus/archiver/dir/DirectoryArchiver.java index 0b38f966..1034c83c 100644 --- a/src/main/java/org/codehaus/plexus/archiver/dir/DirectoryArchiver.java +++ b/src/main/java/org/codehaus/plexus/archiver/dir/DirectoryArchiver.java @@ -19,6 +19,7 @@ import java.io.File; import java.io.IOException; +import java.io.InputStream; import java.nio.file.Files; import java.nio.file.attribute.FileTime; import java.util.ArrayList; @@ -42,6 +43,15 @@ public class DirectoryArchiver extends AbstractArchiver { private final List directoryChmods = new ArrayList<>(); + private long filesCopied; + + /** + * Default constructor. + */ + public DirectoryArchiver() { + // preserver default behavior + setForced(false); + } public void resetArchiver() throws IOException { cleanUp(); @@ -67,7 +77,7 @@ public void execute() throws ArchiverException, IOException { throw new ArchiverException(destDirectory + " is not writable."); } - getLogger().info("Copying files to " + destDirectory.getAbsolutePath()); + getLogger().info("Copying files to {}", destDirectory.getAbsolutePath()); try { while (iter.hasNext()) { @@ -93,6 +103,20 @@ public void execute() throws ArchiverException, IOException { directoryChmods.forEach(Runnable::run); directoryChmods.clear(); + + if (filesCopied > 0) { + getLogger() + .info( + "{} file{} copied to {}", + filesCopied, + filesCopied > 0 ? "s" : "", + destDirectory.getAbsolutePath()); + } else { + getLogger().info("All files are uptodate in {}", destDirectory.getAbsolutePath()); + } + + filesCopied = 0; + } catch (final IOException ioe) { final String message = "Problem copying files : " + ioe.getMessage(); throw new ArchiverException(message, ioe); @@ -118,15 +142,20 @@ protected void copyFile(final ArchiveEntry entry, final String vPath) throws Arc final File outFile = new File(vPath); final long inLastModified = in.getLastModified(); - final long outLastModified = outFile.lastModified(); - if (ResourceUtils.isUptodate(inLastModified, outLastModified)) { - return; + + if (!isForced()) { + final long outLastModified = outFile.lastModified(); + if (ResourceUtils.isUptodate(inLastModified, outLastModified)) { + return; + } } if (!in.isDirectory()) { makeParentDirectories(outFile); - ResourceUtils.copyFile(entry.getInputStream(), outFile); - + try (InputStream input = entry.getInputStream()) { + ResourceUtils.copyFile(input, outFile); + } + filesCopied++; setFileModes(entry, outFile, inLastModified); } else { // file is a directory if (outFile.exists()) { @@ -191,4 +220,9 @@ protected void close() throws IOException {} protected String getArchiveType() { return "directory"; } + + @Override + public boolean isSupportingForced() { + return true; + } } diff --git a/src/main/java/org/codehaus/plexus/archiver/util/ResourceUtils.java b/src/main/java/org/codehaus/plexus/archiver/util/ResourceUtils.java index 1bd25e01..b03a7e76 100644 --- a/src/main/java/org/codehaus/plexus/archiver/util/ResourceUtils.java +++ b/src/main/java/org/codehaus/plexus/archiver/util/ResourceUtils.java @@ -3,12 +3,12 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; -import java.io.OutputStream; import java.nio.file.Files; import org.codehaus.plexus.components.io.functions.FileSupplier; import org.codehaus.plexus.components.io.resources.PlexusIoResource; -import org.codehaus.plexus.util.IOUtil; + +import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; /** * Utility class for work with {@link PlexusIoResource} instances. @@ -35,16 +35,7 @@ public static boolean isUptodate(PlexusIoResource source, File destination) { * the given modification date. */ public static boolean isUptodate(PlexusIoResource source, long destinationDate) { - final long s = source.getLastModified(); - if (s == PlexusIoResource.UNKNOWN_MODIFICATION_DATE) { - return false; - } - - if (destinationDate == 0) { - return false; - } - - return destinationDate > s; + return isUptodate(source.getLastModified(), destinationDate); } /** @@ -60,16 +51,15 @@ public static boolean isUptodate(long sourceDate, long destinationDate) { return false; } - return destinationDate > sourceDate; + return destinationDate >= sourceDate; } /** * Copies the sources contents to the given destination file. */ public static void copyFile(PlexusIoResource in, File outFile) throws IOException { - try (InputStream input = in.getContents(); - OutputStream output = Files.newOutputStream(outFile.toPath())) { - IOUtil.copy(input, output); + try (InputStream input = in.getContents()) { + Files.copy(input, outFile.toPath(), REPLACE_EXISTING); } } @@ -77,18 +67,7 @@ public static void copyFile(PlexusIoResource in, File outFile) throws IOExceptio * Copies the sources contents to the given destination file. */ public static void copyFile(InputStream input, File outFile) throws IOException { - OutputStream output = null; - try { - output = Files.newOutputStream(outFile.toPath()); - IOUtil.copy(input, output); - output.close(); - output = null; - input.close(); - input = null; - } finally { - IOUtil.close(input); - IOUtil.close(output); - } + Files.copy(input, outFile.toPath(), REPLACE_EXISTING); } /** diff --git a/src/test/java/org/codehaus/plexus/archiver/jar/DirectoryArchiverUnpackJarTest.java b/src/test/java/org/codehaus/plexus/archiver/jar/DirectoryArchiverUnpackJarTest.java index fe11d17e..61cc037b 100644 --- a/src/test/java/org/codehaus/plexus/archiver/jar/DirectoryArchiverUnpackJarTest.java +++ b/src/test/java/org/codehaus/plexus/archiver/jar/DirectoryArchiverUnpackJarTest.java @@ -2,11 +2,17 @@ import javax.annotation.Nonnull; +import java.io.BufferedWriter; import java.io.File; import java.io.IOException; import java.io.InputStream; -import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardOpenOption; +import java.nio.file.attribute.FileTime; +import org.apache.commons.io.FileUtils; import org.codehaus.plexus.archiver.Archiver; import org.codehaus.plexus.archiver.TestSupport; import org.codehaus.plexus.archiver.util.ArchiveEntryUtils; @@ -15,7 +21,7 @@ import org.codehaus.plexus.components.io.resources.PlexusIoResource; import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.assertj.core.api.Assertions.assertThat; class DirectoryArchiverUnpackJarTest extends TestSupport { @@ -36,25 +42,94 @@ public InputStream transform(@Nonnull PlexusIoResource resource, @Nonnull InputS @Test void test_dependency_sets_depSet_unpacked_rdonly() throws Exception { File src = new File("src/test/resources/unpack_issue.jar"); - assertTrue(src.exists()); + File dest = new File("target/depset_unpack"); + FileUtils.deleteDirectory(dest); + assertThat(src).isFile(); + + Archiver archiver = createArchiver(src, dest); + archiver.setDefaultDirectoryMode(0555); + archiver.setDirectoryMode(0555); // causes permission denied if bug is not fixed. + archiver.createArchive(); + assertThat(new File(dest, "child-1/META-INF/MANIFEST.MF")).isFile(); + + // make them writeable or mvn clean will fail + ArchiveEntryUtils.chmod(new File(dest, "child-1/META-INF"), 0777); + ArchiveEntryUtils.chmod(new File(dest, "child-1/META-INF/maven"), 0777); + ArchiveEntryUtils.chmod(new File(dest, "child-1/META-INF/maven/test"), 0777); + ArchiveEntryUtils.chmod(new File(dest, "child-1/META-INF/maven/test/child1"), 0777); + ArchiveEntryUtils.chmod(new File(dest, "child-1/assembly-resources"), 0777); + } + + @Test + void test_dependency_sets_depSet_unpacked_by_default_dont_override() throws Exception { + + File src = new File("src/test/resources/unpack_issue.jar"); + File dest = new File("target/depset_unpack_dont_override"); + FileUtils.deleteDirectory(dest); + + Archiver archiver = createArchiver(src, dest); + archiver.createArchive(); + + File manifestFile = new File(dest, "child-1/META-INF/MANIFEST.MF"); + assertThat(manifestFile).content().hasLineCount(6); + + // change content of one file + overwriteFileContent(manifestFile.toPath()); + assertThat(manifestFile).content().hasLineCount(1); + + archiver = createArchiver(src, dest); + archiver.createArchive(); + + // content was not changed + assertThat(manifestFile).content().hasLineCount(1); + } + + @Test + void test_dependency_sets_depSet_force_unpacked() throws Exception { + + File src = new File("src/test/resources/unpack_issue.jar"); + File dest = new File("target/depset_unpack_force"); + FileUtils.deleteDirectory(dest); + + Archiver archiver = createArchiver(src, dest); + archiver.createArchive(); + + File manifestFile = new File(dest, "child-1/META-INF/MANIFEST.MF"); + assertThat(manifestFile).content().hasLineCount(6); + + // change content of one file + overwriteFileContent(manifestFile.toPath()); + assertThat(manifestFile).content().hasLineCount(1); + + archiver = createArchiver(src, dest); + archiver.setForced(true); + archiver.createArchive(); + + // content was changed + assertThat(manifestFile).content().hasLineCount(6); + } + + private Archiver createArchiver(File src, File dest) { + assertThat(src).isFile(); DefaultArchivedFileSet afs = DefaultArchivedFileSet.archivedFileSet(src); afs.setIncludes(DEFAULT_INCLUDES_ARRAY); afs.setExcludes(null); afs.setPrefix("child-1/"); afs.setStreamTransformer(new IdentityTransformer()); - Archiver archiver = (Archiver) lookup(Archiver.class, "dir"); - archiver.setDefaultDirectoryMode(0555); - archiver.setDirectoryMode(0555); // causes permission denied if bug is not fixed. - archiver.setDestFile(new File("target/depset_unpack")); - archiver.addArchivedFileSet(afs, Charset.forName("UTF-8")); - archiver.createArchive(); - assertTrue(new File("target/depset_unpack/child-1/META-INF/MANIFEST.MF").exists()); + Archiver archiver = lookup(Archiver.class, "dir"); + archiver.setDestFile(dest); + archiver.addArchivedFileSet(afs, StandardCharsets.UTF_8); + return archiver; + } - // make them writeable or mvn clean will fail - ArchiveEntryUtils.chmod(new File("target/depset_unpack/child-1/META-INF"), 0777); - ArchiveEntryUtils.chmod(new File("target/depset_unpack/child-1/META-INF/maven"), 0777); - ArchiveEntryUtils.chmod(new File("target/depset_unpack/child-1/META-INF/maven/test"), 0777); - ArchiveEntryUtils.chmod(new File("target/depset_unpack/child-1/META-INF/maven/test/child1"), 0777); - ArchiveEntryUtils.chmod(new File("target/depset_unpack/child-1/assembly-resources"), 0777); + private void overwriteFileContent(Path path) throws IOException { + FileTime lastModifiedTime = Files.getLastModifiedTime(path); + + try (BufferedWriter writer = + Files.newBufferedWriter(path, StandardCharsets.UTF_8, StandardOpenOption.TRUNCATE_EXISTING)) { + writer.write("TEST123"); + } + + Files.setLastModifiedTime(path, lastModifiedTime); } } diff --git a/src/test/java/org/codehaus/plexus/archiver/util/ResourceUtilsTest.java b/src/test/java/org/codehaus/plexus/archiver/util/ResourceUtilsTest.java new file mode 100644 index 00000000..bcd43da2 --- /dev/null +++ b/src/test/java/org/codehaus/plexus/archiver/util/ResourceUtilsTest.java @@ -0,0 +1,43 @@ +/* + * Copyright The Plexus developers. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.codehaus.plexus.archiver.util; + +import java.util.stream.Stream; + +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +import static org.assertj.core.api.Assertions.assertThat; + +class ResourceUtilsTest { + + public static Stream testIsUpToDate() { + return Stream.of( + Arguments.of(0, 0, false), // dest and src 0 + Arguments.of(100, 0, false), // dest 0 + Arguments.of(0, 100, false), // src 0 + Arguments.of(100, 200, true), + Arguments.of(200, 100, false), + Arguments.of(100, 100, true)); + } + + @ParameterizedTest + @MethodSource + void testIsUpToDate(long source, long destination, boolean expected) { + assertThat(ResourceUtils.isUptodate(source, destination)).isEqualTo(expected); + } +} From 36ccab0f67aa9cce5440498c8d48c11646625bd0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 23:05:08 +0000 Subject: [PATCH 09/19] Bump com.github.luben:zstd-jni from 1.5.5-6 to 1.5.5-10 Bumps [com.github.luben:zstd-jni](https://github.com/luben/zstd-jni) from 1.5.5-6 to 1.5.5-10. - [Commits](https://github.com/luben/zstd-jni/commits) --- updated-dependencies: - dependency-name: com.github.luben:zstd-jni dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3947fcf6..42ea82f8 100644 --- a/pom.xml +++ b/pom.xml @@ -98,7 +98,7 @@ com.github.luben zstd-jni - 1.5.5-6 + 1.5.5-10 runtime From 87f62d5ffed709dc0d429d643b2f064dc84ee2ad Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Sun, 5 Nov 2023 18:17:32 +0100 Subject: [PATCH 10/19] Update info about release notes in README, ReleaseNotes --- README.md | 15 ++++----------- ReleaseNotes.md | 5 +++++ 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index ffe175e8..bd57ceb7 100644 --- a/README.md +++ b/README.md @@ -16,14 +16,7 @@ This patch has been integrated into the Release 3.6.0 ## Release Notes -You can find details about the different releases in the [Release Notes](https://github.com/codehaus-plexus/plexus-archiver/blob/master/ReleaseNotes.md). - - * [Release 4.2.5](https://github.com/codehaus-plexus/plexus-archiver/releases/tag/plexus-archiver-4.2.5). - * [Release 4.2.4](https://github.com/codehaus-plexus/plexus-archiver/releases/tag/plexus-archiver-4.2.4). - * [Release 4.2.3](https://github.com/codehaus-plexus/plexus-archiver/releases/tag/plexus-archiver-4.2.3). - * [Release 4.2.2](https://github.com/codehaus-plexus/plexus-archiver/releases/tag/plexus-archiver-4.2.2). - * [Release 4.2.1](https://github.com/codehaus-plexus/plexus-archiver/blob/master/ReleaseNotes.md#plexus-archiver-421). - * [Release 4.2.0](https://github.com/codehaus-plexus/plexus-archiver/blob/master/ReleaseNotes.md#plexus-archiver-420). - * [Release 4.1.0](https://github.com/codehaus-plexus/plexus-archiver/blob/master/ReleaseNotes.md#plexus-archiver-410). - * [Release 4.0.0](https://github.com/codehaus-plexus/plexus-archiver/blob/master/ReleaseNotes.md#plexus-archiver-400). - +Current release notes are maintained on GitHub [releases](https://github.com/codehaus-plexus/plexus-archiver/releases) + +You can find details about the historical releases in the [Release Notes](https://github.com/codehaus-plexus/plexus-archiver/blob/master/ReleaseNotes.md). + diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 018a6b7d..fdb9993b 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,6 +1,11 @@ Plexus Archiver Release Notes ======================================================================== +Newer release +--------------- + +Newer release notes are maintained on GitHub [releases](https://github.com/codehaus-plexus/plexus-archiver/releases) + Plexus Archiver 4.2.1 --------------------- From b31477fb321484a115fcfa44d0f6b6cb0a902d8c Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Sun, 5 Nov 2023 19:03:06 +0100 Subject: [PATCH 11/19] [maven-release-plugin] prepare release plexus-archiver-4.9.0 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 42ea82f8..4d882b61 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ plexus-archiver - 4.8.1-SNAPSHOT + 4.9.0 Plexus Archiver Component https://codehaus-plexus.github.io/plexus-archiver/ @@ -30,7 +30,7 @@ scm:git:https://github.com/codehaus-plexus/plexus-archiver.git scm:git:https://github.com/codehaus-plexus/plexus-archiver.git - HEAD + plexus-archiver-4.9.0 https://github.com/codehaus-plexus/plexus-archiver/tree/${project.scm.tag}/ @@ -46,7 +46,7 @@ 1.7.36 - 2023-07-25T07:06:02Z + 2023-11-05T18:01:31Z From b353ae3240cfda1c23ec8c1d80e719af40698b66 Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Sun, 5 Nov 2023 19:03:10 +0100 Subject: [PATCH 12/19] [maven-release-plugin] prepare for next development iteration --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 4d882b61..ce3084ac 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ plexus-archiver - 4.9.0 + 4.9.1-SNAPSHOT Plexus Archiver Component https://codehaus-plexus.github.io/plexus-archiver/ @@ -30,7 +30,7 @@ scm:git:https://github.com/codehaus-plexus/plexus-archiver.git scm:git:https://github.com/codehaus-plexus/plexus-archiver.git - plexus-archiver-4.9.0 + HEAD https://github.com/codehaus-plexus/plexus-archiver/tree/${project.scm.tag}/ @@ -46,7 +46,7 @@ 1.7.36 - 2023-11-05T18:01:31Z + 2023-11-05T18:03:09Z From 9c0e021ab9d58dd8b05a74a5ba6c82f8070c8d93 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Nov 2023 23:19:22 +0000 Subject: [PATCH 13/19] Bump org.apache.commons:commons-compress from 1.24.0 to 1.25.0 Bumps org.apache.commons:commons-compress from 1.24.0 to 1.25.0. --- updated-dependencies: - dependency-name: org.apache.commons:commons-compress dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ce3084ac..369a6687 100644 --- a/pom.xml +++ b/pom.xml @@ -76,7 +76,7 @@ org.apache.commons commons-compress - 1.24.0 + 1.25.0 From fca25e56461394a6d34af8e018ec0348885cbad8 Mon Sep 17 00:00:00 2001 From: redzi Date: Tue, 21 Nov 2023 20:24:57 +0100 Subject: [PATCH 14/19] #311 - provide fluent setter for usingDefaultExcludes flag in AbstractFileSet. --- .../codehaus/plexus/archiver/util/AbstractFileSet.java | 6 ++++++ .../codehaus/plexus/archiver/tar/TarArchiverTest.java | 4 ++-- .../plexus/archiver/util/DefaultFileSetTest.java | 9 +++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/codehaus/plexus/archiver/util/AbstractFileSet.java b/src/main/java/org/codehaus/plexus/archiver/util/AbstractFileSet.java index 5c2cde54..fbf093b0 100644 --- a/src/main/java/org/codehaus/plexus/archiver/util/AbstractFileSet.java +++ b/src/main/java/org/codehaus/plexus/archiver/util/AbstractFileSet.java @@ -162,6 +162,12 @@ public T includeEmptyDirs(boolean includeEmptyDirectories) { return (T) this; } + @SuppressWarnings("unchecked") + public T usingDefaultExcludes(boolean usingDefaultExcludes) { + setUsingDefaultExcludes(usingDefaultExcludes); + return (T) this; + } + public void setStreamTransformer(@Nonnull InputStreamTransformer streamTransformer) { this.streamTransformer = streamTransformer; } diff --git a/src/test/java/org/codehaus/plexus/archiver/tar/TarArchiverTest.java b/src/test/java/org/codehaus/plexus/archiver/tar/TarArchiverTest.java index 2bbfbd06..615cd41b 100644 --- a/src/test/java/org/codehaus/plexus/archiver/tar/TarArchiverTest.java +++ b/src/test/java/org/codehaus/plexus/archiver/tar/TarArchiverTest.java @@ -449,8 +449,8 @@ void testSymlinkArchivedFileSet() throws Exception { final File tarFile2 = getTestFile("target/output/pasymlinks-archivedFileset.tar"); final TarArchiver tarArchiver = getPosixTarArchiver(); tarArchiver.setDestFile(tarFile2); - DefaultArchivedFileSet archivedFileSet = DefaultArchivedFileSet.archivedFileSet(tarFile); - archivedFileSet.setUsingDefaultExcludes(false); + DefaultArchivedFileSet archivedFileSet = + DefaultArchivedFileSet.archivedFileSet(tarFile).usingDefaultExcludes(false); tarArchiver.addArchivedFileSet(archivedFileSet); tarArchiver.createArchive(); diff --git a/src/test/java/org/codehaus/plexus/archiver/util/DefaultFileSetTest.java b/src/test/java/org/codehaus/plexus/archiver/util/DefaultFileSetTest.java index 0f8750e6..702b0e18 100644 --- a/src/test/java/org/codehaus/plexus/archiver/util/DefaultFileSetTest.java +++ b/src/test/java/org/codehaus/plexus/archiver/util/DefaultFileSetTest.java @@ -16,11 +16,16 @@ class DefaultFileSetTest { void testCreate() { final String[] includes = {"zz", "yy"}; final String[] exc = {"xx1", "xx2"}; - final DefaultFileSet dfs = - fileSet(new File("foo")).prefixed("pfx").include(includes).exclude(exc); + final boolean usingDefaultExcludes = true; + final DefaultFileSet dfs = fileSet(new File("foo")) + .prefixed("pfx") + .include(includes) + .exclude(exc) + .usingDefaultExcludes(usingDefaultExcludes); assertEquals("foo", dfs.getDirectory().getName()); assertEquals("pfx", dfs.getPrefix()); assertEquals("zz", dfs.getIncludes()[0]); assertEquals("xx1", dfs.getExcludes()[0]); + assertEquals(usingDefaultExcludes, dfs.isUsingDefaultExcludes()); } } From 20cf65421aacbb133a9fe228dbe9fc06000def7a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 23:22:42 +0000 Subject: [PATCH 15/19] Bump commons-io:commons-io from 2.15.0 to 2.15.1 Bumps commons-io:commons-io from 2.15.0 to 2.15.1. --- updated-dependencies: - dependency-name: commons-io:commons-io dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 369a6687..764553b1 100644 --- a/pom.xml +++ b/pom.xml @@ -71,7 +71,7 @@ commons-io commons-io - 2.15.0 + 2.15.1 org.apache.commons From cb4b6668a8dde2d04aaac37e8265b3e009cb2ca9 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Sat, 2 Dec 2023 10:24:44 +0100 Subject: [PATCH 16/19] Reuse plexus-pom action for CI --- .github/workflows/maven.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index e5fe6f6f..09feae47 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -name: Maven build +name: GitHub CI on: [push, pull_request] @@ -23,3 +23,9 @@ jobs: build: name: Build it uses: codehaus-plexus/.github/.github/workflows/maven.yml@master + + deploy: + name: Deploy + needs: build + uses: codehaus-plexus/.github/.github/workflows/maven-deploy.yml@master + secrets: inherit From 54c42c20e531b9e642a3c70c215814b5a4d61a3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Dec 2023 23:29:59 +0000 Subject: [PATCH 17/19] Bump com.github.luben:zstd-jni from 1.5.5-10 to 1.5.5-11 Bumps [com.github.luben:zstd-jni](https://github.com/luben/zstd-jni) from 1.5.5-10 to 1.5.5-11. - [Commits](https://github.com/luben/zstd-jni/compare/v1.5.5-10...v1.5.5-11) --- updated-dependencies: - dependency-name: com.github.luben:zstd-jni dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 764553b1..a9c6ebba 100644 --- a/pom.xml +++ b/pom.xml @@ -98,7 +98,7 @@ com.github.luben zstd-jni - 1.5.5-10 + 1.5.5-11 runtime From d953f322ccbb38479b04abbde3645f77eafd489a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 23:29:53 +0000 Subject: [PATCH 18/19] Bump org.codehaus.plexus:plexus from 15 to 16 Bumps [org.codehaus.plexus:plexus](https://github.com/codehaus-plexus/plexus-pom) from 15 to 16. - [Release notes](https://github.com/codehaus-plexus/plexus-pom/releases) - [Commits](https://github.com/codehaus-plexus/plexus-pom/commits) --- updated-dependencies: - dependency-name: org.codehaus.plexus:plexus dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a9c6ebba..aa662ae5 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.codehaus.plexus plexus - 15 + 16 plexus-archiver From fb02b02a78d4adecef4e32f304f9f6d3ab7b9861 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Sun, 24 Dec 2023 00:08:16 +0100 Subject: [PATCH 19/19] [maven-release-plugin] prepare release plexus-archiver-4.9.1 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index aa662ae5..c276cf44 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ plexus-archiver - 4.9.1-SNAPSHOT + 4.9.1 Plexus Archiver Component https://codehaus-plexus.github.io/plexus-archiver/ @@ -30,7 +30,7 @@ scm:git:https://github.com/codehaus-plexus/plexus-archiver.git scm:git:https://github.com/codehaus-plexus/plexus-archiver.git - HEAD + plexus-archiver-4.9.1 https://github.com/codehaus-plexus/plexus-archiver/tree/${project.scm.tag}/ @@ -46,7 +46,7 @@ 1.7.36 - 2023-11-05T18:03:09Z + 2023-12-23T23:07:44Z