Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify site generation #1166

Merged
merged 48 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
7279946
LOG4J2-3628 Initial changelog import & export utilities.
vy Nov 21, 2022
3f987d0
LOG4J2-3628 Initial changelog import & export.
vy Nov 21, 2022
6a55f11
LOG4J2-3628 Use only the version in generated changelog files.
vy Nov 21, 2022
be2d218
LOG4J2-3628 Remove Maven Changes Plugin et al.
vy Nov 21, 2022
88d6bd5
LOG4J2-3628 Corrections on imports & exports.
vy Nov 23, 2022
8468342
LOG4J2-3628 Add missing author IDs.
vy Nov 23, 2022
c905425
LOG4J2-3628 Minor corrections.
vy Nov 23, 2022
5cef031
LOG4J2-3628 Add missing license headers.
vy Nov 23, 2022
41cc1ef
LOG4J2-3628 Fix module import order.
vy Nov 23, 2022
eef9a74
LOG4J2-3628 Add releaser.
vy Nov 23, 2022
85413af
LOG4J2-3628 Address Spotless complaints.
vy Nov 23, 2022
7211115
LOG4J2-3628 Add exec-maven-plugin entries.
vy Nov 23, 2022
b974f3a
LOG4J2-3628 Add README.
vy Nov 23, 2022
1555b7f
LOG4J2-3628 Add changelog entry for this feature.
vy Nov 23, 2022
5cc570c
LOG4J2-3628 Fix screwed ordering due to rebase.
vy Nov 23, 2022
aa9883f
LOG4J2-3628 Remove redundant maven-failsafe-plugin executions.
vy Nov 24, 2022
da263c8
LOG4J2-3628 Protect `DocumentBuilderFactory` against XXE.
vy Nov 24, 2022
04f90d9
LOG4J2-3628 Order changelog entries by filepath in `AsciiDocExporter`.
vy Nov 24, 2022
f570edb
LOG4J2-3628 Rename `unreleased.adoc` to `<releaseVersionMajor>.x.x.ad…
vy Nov 24, 2022
e2181b7
LOG4J2-3628 Avoid committing generated changelog files.
vy Nov 27, 2022
967b74d
LOG4J2-3628 Switch unreleased directory name to `.unreleased-<release…
vy Nov 27, 2022
8b126a3
LOG4J2-3628 `spotless:apply` changes.
vy Nov 27, 2022
9d68397
LOG4J2-3628 More `maven-changes-plugin` clean up.
vy Nov 27, 2022
0fdc594
LOG4J2-3628 Move `changelog` to `src/changelog`.
vy Nov 28, 2022
d789642
LOG4J2-3628 Allow SNAPSHOT versions in releaser.
vy Nov 28, 2022
0d77f8f
LOG4J2-3628 Disallow SNAPSHOT versions in releaser by default.
vy Nov 28, 2022
93ca856
LOG4J2-3628 Replace `log4j-internal-util` with `log4j-tools` project.
vy Dec 9, 2022
4340d48
LOG4J2-3628 More `log4j-tools` fixes.
vy Dec 11, 2022
dd26866
LOG4J2-3628 Update `CHANGELOG.adoc`.
vy Dec 11, 2022
ee05eba
LOG4J2-3628 Trim changelog intros.
vy Dec 11, 2022
87532b5
LOG4J2-3628 Use `Log4jReleaseVersion` property for `ChangelogReleaser`.
vy Dec 12, 2022
e524a1f
LOG4J2-3628 Adopt the new log4j-tools packages and group ID.
vy Dec 12, 2022
480ec1c
Simplify POM
vy Dec 27, 2022
dff917f
LOG4J2-3628 Fix some authors
vy Dec 30, 2022
22a2f88
LOG4J2-3628 Add changelog templates
vy Dec 30, 2022
e8d2be2
Merge remote-tracking branch 'origin/release-2.x' into LOG4J2-3628
vy Dec 30, 2022
1f85eea
Simplify site generation
vy Dec 19, 2022
b49234d
Add changelog entry
vy Dec 19, 2022
7d071d8
Fix build instructions
vy Dec 19, 2022
fc40fdd
Remove link to the empty `log4j-core` page in the menu
vy Dec 19, 2022
c96fc8c
LOG4J2-3628 Fix merge resolution mistake
vy Dec 30, 2022
e9a3954
Merge remote-tracking branch 'origin/release-2.x' into mvn-site-simpl…
vy Jan 15, 2023
c6b1d87
Align with `release-2.x`
vy Jan 16, 2023
8ec9682
Align with `release-2.x`, again
vy Jan 16, 2023
806ccd3
Fix RAT complaints
vy Jan 16, 2023
2b55e97
Remove RAT report link
vy Jan 16, 2023
9193f5d
Update `site` instructions
vy Jan 16, 2023
6cb9899
Disable `requireUpperBoundDeps` enforcer rule for samples
vy Jan 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
LOG4J2-3628 Add changelog templates
  • Loading branch information
