Usage
You can use Logging Parent as follows:
-
Add
org.apache.logging:logging-parent:12.1.1as aparentto yourpom.xml -
You may need to add
.mvn/jvm.configto your project. See this as an example. -
Check if
./mvnw verifysucceeds, otherwise make necessary changes -
Copy and adapt the support files (
.gitignore,.gitattributes, etc.) -
Create workflows using reusable workflows. See Reusable GitHub Actions workflows for more details.
-
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/siteby 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 buildsmainand copies the generatedtarget/sitetomain-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
mainthat can also go to the production website, they arecherry-picked 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-proand copies the generatedtarget/sitetomain-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/sitetorelease/<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 |
|
|