Changelogs are stored in src/changelog
directory.
log4j-changelog is used to generate AsciiDoc-formatted changelog files during Maven pre-site
phase and export them to target/generated-sources/site/asciidoc/changelog
directory.
These exported AsciiDoc files are not committed, since they are only relevant for the website, and they cause merge-conflicts between feature branches.
./mvnw site
command can be used to manually generate these files.
See log4j-changelog project for further details; how to use this changelog system, what steps are needed while making a new release, etc.
Just before a release, three things need to happen in the changelog sources:
-
changelog entry files needs to be moved from the upcoming release changelog directory
src/changelog/.<releaseVersionMajor>.x.x
to the new release changelog directorysrc/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.
Tip
|
Log4j releases and release candidates all get deployed to the same staging repository.
Their |
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
):./mvnw -N -P changelog-releaser
Importantchangelog-releaser
Maven profile obtains the new release version fromLog4jReleaseVersion
property. If needed, you can override it to point to another release version:./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 filesImportantIf
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 runchangelog-releaser
profile multiple times, e.g., to incorporate changes added to a release candidate. -
Edit the populated
.changelog.adoc.ftl
-
git add
the changes insrc/changelog
and commit them