Usage
You can use Logging Parent as follows:
-
Add
org.apache.logging:logging-parent:11.3.0
as aparent
to yourpom.xml
-
You may need to add
.mvn/jvm.config
to your project. See this as an example. -
Check if
./mvnw verify
succeeds, otherwise make necessary changes -
Copy and adapt the support files (
.gitignore
,.github/workflows/build.yaml
, etc.) -
Copy and adapt Log4j Changelog files:
-
src/changelog/.<majorVersion>.x.x/.release-notes.adoc.ftl
-
src/changelog/.changelog.adoc.ftl
-
src/changelog/.index.adoc.ftl
-
-
In order to create an Antora-based site:
-
Copy the following files and adapt them:
-
antora-playbook.yaml
-
package.json
-
src/site/antora/antora.yml
-
src/site/antora/.antora.yml
-
src/site/antora/modules/ROOT/pages/release-notes.adoc
-
-
Build the website using
./mvnw site
-
Check out the website generated to
target/site
by pointing a browser to it
-
Website deployment
Using deploy-site-reusable.yaml
reusable GitHub Actions workflow, you can automate the website deployments for staging and production environments.
Example: Logging Parent branching scheme
See how deploy-site.yaml
of Logging Parent achieves that using the
<source-branch>-site-<environment>-out
branch naming convention:
- Staging website
- Production website
- Release staging website
- Branch
main
-
Contains the sources (i.e., AsciiDoc files) to build the staging website.
- Branch
main-site-stg-out
-
Populated automatically by the workflow triggered for changes on
main
. It contains the contents (i.e., HTML files) of the the staging website. In short, CI buildsmain
and copies the generatedtarget/site
tomain-site-stg-out
. - Branch
main-site-pro
-
Contains the sources (i.e., AsciiDoc files) to build the the production website. It is manually populated by maintainers. For instance,
-
after a release, the release tag is merged to
main-site-pro
-
when there are minor website fixes in
main
that can also go to the production website, they arecherry-pick
ed onto themain-site-pro
-
when there are production-only website fixes, they are committed to
main-site-pro
-
- Branch
main-site-pro-out
-
Populated automatically by the workflow triggered for changes on
main-site-pro
. It contains the contents (i.e., HTML files) of the production website. In short, CI buildsmain-site-pro
and copies the generatedtarget/site
tomain-site-pro-out
. - Branch
release/<version>
-
Contains the sources (i.e., AsciiDoc files) to build the release staging website. It is manually populated by the release manager during a release.
- Branch
release/<version>-site-stg-out
-
Populated automatically by the workflow triggered for changes on
release/<version>
. It contains the contents (i.e., HTML files) of the release staging website. In short, CI buildsrelease/<version>
and copies the generatedtarget/site
torelease/<version>-site-stg-out
.
Example: Log4j website branching scheme
For instance, the following branching scheme is used for the Log4j project:
Description |
Branch name |
|
---|---|---|
Log4j 2 |
Log4j 3 |
|
Staging website sources |
|
|
Staging website contents |
|
|
Production website sources |
|
|
Production website contents |
|
|
Release staging website sources |
|
|
Release staging website contents |
|