vy committed Dec 30, 2022
commit 22a2f88366592707be74f5b9586c5b7e9849f860
30 changes: 21 additions & 9 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ See {log4j-changelog-ref} project for further details; how to use this changelog

== I am about to deploy a new release. What shall I do?

Just before a release, two things need to happen in the changelog sources:
Just before a release, three things need to happen in the changelog sources:

. Changelog entries of the upcoming release directory `src/changelog/.<releaseVersionMajor>.x.x` needs to be moved to the release changelog directory `src/changelog/<releaseVersion>`
. `.index.adoc` and `.release.xml` need to be created in the release changelog directory `src/changelog/<releaseVersion>`
. *changelog entry files needs to be moved* from the _upcoming_ release changelog directory `src/changelog/.<releaseVersionMajor>.x.x` to the _new_ release changelog directory `src/changelog/<releaseVersion>`
. *`.changelog.adoc.ftl` needs to be copied* from the _upcoming_ release changelog directory to the _new_ release changelog directory, unless it already exists in the target
. *`.release.xml` needs to be created* in the _new_ release changelog directory

Due to the nature of release candidates, above steps might need to be repeated multiple times.

Expand All @@ -45,21 +46,32 @@ Once a release candidate voting reaches to a consensus for release, associated a
Hence, there are no differences between releases and release candidates.
====

How to carry out aforementioned two changes are explained below in steps:
How to carry out aforementioned changes are explained below in steps:

. Populate the `src/changelog/<releaseVersion>` directory (e.g., `src/changelog/2.19.0`) from the upcoming release changelog directory (e.g., `src/changelog/.2.x.x`):
+
[source,bash]
----
./mvnw -N -P changelog-releaser
----
. Verify that `src/changelog/.<releaseVersionMajor>.x.x` directory (e.g., `src/changelog/.2.x.x`) is emptied
. Verify that `src/changelog/<releaseVersion>` directory (e.g., `src/changelog/2.19.0`) is created, and it contains `.intro.adoc`, `.release.xml`, and changelog entry files
+
[IMPORTANT]
====
If `src/changelog/<releaseVersion>` directory (e.g., `src/changelog/2.19.0`) already exists with certain content, `changelog-releaser` profile will only move new changelog entry files and override `.release.xml`; `.intro.adoc` will not be touched, if exists.
`changelog-releaser` Maven profile obtains the new release version from `Log4jReleaseVersion` property.
If needed, you can override it to point to another release version:

[source,bash]
----
./mvnw -N -P changelog-releaser -DLog4jReleaseVersion=6.6.6
----
====
. Verify that all changelog entry files are moved from `src/changelog/.<releaseVersionMajor>.x.x` directory (e.g., `src/changelog/.2.x.x`)
. Verify that `src/changelog/<releaseVersion>` directory (e.g., `src/changelog/2.19.0`) is created, and it contains `.changelog.adoc.ftl`, `.release.xml`, and changelog entry files
+
[IMPORTANT]
====
If `src/changelog/<releaseVersion>` directory (e.g., `src/changelog/2.19.0`) already exists with certain content, `changelog-releaser` profile will only move new changelog entry files and override `.release.xml`; `.changelog.adoc.ftl` will not be touched, if it already exists.
This allows one to run `changelog-releaser` profile multiple times, e.g., to incorporate changes added to a release candidate.
====
. Edit the created `.intro.adoc`
. `git add` the changes in `/src/changelog` and commit them
. Edit the populated `.changelog.adoc.ftl`
. `git add` the changes in `src/changelog` and commit them
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,7 @@
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>changelog-asciidoc-export</id>
<id>changelog-export</id>
<phase>pre-site</phase>
<goals>
<goal>java</goal>
Expand All @@ -1537,7 +1537,7 @@
<groupId>org.apache.logging.log4j.tools</groupId>
<artifactId>log4j-changelog</artifactId>
</executableDependency>
<mainClass>org.apache.logging.log4j.tools.changelog.exporter.AsciiDocExporter</mainClass>
<mainClass>org.apache.logging.log4j.tools.changelog.exporter.ChangelogExporter</mainClass>
<systemProperties>
<systemProperty>
<key>log4j.changelog.directory</key>
Expand Down
22 changes: 22 additions & 0 deletions src/changelog/.2.x.x/.changelog.adoc.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
////
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.
////

= ${release.version}<#if release.date?has_content> (${release.date})</#if>

Changes staged for the next version that is yet to be released.

<#include "../.changelog-entries.adoc.ftl">
32 changes: 32 additions & 0 deletions src/changelog/.changelog-entries.adoc.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<#if entriesByType?size gt 0>== Changes
<#list entriesByType as entryType, entries>

== ${entryType?capitalize}

