This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-log4j-transform.git
The following commit(s) were added to refs/heads/main by this push:
new cadc226 Fix changelog generation
cadc226 is described below
commit cadc22656c0e8b9e569940c16aacc3e25f60a42f
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Mon May 1 09:41:47 2023 +0200
Fix changelog generation
---
pom.xml | 16 +++++
...638_Provide_Maven_plugin_to_inline_location.xml | 0
...LOG4J2-673_Maven_Shade_resource_transformer.xml | 4 +-
src/changelog/CHANGELOG.adoc.ftl | 84 ++++++++++++++++++++++
4 files changed, 103 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 0e0f310..27c67d0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -98,6 +98,7 @@
<project.build.outputTimestamp>1682714736</project.build.outputTimestamp>
<!-- plugin versions -->
<flatten-maven-plugin.version>1.4.1</flatten-maven-plugin.version>
+
<log4j-changelog-maven-plugin.version>0.3.0</log4j-changelog-maven-plugin.version>
<sign-maven-plugin.version>1.0.1</sign-maven-plugin.version>
</properties>
<dependencyManagement>
@@ -127,6 +128,21 @@
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-changelog-maven-plugin</artifactId>
+ <version>${log4j-changelog-maven-plugin.version}</version>
+ <configuration>
+ <indexTemplates/>
+ <changelogTemplates>
+ <template>
+
<source>${project.basedir}/src/changelog/CHANGELOG.adoc.ftl</source>
+ <target>${project.basedir}/CHANGELOG.adoc</target>
+ <failIfNotFound>true</failIfNotFound>
+ </template>
+ </changelogTemplates>
+ </configuration>
+ </plugin>
<!-- Downgrade until
https://issues.apache.org/jira/browse/MRELEASE-1091 is reverted -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
diff --git
a/src/changelog/.0.1.x/LOG4J2-3638_Provide_Maven_plugin_to_inline_location.xml
b/src/changelog/.0.x.x/LOG4J2-3638_Provide_Maven_plugin_to_inline_location.xml
similarity index 100%
rename from
src/changelog/.0.1.x/LOG4J2-3638_Provide_Maven_plugin_to_inline_location.xml
rename to
src/changelog/.0.x.x/LOG4J2-3638_Provide_Maven_plugin_to_inline_location.xml
diff --git
a/src/changelog/.0.1.x/LOG4J2-673_Maven_Shade_resource_transformer.xml
b/src/changelog/.0.x.x/LOG4J2-673_Maven_Shade_resource_transformer.xml
similarity index 92%
rename from src/changelog/.0.1.x/LOG4J2-673_Maven_Shade_resource_transformer.xml
rename to src/changelog/.0.x.x/LOG4J2-673_Maven_Shade_resource_transformer.xml
index 8e9aefd..aa19505 100644
--- a/src/changelog/.0.1.x/LOG4J2-673_Maven_Shade_resource_transformer.xml
+++ b/src/changelog/.0.x.x/LOG4J2-673_Maven_Shade_resource_transformer.xml
@@ -17,7 +17,9 @@
-->
<entry type="added">
<issue id="LOG4J2-673"
link="https://issues.apache.org/jira/browse/LOG4J2-673"/>
- <author id="edwgiz"/>
+ <author id="edwgiz" name="Eduard Gizatullin"/>
+ <!-- Committer -->
+ <author id="pkarwasz"/>
<description format="asciidoc">
Add resource transformer for the Maven Shade Plugin to merge
`Log4j2Plugins.dat` plugin caches.
</description>
diff --git a/src/changelog/CHANGELOG.adoc.ftl b/src/changelog/CHANGELOG.adoc.ftl
new file mode 100644
index 0000000..de4a9a0
--- /dev/null
+++ b/src/changelog/CHANGELOG.adoc.ftl
@@ -0,0 +1,84 @@
+<#--
+ 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.
+-->
+<#function isCommitter apacheId>
+ <#switch apacheId>
+ <#case "ckozak">
+ <#case "ggregory">
+ <#case "grobmeier">
+ <#case "mattsicker">
+ <#case "pkarwasz">
+ <#case "rgoers">
+ <#case "rpopma">
+ <#case "vy">
+ <#return true>
+ <#default>
+ <#return false>
+ </#switch>
+</#function>
+<#function getGithubId apacheId>
+ <#switch apacheId>
+ <#case "ckozak">
+ <#return "carterkozak">
+ <#case "ggregory">
+ <#return "garydgregory">
+ <#case "mattsicker">
+ <#return "jvz">
+ <#case "pkarwasz">
+ <#return "ppkarwasz">
+ <#case "rpopma">
+ <#return "remkop">
+ <#default>
+ <#return apacheId>
+ </#switch>
+</#function>
+<#if entriesByType?size gt 0>= ${release.version}<#if
release.date?has_content> (${release.date})</#if>
+<#list entriesByType as entryType, entries>
+
+== ${entryType?capitalize}
+
+<#list entries as entry>
+<@compress single_line=true>
+ * <#list entry.issues as issue>
+ ${issue.link}[${issue.id}]${issue?has_next?string(", ", ":")}
+ </#list>
+ ${entry.description.text?ensure_ends_with(".")}
+ <#assign first = true>
+ <#assign committer = "">
+ <#list entry.authors as author>
+ <#if isCommitter(author.id!"")>
+ <#assign committer = author.id>
+ <#else>
+ ${first?string("Thanks to ", ", ")}
+ <#if author.name?has_content>
+ <#if author.id?has_content>
+ https://github.com/${author.id}[${author.name}].
+ <#else>
+ ${author.name}.
+ </#if>
+ <#else>
+ https://github.com/${author.id}[${author.id}].
+ </#if>
+ </#if>
+ </#list>
+ <#if committer?has_content>
+ (https://github.com/${getGithubId(committer)}[${committer}])
+ </#if>
+</@compress>
+
+</#list>
+</#list>
+</#if>