You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by vy...@apache.org on 2023/07/02 18:36:58 UTC

[logging-log4j-tools] 01/03: One last retouche (`install` still needs to be replaced with `deploy`)

This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch release/0.4.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j-tools.git

commit 46652fd437f1c5bd7553710389dc0c086251951d
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Fri Jun 30 17:05:35 2023 +0200

    One last retouche (`install` still needs to be replaced with `deploy`)
---
 .github/workflows/build.yml |  2 +-
 pom.xml                     | 20 +++++++-------------
 2 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 5335ad6..3efc97b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -192,5 +192,5 @@ jobs:
         uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce   # 3.1.2
         with:
           name: Sources
-          path: /tmp/apache-log4j-tools-*-src.zip*
+          path: /tmp/apache-log4j-tools-*.zip*
           if-no-files-found: error
diff --git a/pom.xml b/pom.xml
index dee1dd7..54f17f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -480,18 +480,12 @@
                     ZipOutputStream zipOutputStream = new ZipOutputStream(outputStream);
                     try {
                         for (String file : pathByFile.keySet()) {
-                            try {
-                                Path path = pathByFile.get(file);
-                                ZipEntry zipEntry = new ZipEntry(file);
-                                zipEntry.setTime(0);
-                                zipOutputStream.putNextEntry(zipEntry);
-                                zipOutputStream.write(Files.readAllBytes(path));
-                                zipOutputStream.closeEntry();
-                            } catch (Exception error) {
-                                System.err.println("failed to add file to ZIP: " + path);
-                                error.printStackTrace();
-                                System.exit(1);
-                            }
+                            Path path = pathByFile.get(file);
+                            ZipEntry zipEntry = new ZipEntry(file);
+                            zipEntry.setTime(0);
+                            zipOutputStream.putNextEntry(zipEntry);
+                            zipOutputStream.write(Files.readAllBytes(path));
+                            zipOutputStream.closeEntry();
                         }
                     } finally {
                         zipOutputStream.close();
@@ -527,7 +521,7 @@
                         public void accept(Path path) {
                             File file = path.toFile();
                             if (file.getParentFile().getName().equals("target") &&
-                                    file.getName().matches("^log4j-(.+)-${revision}(-tests|-test-sources|-sources)?\\.jar$")) {
+                                    file.getName().matches("^log4j-(.+)-${revision}(-tests)?\\.jar$")) {
                                 pathByFile.put(file.getName(), path);
                                 jarCount[0]++;
                             }