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/10/02 19:41:56 UTC

[logging-log4j-transform] branch parent-10.1.1 created (now 7013ecf)

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

vy pushed a change to branch parent-10.1.1
in repository https://gitbox.apache.org/repos/asf/logging-log4j-transform.git


      at 7013ecf  Try fixing tests

This branch includes the following new commits:

     new e6c6c6f  Improve `generate-email.sh`
     new 26336a2  Point `README.adoc` to the website
     new a5834dc  Migrate `pom.xml` to `logging-parent` version `10.1.1`
     new 3f477a6  Fix Error Prone warnings
     new 69015fa  Create the project website
     new 7013ecf  Try fixing tests

The 6 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.



[logging-log4j-transform] 05/06: Create the project website

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

vy pushed a commit to branch parent-10.1.1
in repository https://gitbox.apache.org/repos/asf/logging-log4j-transform.git

commit 69015fad627e06e8e7ded3b1e2a0edbb633ada1a
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Mon Oct 2 20:24:07 2023 +0200

    Create the project website
---
 .../src/doc/process-classes-mojo.adoc              |  70 ----------
 .../README.adoc                                    |  77 -----------
 .../src/site/markdown/index.md                     |  88 -------------
 .../src/site/site.xml                              |  52 --------
 src/site/_constants.adoc                           |  41 ++++++
 src/site/_constants.tmpl.adoc                      |  41 ++++++
 .../site/_log4j-transform-maven-plugin.adoc        | 143 ++++++++++++++-------
 ...4j-transform-maven-shade-plugin-extensions.adoc |  74 +++++++++++
 src/site/index.adoc                                |  90 +++++++++++++
 9 files changed, 344 insertions(+), 332 deletions(-)