<#list entries as entry>
* ${entry.description.text?replace("\\s+", " ", "r")} (for <@compress single_line=true>
<#list entry.issues as issue>${issue.link}[${issue.id}]<#if issue?has_next>, </#if></#list> by
<#list entry.authors as author>
<@compress single_line=true>
<#if !author.id?has_content>${author.name}
<#elseif author.id == "rgoers">Ralph Goers
<#elseif author.id == "ggregory">Gary Gregory
<#elseif author.id == "sdeboy">Scott Deboy
<#elseif author.id == "rpopma">Remko Popma
<#elseif author.id == "nickwilliams">Nick Williams
<#elseif author.id == "mattsicker">Matt Sicker
<#elseif author.id == "bbrouwer">Bruce Brouwer
<#elseif author.id == "rgupta">Raman Gupta
<#elseif author.id == "mikes">Mikael Ståldal
<#elseif author.id == "ckozak">Carter Kozak
<#elseif author.id == "vy">Volkan Yazıcı
<#elseif author.id == "rgrabowski">Ron Grabowski
<#elseif author.id == "pkarwasz">Piotr P. Karwasz
<#else>`${author.id}`
</#if>
</@compress><#if author?has_next>, </#if>
</#list>
</@compress>)
</#list>
</#list>
</#if>
22 changes: 22 additions & 0 deletions src/changelog/.index.adoc.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
////
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.
////

= Release changelogs

<#list releases as release>
* xref:${release.changelogFileName}[${release.version}]<#if release.date?has_content> (${release.date})</#if>
</#list>
20 changes: 20 additions & 0 deletions src/changelog/2.0-alpha1/.changelog.adoc.ftl
Original file line number Diff line number Diff line change
@@ -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

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.
////

= ${release.version}<#if release.date?has_content> (${release.date})</#if>

<#include "../.changelog-entries.adoc.ftl">
20 changes: 20 additions & 0 deletions src/changelog/2.0-alpha2/.changelog.adoc.ftl
Original file line number Diff line number Diff line change
@@ -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

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.
////

= ${release.version}<#if release.date?has_content> (${release.date})</#if>

<#include "../.changelog-entries.adoc.ftl">
20 changes: 20 additions & 0 deletions src/changelog/2.0-beta1/.changelog.adoc.ftl
Original file line number Diff line number Diff line change
@@ -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

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.
////

= ${release.version}<#if release.date?has_content> (${release.date})</#if>

<#include "../.changelog-entries.adoc.ftl">
20 changes: 20 additions & 0 deletions src/changelog/2.0-beta2/.changelog.adoc.ftl
Original file line number Diff line number Diff line change
@@ -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

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.
////

= ${release.version}<#if release.date?has_content> (${release.date})</#if>

<#include "../.changelog-entries.adoc.ftl">
20 changes: 20 additions & 0 deletions src/changelog/2.0-beta3/.changelog.adoc.ftl
Original file line number Diff line number Diff line change
@@ -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

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.
////

= ${release.version}<#if release.date?has_content> (${release.date})</#if>

<#include "../.changelog-entries.adoc.ftl">
20 changes: 20 additions & 0 deletions src/changelog/2.0-beta4/.changelog.adoc.ftl
Original file line number Diff line number Diff line change
@@ -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

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.
////

= ${release.version}<#if release.date?has_content> (${release.date})</#if>

<#include "../.changelog-entries.adoc.ftl">
20 changes: 20 additions & 0 deletions src/changelog/2.0-beta5/.changelog.adoc.ftl
Original file line number Diff line number Diff line change
@@ -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

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.
////

= ${release.version}<#if release.date?has_content> (${release.date})</#if>

<#include "../.changelog-entries.adoc.ftl">
20 changes: 20 additions & 0 deletions src/changelog/2.0-beta6/.changelog.adoc.ftl
Original file line number Diff line number Diff line change
@@ -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

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.
////

= ${release.version}<#if release.date?has_content> (${release.date})</#if>

<#include "../.changelog-entries.adoc.ftl">
20 changes: 20 additions & 0 deletions src/changelog/2.0-beta7/.changelog.adoc.ftl
Original file line number Diff line number Diff line change
@@ -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

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.
////

= ${release.version}<#if release.date?has_content> (${release.date})</#if>

<#include "../.changelog-entries.adoc.ftl">
20 changes: 20 additions & 0 deletions src/changelog/2.0-beta8/.changelog.adoc.ftl
Original file line number Diff line number Diff line change
@@ -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

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.
////

= ${release.version}<#if release.date?has_content> (${release.date})</#if>

<#include "../.changelog-entries.adoc.ftl">
20 changes: 20 additions & 0 deletions src/changelog/2.0-beta9/.changelog.adoc.ftl
Original file line number Diff line number Diff line change
@@ -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

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.
////

= ${release.version}<#if release.date?has_content> (${release.date})</#if>

<#include "../.changelog-entries.adoc.ftl">
Loading