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/01/09 19:32:20 UTC

[logging-log4j-tools] branch release/0.1.0 updated (3bb6172 -> cc214aa)

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

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


 discard 3bb6172  Rename `groupId` and packages from `o.a.l.log4j.tools` to `o.a.l.log4j`
     add c79f69f  Rename `groupId` and packages from `o.a.l.log4j.tools` to `o.a.l.log4j`
     add ab862e9  Bump actions/checkout from 3.2.0 to 3.3.0 (#11)
     add ec06e21  Nullability and cosmetic changes
     add d088427  Set `revision` back to 0.1.0-SNAPSHOT
     add 72f8559  Add `RELEASING.adoc`
     add 5f5b38d  Avoid workflow run for merged `dependabot` PRs
     add d826c80  Add "Support" to README
     add 1df7c8c  Merge `SECURITY.adoc` into `README.adoc`
     add 798cd7f  Bump actions/upload-artifact from 3.1.1 to 3.1.2
     add 4c920d9  Merge pull request #12 from apache/dependabot/github_actions/actions/upload-artifact-3.1.2
     add 6c3273d  INFRA-24051 Set Nexus credentials for releases
     new 7627f57  Update release date in CHANGELOG
     new 1bbb6aa  Set version to 0.1.0
     new cc214aa  Skip empty directories in exporter

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (3bb6172)
            \
             N -- N -- N   refs/heads/release/0.1.0 (cc214aa)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/build.yml                        | 21 +++++---
 CHANGELOG.adoc                                     |  2 +-
 README.adoc                                        | 13 ++++-
 RELEASING.adoc                                     | 59 ++++++++++++++++++++++
 SECURITY.adoc                                      | 21 --------
 .../logging/log4j/changelog/ChangelogEntry.java    | 21 ++++----
 .../logging/log4j/changelog/ChangelogFiles.java    |  7 ++-
 .../logging/log4j/changelog/ChangelogRelease.java  | 20 +-------
 .../changelog/exporter/ChangelogExporter.java      | 53 +++++++++++--------
 .../log4j/changelog/exporter/FreeMarkerUtils.java  |  9 ++--
 .../log4j/changelog/importer/MavenChanges.java     | 40 +++++++++------
 .../changelog/importer/MavenChangesImporter.java   | 18 +++----
 .../changelog/releaser/ChangelogReleaser.java      | 39 +++++++-------
 .../log4j/changelog/util/AsciiDocUtils.java        | 40 ---------------
 .../logging/log4j/changelog/util/FileUtils.java    | 45 +++++++++--------
 .../log4j/changelog/util/PropertyUtils.java        |  3 ++
 .../logging/log4j/changelog/util/StringUtils.java  |  7 ++-
 .../logging/log4j/changelog/util/XmlReader.java    |  4 +-
 .../logging/log4j/changelog/util/XmlWriter.java    | 14 ++---
 19 files changed, 236 insertions(+), 200 deletions(-)
 create mode 100644 RELEASING.adoc
 delete mode 100644 SECURITY.adoc
 delete mode 100644 log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/util/AsciiDocUtils.java


[logging-log4j-tools] 03/03: Skip empty directories in exporter

Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit cc214aad1289920ebe063b093ed1e22d9d550662
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Mon Jan 9 20:31:15 2023 +0100

    Skip empty directories in exporter
---
 .../changelog/exporter/ChangelogExporter.java      | 33 ++++++++++++++--------
 1 file changed, 21 insertions(+), 12 deletions(-)

diff --git a/log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporter.java b/log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporter.java
index 1ea18de..236dcea 100644
--- a/log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporter.java
+++ b/log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporter.java
@@ -18,6 +18,7 @@ package org.apache.logging.log4j.changelog.exporter;
 
 import java.io.IOException;
 import java.io.UncheckedIOException;
+import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.*;
 import java.util.stream.Collectors;
@@ -38,18 +39,7 @@ public final class ChangelogExporter {
         final ChangelogExporterArgs args = ChangelogExporterArgs.fromSystemProperties();
 
         // Find release directories
-        final List<Path> releaseDirectories = FileUtils
-                .findAdjacentFiles(
-                        args.changelogDirectory, true,
-                        paths -> paths
-                                .filter(file -> file.toFile().isDirectory())
-                                .sorted(Comparator.comparing(releaseDirectory -> {
-                                    final Path releaseXmlFile = ChangelogFiles.releaseXmlFile(releaseDirectory);
-                                    final ChangelogRelease changelogRelease =
-                                            ChangelogRelease.readFromXmlFile(releaseXmlFile);
-                                    return changelogRelease.date;
-                                }))
-                                .collect(Collectors.toList()));
+        final List<Path> releaseDirectories = findReleaseDirectories(args);
         final int releaseDirectoryCount = releaseDirectories.size();
 
         // Read the release information files
@@ -120,6 +110,25 @@ public final class ChangelogExporter {
 
     }
 
+    private static List<Path> findReleaseDirectories(ChangelogExporterArgs args) {
+        return FileUtils.findAdjacentFiles(
+                args.changelogDirectory, true,
+                paths -> paths
+                        .filter(ChangelogExporter::isNonEmptyDirectory)
+                        .sorted(Comparator.comparing(releaseDirectory -> {
+                            final Path releaseXmlFile = ChangelogFiles.releaseXmlFile(releaseDirectory);
+                            final ChangelogRelease changelogRelease =
+                                    ChangelogRelease.readFromXmlFile(releaseXmlFile);
+                            return changelogRelease.date;
+                        }))
+                        .collect(Collectors.toList()));
+    }
+
+    private static boolean isNonEmptyDirectory(final Path path) {
+        return Files.isDirectory(path) &&
+                FileUtils.findAdjacentFiles(path, false, paths -> paths.findFirst().isPresent());
+    }
+
     private static void exportRelease(
             final Path outputDirectory,
             final Path releaseDirectory,


[logging-log4j-tools] 01/03: Update release date in CHANGELOG

Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7627f579ab0f2c7026a6efc3f5ae2009baef2c95
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Mon Jan 9 20:22:33 2023 +0100

    Update release date in CHANGELOG
---
 CHANGELOG.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc
index d9a0684..d0a23a4 100644
--- a/CHANGELOG.adoc
+++ b/CHANGELOG.adoc
@@ -15,6 +15,6 @@ See the License for the specific language governing permissions and
 limitations under the License.
 ////
 
-== 0.1.0 (2023-01-04)
+== 0.1.0 (2023-01-09)
 
 * Added `log4j-tools-bom` and `log4j-changelog` modules (for https://issues.apache.org/jira/browse/LOG4J2-3628[LOG4J2-3628] by `vy`)


[logging-log4j-tools] 02/03: Set version to 0.1.0

Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 1bbb6aaec91729aca05e8c62d4ae03b31fa93b8d
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Mon Jan 9 20:22:48 2023 +0100

    Set version to 0.1.0
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index c7c76fa..400c3af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,7 +54,7 @@
   <properties>
 
     <!-- project version -->
-    <revision>0.1.0-SNAPSHOT</revision>
+    <revision>0.1.0</revision>
 
     <!-- `minimalJavaBuildVersion` is employed by `org.apache:apache`, which is the parent of `org.apache.logging:logging-parent`, which is the parent of us.
          `minimalJavaBuildVersion` is used for enforcing the compiler version.