diff --git a/log4j-transform-maven-plugin/src/doc/process-classes-mojo.adoc b/log4j-transform-maven-plugin/src/doc/process-classes-mojo.adoc
deleted file mode 100644
index b310e23..0000000
--- a/log4j-transform-maven-plugin/src/doc/process-classes-mojo.adoc
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to you 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.
-//
-= `log4j-transform:process-classes`
-
-Full name::
-
-`org.apache.logging.log4j:log4j-transform-maven-plugin:0.1.0:process-classes`
-
-Description::
-
-Generates static location information of Log4j 2.x API calls in the project classes.
-The resulting bytecode will not rely on runtime resolution of the location information.
-
-Attributes::
-
- * Requires a Maven project to be executed
- * Requires dependency resolution of artifacts in scope: `<code>compile</code>`
- * The goal is thread-safe and supports parallel builds
- * Binds by default to the http://maven.apache.org/ref/current/maven-core/lifecycles.html[lifecycle phase]: `process-classes`.
-
-== Required Parameters
-
-[cols="3,3,10"]
-|===
-|Name|Type|Description
-
-|`<sourceDirectory>`
-|`File`
-| The directory containing classes to be processed.
-It defaults to `${project.build.outputDirectory}`.
-
-|`<sourceDirectory>`
-|`File`
-| The directory where woven classes will be written.
-It defaults to `${project.build.outputDirectory}`.
-|===
-
-== Optional Parameters
-
-[cols="3,3,10"]
-|===
-|Name|Type|Description
-
-|`<includes>`
-|`List<String>`
-| Files to include. If empty all class files will be processed.
-
-|`<excludes>`
-|`List<String>`
-| Files to exclude.
-
-|`<staleMillis>`
-|`int`
-| Sets the granularity in milliseconds of the last modification date for testing if a class file needs weaving.
-It defaults to `0` and can be configured using the `lastModGranularityMs` property.
-|===
diff --git a/log4j-transform-maven-shade-plugin-extensions/README.adoc b/log4j-transform-maven-shade-plugin-extensions/README.adoc
deleted file mode 100644
index e5e3528..0000000
--- a/log4j-transform-maven-shade-plugin-extensions/README.adoc
+++ /dev/null
@@ -1,77 +0,0 @@
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to you 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.
-//
-= Log4j Plugin Cache Transformer
-
-A
-https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html[resource transformer]
-for the
-https://maven.apache.org/plugins/maven-shade-plugin/index.html[Apache Maven Shade Plugin]
-that merges `Log4j2Plugins.dat` plugin caches from all the jars containing Log4j 2.x Core components.
-
-This transformer was formerly available at
-https://github.com/edwgiz/maven-shaded-log4j-transformer[edwgiz/maven-shaded-log4j-transformer]
-and was donated to the Apache Software Foundation by its author.
-
-== Usage
-
-This resource transformer is usually used together with the `ManifestResourceTrasnformer` and `ServicesResourceTransformer` to integrate Log4j 2.x libraries in a shaded jar.
-
-A typical configuration is:
-
-[source,xml]
-----
-<project>
-  [...]
-  <build>
-    <plugins>
-      [...]
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-        <version>3.4.1</version>
-        <dependencies>
-          <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-transform-maven-shade-plugin-extensions</artifactId>
-            <version>0.1.0</version>
-          </dependency>
-        </dependencies>
-        <executions>
-          <execution>
-            <goals>
-              <goal>shade</goal>
-            </goals>
-            <configuration>
-              <transformers>
-                <transformer implementation="org.apache.logging.log4j.maven.plugins.shade.transformer.Log4j2PluginCacheFileTransformer"/>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                  <manifestEntries>
-                    <Multi-Release>true</Multi-Release>
-                  </manifestEntries>
-                </transformer>
-              </transformers>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      [...]
-    </plugins>
-  </build>
-  [...]
-</project>
-----
diff --git a/log4j-transform-maven-shade-plugin-extensions/src/site/markdown/index.md b/log4j-transform-maven-shade-plugin-extensions/src/site/markdown/index.md
deleted file mode 100644
index f9cba3c..0000000
--- a/log4j-transform-maven-shade-plugin-extensions/src/site/markdown/index.md
+++ /dev/null
@@ -1,88 +0,0 @@
-<!-- vim: set syn=markdown : -->
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You 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.
--->
-
-# Log4j Maven Shaded Plugin Support
-
-This module provides support for [Apache Maven Shade Plugin](https://maven.apache.org/plugins/maven-shade-plugin/). 
-
-## Introduction to the problem
-
-Log4j 2 is composed of plugins and they are loaded from Log4j2Plugins.dat file found in the classpath at runtime.
-Shading overrides the cache files provided by each individual module. For instance, -web and -core, etc. ... 
-So if you happen to shade libraries providing Log4j 2 plugins, you need this thing.
-
-
-## Overview
-
-This module includes the transformer for [Apache Maven Shade Plugin](https://maven.apache.org/plugins/maven-shade-plugin/), that concatenates `Log4j2Plugins.dat` files,
-so it must be used when there are several Log4j2Plugins.dat files in the fat jar dependencies.
-
-For example a fat jar must be assembled with `org.apache.logging.log4j:log4j-web` that for sure requires also `org.apache.logging.log4j:log4j-core`. Still both includes `Log4j2Plugins.dat` resources the transformer must be configured. 
-
-## Usage
-
-The transformer configuration must augment standard [Apache Maven Shade Plugin](https://maven.apache.org/plugins/maven-shade-plugin/) configuration in `pom.xml`.
-
-```xml
-
-<project>
-    ...
-    <build>
-        ...
-        <plugins>
-            ...
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <version>3.2.4</version>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <transformers>
-                                ...
-                                <transformer
-                                        implementation="org.apache.logging.log4j.maven.plugins.shade.transformer.Log4j2PluginCacheFileTransformer">
-                                </transformer>
-                            </transformers>
-                            ...
-                        </configuration>
-                    </execution>
-                </executions>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.apache.logging.maven</groupId>
-                        <artifactId>log4j-maven-shade-plugin-extensions</artifactId>
-                        <version>${log4jVersion}</version>
-                    </dependency>
-                </dependencies>
-            </plugin>
-        </plugins>
-
-    </build>
-
-</project>
-```
-In the above example `${log4jVersion}` placeholder should point to the same version of the fat jar dependencies of `org.apache.logging.log4j` group
-
-# Legacy
-
-Initially the transformer was developed in this repository  https://github.com/edwgiz/maven-shaded-log4j-transformer
diff --git a/log4j-transform-maven-shade-plugin-extensions/src/site/site.xml b/log4j-transform-maven-shade-plugin-extensions/src/site/site.xml
deleted file mode 100644
index f77f23e..0000000
--- a/log4j-transform-maven-shade-plugin-extensions/src/site/site.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to you 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.
-  -->
-<project name="Log4j Maven Shade Plugin Transformer"
-         xmlns="http://maven.apache.org/DECORATION/1.4.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/DECORATION/1.4.0 http://maven.apache.org/xsd/decoration-1.4.0.xsd">
-  <body>
-    <links>
-      <item name="Apache" href="http://www.apache.org/" />
-      <item name="Logging Services" href="http://logging.apache.org/"/>
-      <item name="Log4j" href="../index.html"/>
-    </links>
-
-    <!-- Component-specific reports -->
-    <menu ref="reports"/>
-
-	<!-- Overall Project Info -->
-    <menu name="Log4j Project Information" img="icon-info-sign">
-      <item name="Dependencies" href="../dependencies.html" />
-      <item name="Dependency Convergence" href="../dependency-convergence.html" />
-      <item name="Dependency Management" href="../dependency-management.html" />
-      <item name="Project Team" href="../team-list.html" />
-      <item name="Mailing Lists" href="../mail-lists.html" />
-      <item name="Issue Tracking" href="../issue-tracking.html" />
-      <item name="Project License" href="../license.html" />
-      <item name="Source Repository" href="../source-repository.html" />
-      <item name="Project Summary" href="../project-summary.html" />
-    </menu>
-
-    <menu name="Log4j Project Reports" img="icon-cog">
-      <item name="Changes Report" href="../changes-report.html" />
-      <item name="JIRA Report" href="../jira-report.html" />
-      <item name="Surefire Report" href="../surefire-report.html" />
-      <item name="RAT Report" href="../rat-report.html" />
-    </menu>
-  </body>
-</project>
diff --git a/src/site/_constants.adoc b/src/site/_constants.adoc
new file mode 100644
index 0000000..b52ac71
--- /dev/null
+++ b/src/site/_constants.adoc
@@ -0,0 +1,41 @@
+////
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+////
+
+////
+    ██     ██  █████  ██████  ███    ██ ██ ███    ██  ██████  ██
+    ██     ██ ██   ██ ██   ██ ████   ██ ██ ████   ██ ██       ██
+    ██  █  ██ ███████ ██████  ██ ██  ██ ██ ██ ██  ██ ██   ███ ██
+    ██ ███ ██ ██   ██ ██   ██ ██  ██ ██ ██ ██  ██ ██ ██    ██
+     ███ ███  ██   ██ ██   ██ ██   ████ ██ ██   ████  ██████  ██
+
+    IF THIS FILE DOESN'T HAVE A `.tmpl.adoc` SUFFIX, IT IS AUTO-GENERATED, DO NOT EDIT IT!
+
+    `_constants.adoc` is auto-generated from `_constants.tmpl.adoc`.
+    Auto-generation happens during `process-sources` phase of Maven.
+    Hence, you must always
+
+    1. Edit `_constants.tmpl.adoc`
+    2. Run `./mvnw process-sources`
+    3. Commit both `_constants.tmpl.adoc` and the generated `_constants.adoc`
+////
+
+:project-github-url: https://github.com/apache/logging-log4j-transform
+:project-version: 0.2.0-SNAPSHOT
+:project-name: Log4j Transform
+:project-id: log4j-transform
+:java-target-version: 8
+:java-compiler-version: [17,18)
diff --git a/src/site/_constants.tmpl.adoc b/src/site/_constants.tmpl.adoc
new file mode 100644
index 0000000..5c4b881
--- /dev/null
+++ b/src/site/_constants.tmpl.adoc
@@ -0,0 +1,41 @@
+////
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+////
+
+////
+    ██     ██  █████  ██████  ███    ██ ██ ███    ██  ██████  ██
+    ██     ██ ██   ██ ██   ██ ████   ██ ██ ████   ██ ██       ██
+    ██  █  ██ ███████ ██████  ██ ██  ██ ██ ██ ██  ██ ██   ███ ██
+    ██ ███ ██ ██   ██ ██   ██ ██  ██ ██ ██ ██  ██ ██ ██    ██
+     ███ ███  ██   ██ ██   ██ ██   ████ ██ ██   ████  ██████  ██
+
+    IF THIS FILE DOESN'T HAVE A `.tmpl.adoc` SUFFIX, IT IS AUTO-GENERATED, DO NOT EDIT IT!
+
+    `_constants.adoc` is auto-generated from `_constants.tmpl.adoc`.
+    Auto-generation happens during `process-sources` phase of Maven.
+    Hence, you must always
+
+    1. Edit `_constants.tmpl.adoc`
+    2. Run `./mvnw process-sources`
+    3. Commit both `_constants.tmpl.adoc` and the generated `_constants.adoc`
+////
+
+:project-github-url: ${scm.url}
+:project-version: ${project.version}
+:project-name: Log4j Transform
+:project-id: log4j-transform
+:java-target-version: ${maven.compiler.target}
+:java-compiler-version: ${minimalJavaBuildVersion}
diff --git a/log4j-transform-maven-plugin/README.adoc b/src/site/_log4j-transform-maven-plugin.adoc
similarity index 58%
rename from log4j-transform-maven-plugin/README.adoc
rename to src/site/_log4j-transform-maven-plugin.adoc
index 907ce78..d2da48b 100644
--- a/log4j-transform-maven-plugin/README.adoc
+++ b/src/site/_log4j-transform-maven-plugin.adoc
@@ -1,25 +1,27 @@
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to you 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.
-//
-= Log4j Transform Maven Plugin
+////
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+////
+[#log4j-transform-maven-plugin]
+== Log4j Transform Maven Plugin
 
 The Transform Plugin is used to postprocess the compiled classes of your project and replace all Log4j 2.x API calls with https://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/LogBuilder.html[`LogBuilder`] calls with a statically precomputed location.
 This allows you to use location information in your logs without incurring in the *expensive* runtime calls usually used to acquire it.
 
-== Why do we need it
+[#log4j-transform-maven-plugin-why]
+=== Why do we need it
 
 Finding the location of a logging call is a very expensive operation (a couple of microseconds).
 
@@ -141,7 +143,8 @@ By comparison, *disabling* location information on the same machine gives:
 
 |===
 
-== How it works
+[#log4j-transform-maven-plugin-how]
+=== How it works
 
 The working principle is very simple: every call to the Log4j 2.x API like
 [source,java]
@@ -167,41 +170,91 @@ public void helloLog() {
 
 In the current implementation locations are stored in classes whose name ends in `+++$$Log4j2$$Cache+++`, so they can not accidentally be used by XML/JSON serializers.
 
-== Goals
+[#log4j-transform-maven-plugin-goals]
+=== Goals
 
 This plugin consists of a single goal:
 
-xref:src/doc/process-classes-mojo.adoc[`log4j-transform:process-classes`]::
+xref:#log4j-transform-maven-plugin-process-classes[`log4j-transform:process-classes`]::
 is bound to the process-classes phase and weaves your classes to include precomputed location information.
 
-== Usage
+[#log4j-transform-maven-plugin-process-classes]
+==== `log4j-transform:process-classes`
+
+Full name::
+
+`org.apache.logging.log4j:log4j-transform-maven-plugin:{project-version}:process-classes`
+
+Description::
+
+Generates static location information of Log4j 2.x API calls in the project classes.
+The resulting bytecode will not rely on runtime resolution of the location information.
+
+Attributes::
+
+* Requires a Maven project to be executed
+* Requires dependency resolution of artifacts in scope: `<code>compile</code>`
+* The goal is thread-safe and supports parallel builds
+* Binds by default to the http://maven.apache.org/ref/current/maven-core/lifecycles.html[lifecycle phase]: `process-classes`.
+
+[#log4j-transform-maven-plugin-process-classes-required-parameters]
+===== Required Parameters
+
+[cols="3,3,10"]
+|===
+|Name|Type|Description
+
+|`<sourceDirectory>`
+|`File`
+| The directory containing classes to be processed.
+It defaults to `${project.build.outputDirectory}`.
+
+|`<sourceDirectory>`
+|`File`
+| The directory where woven classes will be written.
+It defaults to `${project.build.outputDirectory}`.
+|===
+
+[#log4j-transform-maven-plugin-process-classes-optional-parameters]
+===== Optional Parameters
+
+[cols="3,3,10"]
+|===
+|Name|Type|Description
+
+|`<includes>`
+|`List<String>`
+| Files to include. If empty all class files will be processed.
+
+|`<excludes>`
+|`List<String>`
+| Files to exclude.
+
+|`<staleMillis>`
+|`int`
+| Sets the granularity in milliseconds of the last modification date for testing if a class file needs weaving.
+It defaults to `0` and can be configured using the `lastModGranularityMs` property.
+|===
+
+[#log4j-transform-maven-plugin-usage]
+=== Usage
 
 To use the plugin you need to declare a dependency on https://central.sonatype.com/artifact/org.apache.logging.log4j/log4j-api/2.20.0[`log4j-api`] version 2.20.0 or newer.
 
 Add the following configuration to your POM file:
 
-[source,xml]
+[source,xml,subs="+attributes"]
 ----
-<project>
-  [...]
-  <build>
-    [...]
-    <plugins>
-      <plugin>
-        <groupId>org.apache.logging.log4j</groupId>
-        <artifactId>log4j-transform-maven-plugin</artifactId>
-        <version>0.1.0</version>
-        <executions>
-          <execution>
-            <goals>
-              <goal>process-classes</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-    [...]
-  </build>
-  [...]
-</project>
+<plugin>
+  <groupId>org.apache.logging.log4j</groupId>
+  <artifactId>log4j-transform-maven-plugin</artifactId>
+  <version>{project-version}</version>
+  <executions>
+    <execution>
+      <goals>
+        <goal>process-classes</goal>
+      </goals>
+    </execution>
+  </executions>
+</plugin>
 ----
diff --git a/src/site/_log4j-transform-maven-shade-plugin-extensions.adoc b/src/site/_log4j-transform-maven-shade-plugin-extensions.adoc
new file mode 100644
index 0000000..abad624
--- /dev/null
+++ b/src/site/_log4j-transform-maven-shade-plugin-extensions.adoc
@@ -0,0 +1,74 @@
+////
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+////
+[#maven-shade-plugin-extensions]
+== Maven Shade Plugin Extensions
+
+This project contains a collection of https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html[resource transformer]s for the Apache Maven Shade Plugin that allows you to use additional Log4j 2.x Core component modules.
+
+[#log4j-plugin-cache-transformer]
+=== Log4j Plugin Cache Transformer
+
+A
+https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html[resource transformer]
+for the
+https://maven.apache.org/plugins/maven-shade-plugin/index.html[Apache Maven Shade Plugin]
+that merges `Log4j2Plugins.dat` plugin caches from all the jars containing Log4j 2.x Core components.
+
+This transformer was formerly available at
+https://github.com/edwgiz/maven-shaded-log4j-transformer[edwgiz/maven-shaded-log4j-transformer]
+and was donated to the Apache Software Foundation by its author.
+
+[#log4j-plugin-cache-transformer-usage]
+==== Usage
+
+This resource transformer is usually used together with the `ManifestResourceTransformer` and `ServicesResourceTransformer` to integrate Log4j 2.x libraries in a shaded JAR.
+
+A typical configuration is:
+
+[source,xml,subs="+attributes"]
+----
+<plugin>
+  <groupId>org.apache.maven.plugins</groupId>
+  <artifactId>maven-shade-plugin</artifactId>
+  <version>3.4.1</version>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-transform-maven-shade-plugin-extensions</artifactId>
+      <version>{project-version}</version>
+    </dependency>
+  </dependencies>
+  <executions>
+    <execution>
+      <goals>
+        <goal>shade</goal>
+      </goals>
+      <configuration>
+        <transformers>
+          <transformer implementation="org.apache.logging.log4j.maven.plugins.shade.transformer.Log4j2PluginCacheFileTransformer"/>
+          <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+          <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+            <manifestEntries>
+              <Multi-Release>true</Multi-Release>
+            </manifestEntries>
+          </transformer>
+        </transformers>
+      </configuration>
+    </execution>
+  </executions>
+</plugin>
+----
diff --git a/src/site/index.adoc b/src/site/index.adoc
new file mode 100644
index 0000000..dedb768
--- /dev/null
+++ b/src/site/index.adoc
@@ -0,0 +1,90 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You 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
+
+    https://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.
+////
+
+include::_constants.adoc[]
+
+= Log4j Transform
+
+{project-name} contains tools for binary postprocessing of projects that use https://logging.apache.org/log4j/2.x/[the Apache Log4j2 API].
+
+include::_log4j-transform-maven-plugin.adoc[]
+
+include::_log4j-transform-maven-shade-plugin-extensions.adoc[]
+
+[#development]
+== Development
+
+{project-name} uses {project-github-url}[GitHub] for source code management.
+
+The project requires a Java compiler matching the `{java-compiler-version}` range and targets Java `{java-target-version}`.
+
+You can build and verify sources using:
+
+[source,bash]
+----
+./mvnw verify
+----
+
+You can build and view the website as follows:
+
+[source,bash]
+----
+./mvnw -N site
+python -m http.server -d target/site
+----
+
+[#distribution]
+== Distribution
+
+In accordance with the Apache Software Foundation's release https://infra.apache.org/release-distribution.html[distribution policy] and https://infra.apache.org/release-publishing.html[creation process], project artifacts are _officially_ accessible from the following locations:
+
+* ASF https://repository.apache.org/content/repositories/releases[Release] and https://repository.apache.org/content/repositories/snapshots[snapshot] repositories (mirrored to https://central.sonatype.dev/[the Maven Central Repository])
+* ASF https://downloads.apache.org/logging/{project-id}[Distribution directory]
+
+See xref:#release-instructions[the release instructions] for details.
+
+[#support]
+== Support
+
+Please keep in mind that this project is intended for internal usage only.
+You can use GitHub Issues for feature requests and bug reports – not questions!
+See https://logging.apache.org/log4j/2.x/support.html[the Log4j support policy] for details.
+
+[#security]
+== Security
+
+If you have encountered an unlisted security vulnerability or other unexpected behaviour that has security impact, please report them privately to mailto:security@logging.apache.org[the Log4j security mailing list].
+See https://logging.apache.org/log4j/2.x/security.html[the Log4j Security page] for further details.
+
+include::_release-notes.adoc[]
+
+[#release-instructions]
+== Release instructions
+
+{project-name} employs the CI/CD foundation provided by the https://logging.apache.org/logging-parent[`logging-parent`].
+You can simply use its release instructions.
+
+[#license]
+== License
+
+Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
+See `NOTICE.txt` distributed with this work for additional information regarding copyright ownership.
+The ASF licenses this file to You 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 https://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.


[logging-log4j-transform] 04/06: Fix Error Prone warnings

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

vy pushed a commit to branch parent-10.1.1
in repository https://gitbox.apache.org/repos/asf/logging-log4j-transform.git

commit 3f477a611d6fdca60785f173470a5edb3639d1ed
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Mon Oct 2 15:49:40 2023 +0200

    Fix Error Prone warnings
---
 .../apache/logging/log4j/weaver/LocationCacheGenerator.java    | 10 +++-------
 .../org/apache/logging/log4j/weaver/SupplierLambdaType.java    |  3 ++-
 .../logging/log4j/weaver/AbstractConversionHandlerTest.java    | 10 ++++++----
 .../log4j/weaver/log4j2/LoggerConversionHandlerExample.java    |  1 +
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/LocationCacheGenerator.java b/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/LocationCacheGenerator.java
index cc4c851..c7215d7 100644
--- a/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/LocationCacheGenerator.java
+++ b/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/LocationCacheGenerator.java
@@ -17,12 +17,8 @@
 package org.apache.logging.log4j.weaver;
 
 import java.nio.file.Path;
-import java.util.Arrays;
-import java.util.EnumSet;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.Map.Entry;
-import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.stream.Collectors;
@@ -70,7 +66,7 @@ public class LocationCacheGenerator {
         final LocationCacheContents contents = locationCacheClasses.computeIfAbsent(cacheClassName,
                 k -> new LocationCacheContents());
         contents.addLambda(type);
-        final String methodName = type.name().toLowerCase();
+        final String methodName = type.name().toLowerCase(Locale.US);
         final String methodDescriptor = Type.getMethodDescriptor(MESSAGE_TYPE, type.getArgumentTypes());
         switch (type) {
             case FORMATTED_MESSAGE:
@@ -104,7 +100,7 @@ public class LocationCacheGenerator {
         final Set<SupplierLambdaType> lambdas = contents.getLambdas();
         for (final SupplierLambdaType type : lambdas) {
             final InstructionAdapter mv = new InstructionAdapter(cv.visitMethod(Opcodes.ACC_STATIC,
-                    type.name().toLowerCase(), type.getImplementationMethodDescriptor(), null, null));
+                    type.name().toLowerCase(Locale.US), type.getImplementationMethodDescriptor(), null, null));
             switch (type) {
                 case FORMATTED_MESSAGE:
                     writeFormattedMessage(mv);
diff --git a/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/SupplierLambdaType.java b/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/SupplierLambdaType.java
index 9fd61e5..f806f70 100644
--- a/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/SupplierLambdaType.java
+++ b/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/SupplierLambdaType.java
@@ -32,6 +32,7 @@ import static org.apache.logging.log4j.weaver.Constants.SUPPLIER_TYPE;
  * An enumeration of {@code org.apache.logging.log4j.util.Supplier<Message>} lambdas, named after the type of message and parameter types.
  *
  */
+@SuppressWarnings("ImmutableEnumChecker")
 public enum SupplierLambdaType {
     MESSAGE_SUPPLIER(MESSAGE_SUPPLIER_TYPE),
     FORMATTED_MESSAGE(STRING_TYPE, OBJECT_ARRAY_TYPE),
@@ -46,7 +47,7 @@ public enum SupplierLambdaType {
 
     private final Type[] argumentTypes;
 
-    private SupplierLambdaType(final Type... argumentTypes) {
+    SupplierLambdaType(final Type... argumentTypes) {
         this.argumentTypes = argumentTypes;
     }
 
diff --git a/log4j-weaver/src/test/java/org/apache/logging/log4j/weaver/AbstractConversionHandlerTest.java b/log4j-weaver/src/test/java/org/apache/logging/log4j/weaver/AbstractConversionHandlerTest.java
index 8b16e23..1517184 100644
--- a/log4j-weaver/src/test/java/org/apache/logging/log4j/weaver/AbstractConversionHandlerTest.java
+++ b/log4j-weaver/src/test/java/org/apache/logging/log4j/weaver/AbstractConversionHandlerTest.java
@@ -50,10 +50,12 @@ public class AbstractConversionHandlerTest {
         final Path topClass = Paths
                 .get(AbstractConversionHandlerTest.class.getClassLoader().getResource(internalName + ".class").toURI());
         final String simpleClassName = Paths.get(internalName).getFileName().toString();
-        return Files.walk(topClass.getParent(), 1).filter(p -> {
-            final String nested = p.getFileName().toString();
-            return nested.startsWith(simpleClassName) && nested.endsWith(".class");
-        }).sorted();
+        try (Stream<Path> paths = Files.walk(topClass.getParent(), 1)) {
+            return paths.filter(p -> {
+                final String nested = p.getFileName().toString();
+                return nested.startsWith(simpleClassName) && nested.endsWith(".class");
+            }).sorted();
+        }
     }
 
     private static class TestClassLoader extends ClassLoader {
diff --git a/log4j-weaver/src/test/java/org/apache/logging/log4j/weaver/log4j2/LoggerConversionHandlerExample.java b/log4j-weaver/src/test/java/org/apache/logging/log4j/weaver/log4j2/LoggerConversionHandlerExample.java
index b7cbf2a..8405fce 100644
--- a/log4j-weaver/src/test/java/org/apache/logging/log4j/weaver/log4j2/LoggerConversionHandlerExample.java
+++ b/log4j-weaver/src/test/java/org/apache/logging/log4j/weaver/log4j2/LoggerConversionHandlerExample.java
@@ -55,6 +55,7 @@ public class LoggerConversionHandlerExample {
     private static final Object P9 = "(p9)";
     private static final Object[] PARRAY = { "(...)" };
     private static final Supplier<?>[] SUPPLIERS = { () -> OBJECT };
+    @SuppressWarnings("StaticAssignmentOfThrowable")
     private static final Throwable THROWABLE = new RuntimeException();
     private static final Marker MARKER = MarkerManager.getMarker("MARKER");
 


[logging-log4j-transform] 02/06: Point `README.adoc` to the website

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

vy pushed a commit to branch parent-10.1.1
in repository https://gitbox.apache.org/repos/asf/logging-log4j-transform.git

commit 26336a2fe845a5a13f7b78505f822c1182e20ad5
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Mon Oct 2 15:25:41 2023 +0200

    Point `README.adoc` to the website
---
 README.adoc                 |  75 +++++----------------
 RELEASE-NOTES.md            |  22 -------
 RELEASING.adoc              | 156 --------------------------------------------
 SECURITY.adoc               |  21 ------
 spotless-license-header.txt |  16 -----
 5 files changed, 18 insertions(+), 272 deletions(-)

diff --git a/README.adoc b/README.adoc
index b7164b4..cadec6a 100644
--- a/README.adoc
+++ b/README.adoc
@@ -1,62 +1,23 @@
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to you 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.
-//
+////
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You 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
+
+    https://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.
+////
+
 https://github.com/apache/logging-log4j-transform/actions[image:https://github.com/apache/logging-log4j-transform/workflows/build/badge.svg[Actions Status]]
 https://search.maven.org/search?q=g:org.apache.logging.log4j%20a:log4j-transform-bom[image:https://img.shields.io/maven-central/v/org.apache.logging.log4j/log4j-transform-bom.svg[Maven Central]]
 https://www.apache.org/licenses/LICENSE-2.0.txt[image:https://img.shields.io/github/license/apache/logging-log4j-transform.svg[License]]
 
 Tools for binary postprocessing of projects that use https://logging.apache.org/log4j/2.x/[the Apache Log4j2 API].
-
-xref:log4j-transform-maven-plugin/README.adoc[`log4j-transform-maven-plugin`]::
-a bytecode weaver that improves logging performance by precomputing the location of your logging statements
-
-xref:log4j-transform-maven-shade-plugin-extensions/README.adoc[`log4j-transform-maven-shade-plugin-extensions`]::
-a https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html[resource transformer] for the Apache Maven Shade Plugin that allows you to use additional Log4j 2.x Core component modules
-
-== Build
-
-This project generates Java 8 bytecode, though requires Java 17 for compilation.
-You can build and test sources using `./mvnw verify` command.
-
-== Distribution
-
-In accordance with the Apache Software Foundation's release https://infra.apache.org/release-distribution.html[distribution policy] and https://infra.apache.org/release-publishing.html[creation process], project artifacts are _officially_ accessible from the following locations:
-
-* ASF https://repository.apache.org/content/repositories/releases[Release] and https://repository.apache.org/content/repositories/snapshots[snapshot] repositories (mirrored to https://central.sonatype.dev/[the Maven Central Repository])
-* ASF https://downloads.apache.org/logging/log4j-transform[Distribution directory]
-
-See xref:RELEASING.adoc[release instructions] for further details.
-
-== Support
-
-Please keep in mind that this project is intended for internal usage only.
-You can use GitHub Issues for feature requests and bug reports – not questions!
-See https://logging.apache.org/log4j/2.x/support.html[the Log4j support policy] for details.
-
-== Security
-
-If you have encountered an unlisted security vulnerability or other unexpected behaviour that has security impact, please report them privately to mailto:security@logging.apache.org[the Log4j security mailing list].
-See https://logging.apache.org/log4j/2.x/security.html[the Log4j Security page] for further details.
-
-== License
-
-Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
-See xref:NOTICE.txt[] distributed with this work for additional information regarding copyright ownership.
-The ASF licenses this file to You 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 https://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.
+See https://logging.apache.org/log4j/transform[the project website] for further information.
diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
deleted file mode 100644
index a37d693..0000000
--- a/RELEASE-NOTES.md
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to you 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.
-  -->
-
-This project uses itself, i.e., `log4j-changelog-maven-plugin`, for keeping a changelog and generating release notes.
-
-Changelog files are located under [`src/changelog`](src/changelog).
-Release notes can be generated using `./mvnw -N -P changelog-export` command.
-See [`log4j-changelog-maven-plugin`](log4j-changelog-maven-plugin) for details on how it all works.
diff --git a/RELEASING.adoc b/RELEASING.adoc
deleted file mode 100644
index 8621915..0000000
--- a/RELEASING.adoc
+++ /dev/null
@@ -1,156 +0,0 @@
-////
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You 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
-
-    https://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.
-////
-
-// ██     ██  █████  ██████  ███    ██ ██ ███    ██  ██████  ██
-// ██     ██ ██   ██ ██   ██ ████   ██ ██ ████   ██ ██       ██
-// ██  █  ██ ███████ ██████  ██ ██  ██ ██ ██ ██  ██ ██   ███ ██
-// ██ ███ ██ ██   ██ ██   ██ ██  ██ ██ ██ ██  ██ ██ ██    ██
-//  ███ ███  ██   ██ ██   ██ ██   ████ ██ ██   ████  ██████  ██
-//
-// Below instructions are shared by all Maven-based Apache Logging Services projects.
-// Be extremely cautious while making changes!
-
-// Configuration ///////////////////////////////////////////////////////////////
-
-// Name of the GitHub repository; `logging-parent`, `logging-log4j2`, `logging-log4j-tools`, etc.
-:repository-name: logging-log4j-transform
-
-// Name of the project; `logging-parent`, `log4j`, `log4j-tools`
-:project-name: log4j-transform
-
-// Instructions ////////////////////////////////////////////////////////////////
-
-= Release instructions
-
-[WARNING]
-====
-In the code examples below, assuming the version to be released is `7.8.0`.
-====
-
-== Stage the release
-
-. Create and push the release branch:
-+
-[source,bash]
-----
-git fetch -p
-git checkout -B release/7.8.0 origin/main
-git push origin release/7.8.0
-----
-. Verify that the associated https://github.com/apache/{repository-name}/actions[GitHub Actions workflow] succeeds:
-.. `revision` property in `pom.xml` is updated
-.. Changelog is released (i.e., `src/changelog/7.8.0` folder is populated)
-.. *Signed artifacts* are uploaded to the _Staging Repositories_ in https://repository.apache.org/[repository.apache.org]
-.. *Signed distribution and its checksum* (e.g., `apache-{project-name}-7.8.0-{bin,src}.{zip,.zip.asc,.zip.sha512}`) are uploaded to https://dist.apache.org/repos/dist/dev/logging/log4j[dist.apache.org/repos/dist/**dev**/logging/log4j] Subversion repository (along with auxiliary files; email texts, etc.)
-
-+
-If not, commit necessary fixes, push, and repeat.
-
-+
-[TIP]
-====
-GitHub Actions workflow is idempotent.
-You can iterate on the `release/7.8.0` branch to perfect it.
-====
-. _Close_ the repository in https://repository.apache.org/[repository.apache.org]
-
-== Vote the release
-
-. Send the vote email uploaded to the https://dist.apache.org/repos/dist/dev/logging/log4j[dist.apache.org/repos/dist/**dev**/logging/log4j] Subversion repository
-+
-[WARNING]
-====
-**Fix the cited https://repository.apache.org[repository.apache.org] URL** in the generated email!
-It changes after every Nexus deployment.
-====
-+
-[WARNING]
-====
-Make sure your email is sent in plain text, that is, https://infra.apache.org/contrib-email-tips#nohtml[no HTML]!
-If you are using GMail, simply enable the _"Plain text mode"_ while composing your message.
-====
-
-. Once the consensus is reached within the set time frame, respond to the first post in the thread as follows:
-+
-[source]
-----
-Adding my +1.
-
-With that, the release passes with 3 binding +1 votes from <PMC-member-1>, ..., <PMC-member-N>, and me.
-I will continue the release process.
-----
-
-== Publish the release
-
-=== In the git repository
-
-. Pull the most recent changes and tags
-+
-[source,bash]
-----
-git fetch -p
-----
-. Tag the release (e.g., `rel/7.8.0`) and push it
-+
-[source,bash]
-----
-git tag -a rel/7.8.0 <COMMIT-ID> -m 7.8.0     # <1>
-git push origin rel/7.8.0
-----
-+
-<1> You can find the `COMMIT-ID` in the generated vote email.
-+
-[IMPORTANT]
-====
-The ASF infrastructure treats ``rel/``-prefixed git tags special and ensures they are immutable for provenance reasons.
-====
-. Merge `release/7.8.0` to `main`
-+
-[source,bash]
-----
-git checkout main
-git merge release/7.8.0
-----
-. Set the revision property to the next development version (e.g., `7.9.0-SNAPSHOT`) in xref:pom.xml[`pom.xml`]
-. Commit changes and push the `main` branch
-. Delete the local and remote copies of the `release/7.8.0` branch
-
-=== In the ASF infrastructure
-
-. _Release_ the repository in https://reporter.apache.org/addrelease.html?logging[repository.apache.org]
-. In https://dist.apache.org/repos/dist/release/logging/{project-name}[dist.apache.org/repos/dist] Subversion repository,
-.. create the `*release*/logging/{project-name}/7.8.0` folder, and copy the signed sources and their checksum from `*dev*/logging/{project-name}` to there
-.. delete the folder from an earlier release in `*release*/logging/{project-name}` (stash the generated announcement email somewhere, you will need it later on)
-.. commit changes
-. Report the release at https://reporter.apache.org/addrelease.html?logging[reporter.apache.org]
-
-=== In GitHub
-
-Once the artifacts are visible in https://central.sonatype.dev/[central.sonatype.dev], https://github.com/apache/{repository-name}/releases/new[create a new release in GitHub]
-
-. Use the `rel/7.8.0` tag
-. Copy release notes from the generated emails
-
-== Announce the release
-
-. Send the announcement email uploaded to the https://dist.apache.org/repos/dist/dev/logging/{project-name}[dist.apache.org/repos/dist/**dev**/logging/{project-name}] Subversion repository
-+
-[WARNING]
-====
-Make sure your email is sent in plain text, that is, https://infra.apache.org/contrib-email-tips#nohtml[no HTML]!
-If you are using GMail, simply enable the _"Plain text mode"_ while composing your message.
-====
diff --git a/SECURITY.adoc b/SECURITY.adoc
deleted file mode 100644
index cbbb429..0000000
--- a/SECURITY.adoc
+++ /dev/null
@@ -1,21 +0,0 @@
-////
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You 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
-
-    https://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.
-////
-
-= Security Policy
-
-If you have encountered an unlisted security vulnerability or other unexpected behaviour that has security impact, please report them privately to mailto:security@logging.apache.org[the Log4j security mailing list].
-See https://logging.apache.org/log4j/2.x/security.html[the Log4j Security page] for further details.
diff --git a/spotless-license-header.txt b/spotless-license-header.txt
deleted file mode 100644
index 4f33236..0000000
--- a/spotless-license-header.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.
- */


[logging-log4j-transform] 03/06: Migrate `pom.xml` to `logging-parent` version `10.1.1`

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

vy pushed a commit to branch parent-10.1.1
in repository https://gitbox.apache.org/repos/asf/logging-log4j-transform.git

commit a5834dc1794e533ae1d9a8fbae70a56f727b5f33
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Mon Oct 2 15:44:19 2023 +0200

    Migrate `pom.xml` to `logging-parent` version `10.1.1`
---
 .github/workflows/build.yaml                       | 34 +++++++++-------
 .../{build.yaml => merge-dependabot.yaml}          | 39 +++++-------------
 .mvn/jvm.config                                    |  2 +
 log4j-transform-maven-plugin/pom.xml               | 12 ++----
 .../pom.xml                                        |  4 ++
 log4j-transform-parent/pom.xml                     | 14 -------
 log4j-transform-perf/pom.xml                       |  1 +
 log4j-weaver/pom.xml                               | 15 +++----
 .../logging/log4j/weaver/log4j2/package-info.java  | 20 +++++++++
 .../apache/logging/log4j/weaver/package-info.java  | 20 +++++++++
 pom.xml                                            |  6 ++-
 src/changelog/.0.x.x/.release-notes.adoc.ftl       | 43 ++++++++++++++++++++
 src/changelog/.0.x.x/.release-notes.md.ftl         | 22 ----------
 src/changelog/.0.x.x/logging-parent-update.xml     |  3 +-
 .../{.changelog.md.ftl => .changelog.adoc.ftl}     |  6 +--
 src/changelog/.index.adoc.ftl                      | 41 +++++++++++++++++++
 src/changelog/.index.md.ftl                        | 22 ----------
 src/changelog/0.1.0/.release-notes.adoc.ftl        | 43 ++++++++++++++++++++
 src/changelog/0.1.0/.release-notes.md.ftl          | 22 ----------
 ...638_Provide_Maven_plugin_to_inline_location.xml |  2 +-
 ...LOG4J2-673_Maven_Shade_resource_transformer.xml |  2 +-
 src/site/_release-notes.adoc                       | 40 ++++++++++++++++++
 src/site/_release-notes/_0.1.0.adoc                | 47 ++++++++++++++++++++++
 src/site/_release-notes/_0.x.x.adoc                | 46 +++++++++++++++++++++
 24 files changed, 357 insertions(+), 149 deletions(-)

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 9b1b20e..f8b508f 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -19,10 +19,9 @@ name: build
 
 on:
   push:
-    # Avoid workflow run for _merged_ `dependabot` PRs.
-    # They were (hopefully!) already tested in PR-triggered workflow.
-    branches-ignore:
-      - "dependabot/**"
+    branches:
+      - "main"
+      - "release/*"
     paths-ignore:
       - "**.adoc"
       - "**.md"
@@ -38,26 +37,33 @@ permissions: read-all
 jobs:
 
   build:
+    if: github.actor != 'dependabot[bot]'
     uses: apache/logging-parent/.github/workflows/build-reusable.yaml@main
-    # Write permissions to allow merge of `dependabot` PRs
-    permissions:
-      contents: write
-      pull-requests: write
 
   deploy-snapshot:
     needs: build
-    if: github.repository == 'apache/logging-log4j-transform' && github.ref == 'refs/heads/main'
+    if: github.repository == 'apache/logging-log4j-transform' && github.ref_name == 'main'
     uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@main
-    secrets: inherit
+    # Secrets for deployments
+    secrets:
+      NEXUS_USER: ${{ secrets.NEXUS_USER }}
+      NEXUS_PW: ${{ secrets.NEXUS_PW }}
 
   deploy-release:
     needs: build
-    if: github.repository == 'apache/logging-log4j-transform' && startsWith(github.ref, 'refs/heads/release/')
+    if: github.repository == 'apache/logging-log4j-transform' && startsWith(github.ref_name, 'release/')
     uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@main
-    secrets: inherit
+    # Secrets for deployments
+    secrets:
+      GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
+      LOGGING_STAGE_DEPLOYER_USER: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }}
+      LOGGING_STAGE_DEPLOYER_PW: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }}
+      SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
+      SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
     # Write permissions to allow the Maven `revision` property update, changelog release, etc.
     permissions:
       contents: write
     with:
-      project-name: log4j-transform
-      distribution-attachment-count: 4
+      project-id: log4j-transform
+      distribution-attachment-count: 3
+      site-enabled: true
diff --git a/.github/workflows/build.yaml b/.github/workflows/merge-dependabot.yaml
similarity index 51%
copy from .github/workflows/build.yaml
copy to .github/workflows/merge-dependabot.yaml
index 9b1b20e..9535e47 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/merge-dependabot.yaml
@@ -15,19 +15,10 @@
 # limitations under the License.
 #
 
-name: build
+name: merge-dependabot
 
 on:
-  push:
-    # Avoid workflow run for _merged_ `dependabot` PRs.
-    # They were (hopefully!) already tested in PR-triggered workflow.
-    branches-ignore:
-      - "dependabot/**"
-    paths-ignore:
-      - "**.adoc"
-      - "**.md"
-      - "**.txt"
-  pull_request:
+  pull_request_target:
     paths-ignore:
       - "**.adoc"
       - "**.md"
@@ -38,26 +29,14 @@ permissions: read-all
 jobs:
 
   build:
+    if: github.repository == 'apache/logging-log4j-transform' && github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]'
     uses: apache/logging-parent/.github/workflows/build-reusable.yaml@main
-    # Write permissions to allow merge of `dependabot` PRs
-    permissions:
-      contents: write
-      pull-requests: write
-
-  deploy-snapshot:
-    needs: build
-    if: github.repository == 'apache/logging-log4j-transform' && github.ref == 'refs/heads/main'
-    uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@main
-    secrets: inherit
 
-  deploy-release:
+  merge-dependabot:
     needs: build
-    if: github.repository == 'apache/logging-log4j-transform' && startsWith(github.ref, 'refs/heads/release/')
-    uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@main
-    secrets: inherit
-    # Write permissions to allow the Maven `revision` property update, changelog release, etc.
+    uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@main
     permissions:
-      contents: write
-    with:
-      project-name: log4j-transform
-      distribution-attachment-count: 4
+      contents: write                                     # to push changelog commits
+      pull-requests: write                                # to close the PR
+    secrets:
+      GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}       # to sign commits
diff --git a/.mvn/jvm.config b/.mvn/jvm.config
index 6f7d1c8..45a0340 100644
--- a/.mvn/jvm.config
+++ b/.mvn/jvm.config
@@ -9,3 +9,5 @@
 --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
 --add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
 --add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
+--add-opens java.base/sun.nio.ch=ALL-UNNAMED
+--add-opens java.base/java.io=ALL-UNNAMED
diff --git a/log4j-transform-maven-plugin/pom.xml b/log4j-transform-maven-plugin/pom.xml
index 89aea7a..f71be3e 100644
--- a/log4j-transform-maven-plugin/pom.xml
+++ b/log4j-transform-maven-plugin/pom.xml
@@ -32,6 +32,10 @@
   <name>Apache Log4j Transform Maven plugin</name>
   <description>The Apache Log4j Transform Maven plugin</description>
 
+  <properties>
+    <bnd.skip>true</bnd.skip>
+  </properties>
+
   <dependencies>
 
     <dependency>
@@ -67,14 +71,6 @@
   <build>
     <plugins>
 
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-invoker-plugin</artifactId>
diff --git a/log4j-transform-maven-shade-plugin-extensions/pom.xml b/log4j-transform-maven-shade-plugin-extensions/pom.xml
index 64fb904..26bf911 100644
--- a/log4j-transform-maven-shade-plugin-extensions/pom.xml
+++ b/log4j-transform-maven-shade-plugin-extensions/pom.xml
@@ -32,6 +32,10 @@
   <name>Apache Log4j Maven Shade Plugin Transformer</name>
   <description>Transformer implementation to concatenate Log4j2Plugins.dat files</description>
 
+  <properties>
+    <bnd.skip>true</bnd.skip>
+  </properties>
+
   <dependencies>
 
     <dependency>
diff --git a/log4j-transform-parent/pom.xml b/log4j-transform-parent/pom.xml
index 735e332..c06577d 100644
--- a/log4j-transform-parent/pom.xml
+++ b/log4j-transform-parent/pom.xml
@@ -42,11 +42,9 @@
     <maven.version>3.9.4</maven.version>
     <plexus-utils.version>4.0.0</plexus-utils.version>
     <slf4j.version>2.0.9</slf4j.version>
-    <spotbugs.version>4.7.3</spotbugs.version>
 
     <!-- plugin versions -->
     <jacoco-maven-plugin.version>0.8.10</jacoco-maven-plugin.version>
-    <maven-bundle-plugin.version>5.1.8</maven-bundle-plugin.version>
     <maven-invoker-plugin.version>3.5.1</maven-invoker-plugin.version>
     <maven-shade-plugin.version>3.5.0</maven-shade-plugin.version>
     <surefire.version>3.0.0-M7</surefire.version>
@@ -134,12 +132,6 @@
         <version>${slf4j.version}</version>
       </dependency>
 
-      <dependency>
-        <groupId>com.github.spotbugs</groupId>
-        <artifactId>spotbugs-annotations</artifactId>
-        <version>${spotbugs.version}</version>
-      </dependency>
-
     </dependencies>
   </dependencyManagement>
 
@@ -153,12 +145,6 @@
           <version>${jacoco-maven-plugin.version}</version>
         </plugin>
 
-        <plugin>
-          <groupId>org.apache.felix</groupId>
-          <artifactId>maven-bundle-plugin</artifactId>
-          <version>${maven-bundle-plugin.version}</version>
-        </plugin>
-
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-invoker-plugin</artifactId>
diff --git a/log4j-transform-perf/pom.xml b/log4j-transform-perf/pom.xml
index ea9017d..8fc6d08 100644
--- a/log4j-transform-perf/pom.xml
+++ b/log4j-transform-perf/pom.xml
@@ -32,6 +32,7 @@
   <description>Performance tests for Apache Log4j Transformation Tools</description>
 
   <properties>
+    <bnd.skip>true</bnd.skip>
     <maven.install.skip>true</maven.install.skip>
     <maven.deploy.skip>true</maven.deploy.skip>
     <spotbugs.skip>true</spotbugs.skip>
diff --git a/log4j-weaver/pom.xml b/log4j-weaver/pom.xml
index cf5052a..eeb968b 100644
--- a/log4j-weaver/pom.xml
+++ b/log4j-weaver/pom.xml
@@ -53,6 +53,12 @@
       <artifactId>commons-lang3</artifactId>
     </dependency>
 
+    <dependency>
+      <groupId>org.osgi</groupId>
+      <artifactId>osgi.annotation</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
     <dependency>
       <groupId>com.github.spotbugs</groupId>
       <artifactId>spotbugs-annotations</artifactId>
@@ -103,13 +109,4 @@
 
   </dependencies>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-
 </project>
diff --git a/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/log4j2/package-info.java b/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/log4j2/package-info.java
new file mode 100644
index 0000000..c397a80
--- /dev/null
+++ b/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/log4j2/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you 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.
+ */
+@Export
+package org.apache.logging.log4j.weaver.log4j2;
+
+import org.osgi.annotation.bundle.Export;
diff --git a/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/package-info.java b/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/package-info.java
new file mode 100644
index 0000000..58f9d52
--- /dev/null
+++ b/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you 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.
+ */
+@Export
+package org.apache.logging.log4j.weaver;
+
+import org.osgi.annotation.bundle.Export;
diff --git a/pom.xml b/pom.xml
index 745af60..7428d32 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
   <parent>
     <groupId>org.apache.logging</groupId>
     <artifactId>logging-parent</artifactId>
-    <version>10.0.0</version>
+    <version>10.1.1</version>
   </parent>
 
   <groupId>org.apache.logging.log4j</groupId>
@@ -39,7 +39,7 @@
   <version>${revision}</version>
   <packaging>pom</packaging>
 
-  <url>https://github.com/apache/logging-log4j-transform</url>
+  <url>https://logging.apache.org/log4j/transform</url>
 
   <inceptionYear>2022</inceptionYear>
 
@@ -107,6 +107,8 @@
 
   </properties>
 
+  <!-- `dependencyManagement` must only contain `log4j-transform` modules and nothing else!
+       Modules here must have a corresponding entry in `modules` block above! -->
   <dependencyManagement>
     <dependencies>
 
diff --git a/src/changelog/.0.x.x/.release-notes.adoc.ftl b/src/changelog/.0.x.x/.release-notes.adoc.ftl
new file mode 100644
index 0000000..673ebf9
--- /dev/null
+++ b/src/changelog/.0.x.x/.release-notes.adoc.ftl
@@ -0,0 +1,43 @@
+////
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+////
+
+////
+    ██     ██  █████  ██████  ███    ██ ██ ███    ██  ██████  ██
+    ██     ██ ██   ██ ██   ██ ████   ██ ██ ████   ██ ██       ██
+    ██  █  ██ ███████ ██████  ██ ██  ██ ██ ██ ██  ██ ██   ███ ██
+    ██ ███ ██ ██   ██ ██   ██ ██  ██ ██ ██ ██  ██ ██ ██    ██
+     ███ ███  ██   ██ ██   ██ ██   ████ ██ ██   ████  ██████  ██
+
+    IF THIS FILE DOESN'T HAVE A `.ftl` SUFFIX, IT IS AUTO-GENERATED, DO NOT EDIT IT!
+
+    Version-specific release notes (`7.8.0.adoc`, etc.) are generated from `src/changelog/*/.release-notes.adoc.ftl`.
+    Auto-generation happens during `generate-sources` phase of Maven.
+    Hence, you must always
+
+    1. Find and edit the associated `.release-notes.adoc.ftl`
+    2. Run `./mvnw generate-sources`
+    3. Commit both `.release-notes.adoc.ftl` and the generated `7.8.0.adoc`
+////
+
+[#release-notes-${release.version?replace("[^a-zA-Z0-9]", "-", "r")}]
+=== ${release.version}
+
+<#if release.date?has_content>Release date:: ${release.date}</#if>
+
+This is the second release of the project.
+
+<#include "../.changelog.adoc.ftl">
diff --git a/src/changelog/.0.x.x/.release-notes.md.ftl b/src/changelog/.0.x.x/.release-notes.md.ftl
deleted file mode 100644
index c1d7377..0000000
--- a/src/changelog/.0.x.x/.release-notes.md.ftl
+++ /dev/null
@@ -1,22 +0,0 @@
-<#--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to you 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.
-  -->
-
-# ${release.version}<#if release.date?has_content> (${release.date})</#if>
-
-This is the second release of the project.
-
-<#include "../.changelog.md.ftl">
diff --git a/src/changelog/.0.x.x/logging-parent-update.xml b/src/changelog/.0.x.x/logging-parent-update.xml
index 26d6d2e..26fb730 100644
--- a/src/changelog/.0.x.x/logging-parent-update.xml
+++ b/src/changelog/.0.x.x/logging-parent-update.xml
@@ -3,6 +3,7 @@
        xmlns="http://logging.apache.org/log4j/changelog"
        xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
        type="changed">
+  <author id="github:ppkarwasz"/>
   <author id="github:vy"/>
-  <description format="markdown">Migrated to `logging-parent` 10.0.0 and adopted its CI infrastructure</description>
+  <description format="asciidoc">Migrated to `logging-parent` 10.1.1 and adopted its CI and `pom.xml` infrastructure</description>
 </entry>
diff --git a/src/changelog/.changelog.md.ftl b/src/changelog/.changelog.adoc.ftl
similarity index 76%
rename from src/changelog/.changelog.md.ftl
rename to src/changelog/.changelog.adoc.ftl
index 6ecfef8..ebd41f0 100644
--- a/src/changelog/.changelog.md.ftl
+++ b/src/changelog/.changelog.adoc.ftl
@@ -14,13 +14,13 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<#if entriesByType?size gt 0>## Changes
+<#if entriesByType?size gt 0>
 <#list entriesByType as entryType, entries>
 
-### ${entryType?capitalize}
+==== ${entryType?capitalize}
 
 <#list entries as entry>
-* ${entry.description.text?replace("\\s+", " ", "r")}<#if entry.issues?has_content> (<#list entry.issues as issue><#if issue.link?starts_with("https://github.com/apache/logging-log4j-transform")>#${issue.id}<#else>[${issue.id}](${issue.link})</#if><#if issue?has_next>, </#if></#list>)</#if>
+* ${entry.description.text?replace("\\s+", " ", "r")}<#if entry.issues?has_content> (<#list entry.issues as issue>${issue.link}[${issue.id}]<#if issue?has_next>, </#if></#list>)</#if>
 </#list>
 </#list>
 </#if>
diff --git a/src/changelog/.index.adoc.ftl b/src/changelog/.index.adoc.ftl
new file mode 100644
index 0000000..8c4ff21
--- /dev/null
+++ b/src/changelog/.index.adoc.ftl
@@ -0,0 +1,41 @@
+////
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+////
+
+////
+    ██     ██  █████  ██████  ███    ██ ██ ███    ██  ██████  ██
+    ██     ██ ██   ██ ██   ██ ████   ██ ██ ████   ██ ██       ██
+    ██  █  ██ ███████ ██████  ██ ██  ██ ██ ██ ██  ██ ██   ███ ██
+    ██ ███ ██ ██   ██ ██   ██ ██  ██ ██ ██ ██  ██ ██ ██    ██
+     ███ ███  ██   ██ ██   ██ ██   ████ ██ ██   ████  ██████  ██
+
+    IF THIS FILE IS CALLED `index.adoc`, IT IS AUTO-GENERATED, DO NOT EDIT IT!
+
+    Release notes `index.adoc` is generated from `src/changelog/.index.adoc.ftl`.
+    Auto-generation happens during `generate-sources` phase of Maven.
+    Hence, you must always
+
+    1. Edit `.index.adoc.ftl`
+    2. Run `./mvnw generate-sources`
+    3. Commit both `.index.adoc.ftl` and the generated `.index.adoc`
+////
+
+[#release-notes]
+== Release Notes
+
+<#list releases as release><#if release.changelogEntryCount gt 0>
+include::_release-notes/_${release.version}.adoc[]
+</#if></#list>
diff --git a/src/changelog/.index.md.ftl b/src/changelog/.index.md.ftl
deleted file mode 100644
index 693f1f8..0000000
--- a/src/changelog/.index.md.ftl
+++ /dev/null
@@ -1,22 +0,0 @@
-<#--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to you 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.
-  -->
-
-# Release Notes
-
-<#list releases as release>
-* [${release.version}](${release.version}.md)<#if release.date?has_content> (${release.date})</#if>
-</#list>
diff --git a/src/changelog/0.1.0/.release-notes.adoc.ftl b/src/changelog/0.1.0/.release-notes.adoc.ftl
new file mode 100644
index 0000000..a3c917c
--- /dev/null
+++ b/src/changelog/0.1.0/.release-notes.adoc.ftl
@@ -0,0 +1,43 @@
+////
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+////
+
+////
+    ██     ██  █████  ██████  ███    ██ ██ ███    ██  ██████  ██
+    ██     ██ ██   ██ ██   ██ ████   ██ ██ ████   ██ ██       ██
+    ██  █  ██ ███████ ██████  ██ ██  ██ ██ ██ ██  ██ ██   ███ ██
+    ██ ███ ██ ██   ██ ██   ██ ██  ██ ██ ██ ██  ██ ██ ██    ██
+     ███ ███  ██   ██ ██   ██ ██   ████ ██ ██   ████  ██████  ██
+
+    IF THIS FILE DOESN'T HAVE A `.ftl` SUFFIX, IT IS AUTO-GENERATED, DO NOT EDIT IT!
+
+    Version-specific release notes (`7.8.0.adoc`, etc.) are generated from `src/changelog/*/.release-notes.adoc.ftl`.
+    Auto-generation happens during `generate-sources` phase of Maven.
+    Hence, you must always
+
+    1. Find and edit the associated `.release-notes.adoc.ftl`
+    2. Run `./mvnw generate-sources`
+    3. Commit both `.release-notes.adoc.ftl` and the generated `7.8.0.adoc`
+////
+
+[#release-notes-${release.version?replace("[^a-zA-Z0-9]", "-", "r")}]
+=== ${release.version}
+
+<#if release.date?has_content>Release date:: ${release.date}</#if>
+
+This is the first release of the project.
+
+<#include "../.changelog.adoc.ftl">
diff --git a/src/changelog/0.1.0/.release-notes.md.ftl b/src/changelog/0.1.0/.release-notes.md.ftl
deleted file mode 100644
index 89bb2c3..0000000
--- a/src/changelog/0.1.0/.release-notes.md.ftl
+++ /dev/null
@@ -1,22 +0,0 @@
-<#--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to you 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.
-  -->
-
-# ${release.version}<#if release.date?has_content> (${release.date})</#if>
-
-This is the first release of the project.
-
-<#include "../.changelog.md.ftl">
diff --git a/src/changelog/0.1.0/LOG4J2-3638_Provide_Maven_plugin_to_inline_location.xml b/src/changelog/0.1.0/LOG4J2-3638_Provide_Maven_plugin_to_inline_location.xml
index 14ada66..6a3986a 100644
--- a/src/changelog/0.1.0/LOG4J2-3638_Provide_Maven_plugin_to_inline_location.xml
+++ b/src/changelog/0.1.0/LOG4J2-3638_Provide_Maven_plugin_to_inline_location.xml
@@ -21,5 +21,5 @@
        type="added">
   <issue id="LOG4J2-3638" link="https://issues.apache.org/jira/browse/LOG4J2-3638"/>
   <author id="github:ppkarwasz"/>
-  <description format="markdown">Added `log4j-transform-maven-plugin` bytecode transformation tool to provide location information without reflection</description>
+  <description format="asciidoc">Added `log4j-transform-maven-plugin` bytecode transformation tool to provide location information without reflection</description>
 </entry>
diff --git a/src/changelog/0.1.0/LOG4J2-673_Maven_Shade_resource_transformer.xml b/src/changelog/0.1.0/LOG4J2-673_Maven_Shade_resource_transformer.xml
index 5cde8f4..bcdd328 100644
--- a/src/changelog/0.1.0/LOG4J2-673_Maven_Shade_resource_transformer.xml
+++ b/src/changelog/0.1.0/LOG4J2-673_Maven_Shade_resource_transformer.xml
@@ -22,5 +22,5 @@
   <issue id="LOG4J2-673" link="https://issues.apache.org/jira/browse/LOG4J2-673"/>
   <author id="github:edwgiz" name="Eduard Gizatullin"/>
   <author id="github:ppkarwasz"/>
-  <description format="markdown">Added `log4j-transform-maven-shade-plugin-extensions` resource transformer for the Maven Shade Plugin to merge `Log4j2Plugins.dat` plugin caches</description>
+  <description format="asciidoc">Added `log4j-transform-maven-shade-plugin-extensions` resource transformer for the Maven Shade Plugin to merge `Log4j2Plugins.dat` plugin caches</description>
 </entry>
diff --git a/src/site/_release-notes.adoc b/src/site/_release-notes.adoc
new file mode 100644
index 0000000..c6036e5
--- /dev/null
+++ b/src/site/_release-notes.adoc
@@ -0,0 +1,40 @@
+////
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+////
+
+////
+    ██     ██  █████  ██████  ███    ██ ██ ███    ██  ██████  ██
+    ██     ██ ██   ██ ██   ██ ████   ██ ██ ████   ██ ██       ██
+    ██  █  ██ ███████ ██████  ██ ██  ██ ██ ██ ██  ██ ██   ███ ██
+    ██ ███ ██ ██   ██ ██   ██ ██  ██ ██ ██ ██  ██ ██ ██    ██
+     ███ ███  ██   ██ ██   ██ ██   ████ ██ ██   ████  ██████  ██
+
+    IF THIS FILE IS CALLED `index.adoc`, IT IS AUTO-GENERATED, DO NOT EDIT IT!
+
+    Release notes `index.adoc` is generated from `src/changelog/.index.adoc.ftl`.
+    Auto-generation happens during `generate-sources` phase of Maven.
+    Hence, you must always
+
+    1. Edit `.index.adoc.ftl`
+    2. Run `./mvnw generate-sources`
+    3. Commit both `.index.adoc.ftl` and the generated `.index.adoc`
+////
+
+[#release-notes]
+== Release Notes
+
+include::_release-notes/_0.x.x.adoc[]
+include::_release-notes/_0.1.0.adoc[]
diff --git a/src/site/_release-notes/_0.1.0.adoc b/src/site/_release-notes/_0.1.0.adoc
new file mode 100644
index 0000000..59d55ac
--- /dev/null
+++ b/src/site/_release-notes/_0.1.0.adoc
@@ -0,0 +1,47 @@
+////
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+////
+
+////
+    ██     ██  █████  ██████  ███    ██ ██ ███    ██  ██████  ██
+    ██     ██ ██   ██ ██   ██ ████   ██ ██ ████   ██ ██       ██
+    ██  █  ██ ███████ ██████  ██ ██  ██ ██ ██ ██  ██ ██   ███ ██
+    ██ ███ ██ ██   ██ ██   ██ ██  ██ ██ ██ ██  ██ ██ ██    ██
+     ███ ███  ██   ██ ██   ██ ██   ████ ██ ██   ████  ██████  ██
+
+    IF THIS FILE DOESN'T HAVE A `.ftl` SUFFIX, IT IS AUTO-GENERATED, DO NOT EDIT IT!
+
+    Version-specific release notes (`7.8.0.adoc`, etc.) are generated from `src/changelog/*/.release-notes.adoc.ftl`.
+    Auto-generation happens during `generate-sources` phase of Maven.
+    Hence, you must always
+
+    1. Find and edit the associated `.release-notes.adoc.ftl`
+    2. Run `./mvnw generate-sources`
+    3. Commit both `.release-notes.adoc.ftl` and the generated `7.8.0.adoc`
+////
+
+[#release-notes-0-1-0]
+=== 0.1.0
+
+Release date:: 2023-05-05
+
+This is the first release of the project.
+
+
+==== Added
+
+* Added `log4j-transform-maven-plugin` bytecode transformation tool to provide location information without reflection (https://issues.apache.org/jira/browse/LOG4J2-3638[LOG4J2-3638])
+* Added `log4j-transform-maven-shade-plugin-extensions` resource transformer for the Maven Shade Plugin to merge `Log4j2Plugins.dat` plugin caches (https://issues.apache.org/jira/browse/LOG4J2-673[LOG4J2-673])
diff --git a/src/site/_release-notes/_0.x.x.adoc b/src/site/_release-notes/_0.x.x.adoc
new file mode 100644
index 0000000..0b3f3d5
--- /dev/null
+++ b/src/site/_release-notes/_0.x.x.adoc
@@ -0,0 +1,46 @@
+////
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+////
+
+////
+    ██     ██  █████  ██████  ███    ██ ██ ███    ██  ██████  ██
+    ██     ██ ██   ██ ██   ██ ████   ██ ██ ████   ██ ██       ██
+    ██  █  ██ ███████ ██████  ██ ██  ██ ██ ██ ██  ██ ██   ███ ██
+    ██ ███ ██ ██   ██ ██   ██ ██  ██ ██ ██ ██  ██ ██ ██    ██
+     ███ ███  ██   ██ ██   ██ ██   ████ ██ ██   ████  ██████  ██
+
+    IF THIS FILE DOESN'T HAVE A `.ftl` SUFFIX, IT IS AUTO-GENERATED, DO NOT EDIT IT!
+
+    Version-specific release notes (`7.8.0.adoc`, etc.) are generated from `src/changelog/*/.release-notes.adoc.ftl`.
+    Auto-generation happens during `generate-sources` phase of Maven.
+    Hence, you must always
+
+    1. Find and edit the associated `.release-notes.adoc.ftl`
+    2. Run `./mvnw generate-sources`
+    3. Commit both `.release-notes.adoc.ftl` and the generated `7.8.0.adoc`
+////
+
+[#release-notes-0-x-x]
+=== 0.x.x
+
+
+
+This is the second release of the project.
+
+
+==== Changed
+
+* Migrated to `logging-parent` 10.1.1 and adopted its CI and `pom.xml` infrastructure


[logging-log4j-transform] 06/06: Try fixing tests

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

vy pushed a commit to branch parent-10.1.1
in repository https://gitbox.apache.org/repos/asf/logging-log4j-transform.git

commit 7013ecfa591539b0711d0f4d35839339b00496aa
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Mon Oct 2 21:42:15 2023 +0200

    Try fixing tests
---
 log4j-transform-maven-plugin/src/it/location/pom.xml      |  2 +-
 log4j-transform-maven-plugin/src/it/pomproject/pom.xml    |  2 +-
 log4j-transform-maven-shade-plugin-extensions/pom.xml     |  4 ----
 .../log4j/weaver/AbstractConversionHandlerTest.java       | 15 +++++++++++----
 .../weaver/log4j2/LoggerConversionHandlerExample.java     |  3 +--
 5 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/log4j-transform-maven-plugin/src/it/location/pom.xml b/log4j-transform-maven-plugin/src/it/location/pom.xml
index 801c04d..6602b51 100644
--- a/log4j-transform-maven-plugin/src/it/location/pom.xml
+++ b/log4j-transform-maven-plugin/src/it/location/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.logging</groupId>
     <artifactId>logging-parent</artifactId>
-    <version>10.0.0</version>
+    <version>10.1.1</version>
     <relativePath />
   </parent>
 
diff --git a/log4j-transform-maven-plugin/src/it/pomproject/pom.xml b/log4j-transform-maven-plugin/src/it/pomproject/pom.xml
index 71f9f8e..225459d 100644
--- a/log4j-transform-maven-plugin/src/it/pomproject/pom.xml
+++ b/log4j-transform-maven-plugin/src/it/pomproject/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.logging</groupId>
     <artifactId>logging-parent</artifactId>
-    <version>10.0.0</version>
+    <version>10.1.1</version>
     <relativePath />
   </parent>
 
diff --git a/log4j-transform-maven-shade-plugin-extensions/pom.xml b/log4j-transform-maven-shade-plugin-extensions/pom.xml
index 26bf911..64fb904 100644
--- a/log4j-transform-maven-shade-plugin-extensions/pom.xml
+++ b/log4j-transform-maven-shade-plugin-extensions/pom.xml
@@ -32,10 +32,6 @@
   <name>Apache Log4j Maven Shade Plugin Transformer</name>
   <description>Transformer implementation to concatenate Log4j2Plugins.dat files</description>
 
-  <properties>
-    <bnd.skip>true</bnd.skip>
-  </properties>
-
   <dependencies>
 
     <dependency>
diff --git a/log4j-weaver/src/test/java/org/apache/logging/log4j/weaver/AbstractConversionHandlerTest.java b/log4j-weaver/src/test/java/org/apache/logging/log4j/weaver/AbstractConversionHandlerTest.java
index 1517184..1dbde3b 100644
--- a/log4j-weaver/src/test/java/org/apache/logging/log4j/weaver/AbstractConversionHandlerTest.java
+++ b/log4j-weaver/src/test/java/org/apache/logging/log4j/weaver/AbstractConversionHandlerTest.java
@@ -20,6 +20,7 @@ import java.io.ByteArrayOutputStream;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
 import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
@@ -51,11 +52,17 @@ public class AbstractConversionHandlerTest {
                 .get(AbstractConversionHandlerTest.class.getClassLoader().getResource(internalName + ".class").toURI());
         final String simpleClassName = Paths.get(internalName).getFileName().toString();
         try (Stream<Path> paths = Files.walk(topClass.getParent(), 1)) {
-            return paths.filter(p -> {
-                final String nested = p.getFileName().toString();
-                return nested.startsWith(simpleClassName) && nested.endsWith(".class");
-            }).sorted();
+            return paths
+                    .filter(p -> {
+                        final String nested = p.getFileName().toString();
+                        return nested.startsWith(simpleClassName) && nested.endsWith(".class");
+                    })
+                    .sorted()
+                    // We create a shallow-copy to return a `Stream` without leaking file descriptors
+                    .collect(Collectors.toList())
+                    .stream();
         }
+
     }
 
     private static class TestClassLoader extends ClassLoader {
diff --git a/log4j-weaver/src/test/java/org/apache/logging/log4j/weaver/log4j2/LoggerConversionHandlerExample.java b/log4j-weaver/src/test/java/org/apache/logging/log4j/weaver/log4j2/LoggerConversionHandlerExample.java
index 8405fce..812d97c 100644
--- a/log4j-weaver/src/test/java/org/apache/logging/log4j/weaver/log4j2/LoggerConversionHandlerExample.java
+++ b/log4j-weaver/src/test/java/org/apache/logging/log4j/weaver/log4j2/LoggerConversionHandlerExample.java
@@ -55,8 +55,7 @@ public class LoggerConversionHandlerExample {
     private static final Object P9 = "(p9)";
     private static final Object[] PARRAY = { "(...)" };
     private static final Supplier<?>[] SUPPLIERS = { () -> OBJECT };
-    @SuppressWarnings("StaticAssignmentOfThrowable")
-    private static final Throwable THROWABLE = new RuntimeException();
+    @SuppressWarnings("StaticAssignmentOfThrowable") private static final Throwable THROWABLE = new RuntimeException();
     private static final Marker MARKER = MarkerManager.getMarker("MARKER");
 
     private static final Logger logger = LogManager.getLogger();


[logging-log4j-transform] 01/06: Improve `generate-email.sh`

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

vy pushed a commit to branch parent-10.1.1
in repository https://gitbox.apache.org/repos/asf/logging-log4j-transform.git

commit e6c6c6f05d19c3c701299001648c33b1643b12bf
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Mon Oct 2 15:23:06 2023 +0200

    Improve `generate-email.sh`
---
 .github/generate-email.sh | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/.github/generate-email.sh b/.github/generate-email.sh
index 9e07bd9..ae6b8d3 100755
--- a/.github/generate-email.sh
+++ b/.github/generate-email.sh
@@ -33,20 +33,21 @@ fail_for_invalid_args() {
 
 # Constants
 PROJECT_NAME="Apache Log4j Transformation Tools"
+PROJECT_SITE="https://logging.apache.org/log4j/transform"
 PROJECT_REPO="https://github.com/apache/logging-log4j-transform"
 PROJECT_DIST_DIR="https://dist.apache.org/repos/dist/dev/logging/log4j-transform"
 PROJECT_VERSION="$2"
 COMMIT_ID="$3"
 
 # Check release notes file
-RELEASE_NOTES_FILE="$SCRIPT_DIR/../target/release-notes/$PROJECT_VERSION.md"
+RELEASE_NOTES_FILE="$SCRIPT_DIR/../src/site/_release-notes/_$PROJECT_VERSION.adoc"
 [ -f "$RELEASE_NOTES_FILE" ] || {
     stderr "Couldn't find release notes file: $RELEASE_NOTES_FILE"
     exit 1
 }
 
 dump_release_notes() {
-    awk "f{print} /^# $PROJECT_VERSION/{f=1}" "$RELEASE_NOTES_FILE"
+    awk "f{print} /^Release date::/{f=1}" "$RELEASE_NOTES_FILE"
 }
 
 case $1 in
@@ -85,14 +86,14 @@ announce)
 To: log4j-user@logging.apache.org, dev@logging.apache.org
 Title: [ANNOUNCE] $PROJECT_NAME $PROJECT_VERSION released
 
-${PROJECT_NAME}[1] team is pleased to announce the $PROJECT_VERSION
+${PROJECT_NAME} team is pleased to announce the $PROJECT_VERSION
 release. This project contains tools for binary postprocessing of
 projects that use the Apache Log4j API. For further information
 (support, download, etc.) see the project website[1].
 
-[1] $PROJECT_REPO
+[1] $PROJECT_SITE
 
-# Release Notes
+=== Release Notes
 EOF
     dump_release_notes
     ;;