From e34d0762519f1e69b5f22a1b5ff8beb23e6eb8e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volkan=20Yaz=C4=B1c=C4=B1?= Date: Mon, 22 Apr 2024 10:24:49 +0200 Subject: [PATCH] Bump `logging-parent` version to `11.0.0` and migrate to Antora (apache/logging-log4j2#2443) --- .asf.yaml | 10 +- .github/dependabot.yaml | 9 +- .github/generate-email.sh | 21 ++- .github/workflows/build.yaml | 15 +-- .github/workflows/deploy-site.yaml | 95 ++++++++++++++ .github/workflows/merge-dependabot.yaml | 6 +- .gitignore | 4 + antora-playbook.yaml | 117 +++++++++++++++++ .../log4j/weaver/LocationCacheGenerator.java | 7 +- .../log4j/weaver/LocationClassVisitor.java | 3 +- package.json | 7 + pom.xml | 2 +- src/changelog/.0.x.x/.release-notes.adoc.ftl | 2 +- .../.0.x.x/87_single_plugin_cache.xml | 4 +- src/changelog/.0.x.x/add-sbom.xml | 21 +-- src/changelog/.0.x.x/add-website.xml | 5 +- src/changelog/.0.x.x/antora.xml | 8 ++ .../.0.x.x/logging-parent-update.xml | 8 +- .../.0.x.x/update_apache_logging_parent.xml | 4 +- .../.0.x.x/update_commons_io_commons_io.xml | 4 +- ...update_commons_logging_commons_logging.xml | 4 +- ...pdate_org_apache_commons_commons_lang3.xml | 4 +- ...ate_org_apache_logging_log4j_log4j_bom.xml | 4 +- ...date_org_apache_logging_logging_parent.xml | 4 +- .../update_org_apache_maven_maven_core.xml | 4 +- ...che_maven_plugins_maven_invoker_plugin.xml | 4 +- ...pache_maven_plugins_maven_shade_plugin.xml | 4 +- .../update_org_assertj_assertj_core.xml | 4 +- ...pdate_org_codehaus_plexus_plexus_utils.xml | 4 +- .../update_org_jacoco_jacoco_maven_plugin.xml | 4 +- .../.0.x.x/update_org_junit_junit_bom.xml | 4 +- .../.0.x.x/update_org_ow2_asm_asm_bom.xml | 4 +- .../.0.x.x/update_org_slf4j_slf4j_api.xml | 4 +- src/changelog/.changelog.adoc.ftl | 3 +- src/changelog/.index.adoc.ftl | 9 +- src/changelog/0.1.0/.release-notes.adoc.ftl | 2 +- src/changelog/0.1.0/.release.xml | 22 +--- ...rovide_Maven_plugin_to_inline_location.xml | 21 +-- ...2-673_Maven_Shade_resource_transformer.xml | 22 +--- src/site/_constants.adoc | 41 ------ src/site/_constants.tmpl.adoc | 41 ------ src/site/_release-notes.adoc | 40 ------ src/site/_release-notes/_0.1.0.adoc | 47 ------- src/site/_release-notes/_0.x.x.adoc | 73 ----------- src/site/antora/antora.tmpl.yml | 49 +++++++ src/site/antora/antora.yml | 49 +++++++ src/site/antora/modules/ROOT/nav.adoc | 25 ++++ .../modules/ROOT/pages/development.adoc | 44 +++++++ src/site/antora/modules/ROOT/pages/index.adoc | 46 +++++++ .../pages/log4j-transform-maven-plugin.adoc} | 34 ++--- ...nsform-maven-shade-plugin-extensions.adoc} | 8 +- .../modules/ROOT/pages/release-notes.adoc | 21 +++ src/site/index.adoc | 122 ------------------ 53 files changed, 588 insertions(+), 535 deletions(-) create mode 100644 .github/workflows/deploy-site.yaml create mode 100644 antora-playbook.yaml create mode 100644 package.json create mode 100644 src/changelog/.0.x.x/antora.xml delete mode 100644 src/site/_constants.adoc delete mode 100644 src/site/_constants.tmpl.adoc delete mode 100644 src/site/_release-notes.adoc delete mode 100644 src/site/_release-notes/_0.1.0.adoc delete mode 100644 src/site/_release-notes/_0.x.x.adoc create mode 100644 src/site/antora/antora.tmpl.yml create mode 100644 src/site/antora/antora.yml create mode 100644 src/site/antora/modules/ROOT/nav.adoc create mode 100644 src/site/antora/modules/ROOT/pages/development.adoc create mode 100644 src/site/antora/modules/ROOT/pages/index.adoc rename src/site/{_log4j-transform-maven-plugin.adoc => antora/modules/ROOT/pages/log4j-transform-maven-plugin.adoc} (91%) rename src/site/{_log4j-transform-maven-shade-plugin-extensions.adoc => antora/modules/ROOT/pages/log4j-transform-maven-shade-plugin-extensions.adoc} (96%) create mode 100644 src/site/antora/modules/ROOT/pages/release-notes.adoc delete mode 100644 src/site/index.adoc diff --git a/.asf.yaml b/.asf.yaml index c7c9e33..ecac0ad 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -17,9 +17,15 @@ # `.asf.yaml` documentation: https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features +notifications: + # GitHub already provides notifications for PRs and issues. + # Please don't duplicate that noise here! + commits: commits@logging.apache.org + pullrequests_bot_dependabot: robots@logging.apache.org + github: description: "Tools for binary post-processing of projects using Apache Log4j." - homepage: https://logging.apache.org/log4j/2.x/ + homepage: https://logging.apache.org/log4j/transform labels: - apache - java @@ -27,6 +33,8 @@ github: - log4j2 - logging + del_branch_on_merge: true + features: issues: true diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 5612179..83423fe 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -17,14 +17,14 @@ version: 2 -# Add Maven Central explicitly to work around: -# https://github.com/dependabot/dependabot-core/issues/8329 +# Fix the Maven Central to the ASF repository to work around: https://github.com/dependabot/dependabot-core/issues/8329 registries: maven-central: type: maven-repository url: https://repo.maven.apache.org/maven2 updates: + - package-ecosystem: maven directory: "/" schedule: @@ -41,3 +41,8 @@ updates: directory: "/" schedule: interval: weekly + + - package-ecosystem: npm + directory: "/" + schedule: + interval: daily diff --git a/.github/generate-email.sh b/.github/generate-email.sh index 24a08ba..646d112 100755 --- a/.github/generate-email.sh +++ b/.github/generate-email.sh @@ -45,7 +45,7 @@ PROJECT_VERSION="$2" COMMIT_ID="$3" # Check release notes file -RELEASE_NOTES_FILE="$SCRIPT_DIR/../src/site/_release-notes/_$PROJECT_VERSION.adoc" +RELEASE_NOTES_FILE="$SCRIPT_DIR/../target/generated-site/antora/modules/ROOT/pages/_release-notes/$PROJECT_VERSION.adoc" [ -f "$RELEASE_NOTES_FILE" ] || { stderr "Couldn't find release notes file: $RELEASE_NOTES_FILE" exit 1 @@ -69,11 +69,11 @@ case $1 in vote) cat <> "$GITHUB_OUTPUT" + + deploy-site-rel: + needs: export-version + uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/11.0.0 + # Secrets for committing the generated site + secrets: + GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }} + # Write permissions for committing the generated site + permissions: + contents: write + with: + asf-yaml-content: | + staging: + profile: ~ + whoami: ${{ github.ref_name }}-site-stg-out + subdir: content/log4j/transform-${{ needs.export-version.outputs.version }} + target-branch: ${{ github.ref_name }}-site-stg-out diff --git a/.github/workflows/merge-dependabot.yaml b/.github/workflows/merge-dependabot.yaml index 631255e..5f94474 100644 --- a/.github/workflows/merge-dependabot.yaml +++ b/.github/workflows/merge-dependabot.yaml @@ -30,11 +30,13 @@ jobs: build: if: github.repository == 'apache/logging-log4j-transform' && github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]' - uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/10.6.0 + uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/11.0.0 + with: + site-enabled: true merge-dependabot: needs: build - uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@rel/10.6.0 + uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@rel/11.0.0 permissions: contents: write # to push changelog commits pull-requests: write # to close the PR diff --git a/.gitignore b/.gitignore index d67ee40..c47e3f3 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,7 @@ target/ .project .classpath .settings/ +# Node +node +node_modules +package-lock.json diff --git a/antora-playbook.yaml b/antora-playbook.yaml new file mode 100644 index 0000000..cb73957 --- /dev/null +++ b/antora-playbook.yaml @@ -0,0 +1,117 @@ +# +# 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. +# + +site: + title: Apache Log4j Transform + url: "https://logging.apache.org/log4j/transform" + start_page: "ROOT::index.adoc" + +content: + sources: + - url: . + branches: HEAD + start_paths: + - target/generated-site/antora + edit_url: + +asciidoc: + extensions: + - "@asciidoctor/tabs" + +ui: + + bundle: + url: "https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable" + snapshot: true + + # Template files: https://github.com/asciidoctor/asciidoctor-docs-ui/blob/main/src + # Template variables: https://docs.antora.org/antora-ui-default/templates + supplemental_files: + + # Add `@asciidoctor/tabs` extension styles + - path: css/vendor/tabs.css + contents: ./node_modules/@asciidoctor/tabs/dist/css/tabs.css + + # Add `@asciidoctor/tabs` extension scripts + - path: js/vendor/tabs.js + contents: ./node_modules/@asciidoctor/tabs/dist/js/tabs.js + + - path: partials/footer-scripts.hbs + contents: | + + + + + {{#if env.SITE_SEARCH_PROVIDER}} + {{> search-scripts}} + {{/if}} + + - path: partials/head-styles.hbs + contents: | + + + + + + + - path: partials/header-content.hbs + contents: | +
+ +
+ + - path: partials/footer-content.hbs + contents: | +
+

+ Copyright © 1999-{{{year}}} The Apache Software Foundation. + Licensed under the Apache Software License, Version 2.0. + Please read our privacy policy. +

+

+ Apache, Log4j, and the Apache feather logo are trademarks or registered trademarks of The Apache Software Foundation. + Oracle and Java are registered trademarks of Oracle and/or its affiliates. + Other names may be trademarks of their respective owners. +

+
+ + # Disable component version selector + - path: partials/nav-explore.hbs + contents: "" + + # Fix the `Edit this page` link + - path: partials/edit-this-page.hbs + contents: | + diff --git a/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/LocationCacheGenerator.java b/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/LocationCacheGenerator.java index 8bf6d63..a103343 100644 --- a/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/LocationCacheGenerator.java +++ b/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/LocationCacheGenerator.java @@ -29,8 +29,13 @@ import static org.apache.logging.log4j.weaver.Constants.SUPPLIER_ARRAY_TYPE; import java.nio.file.Path; -import java.util.*; +import java.util.Arrays; +import java.util.EnumSet; +import java.util.List; +import java.util.Locale; +import java.util.Map; import java.util.Map.Entry; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; import java.util.stream.Collectors; diff --git a/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/LocationClassVisitor.java b/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/LocationClassVisitor.java index 1caa2de..b5370c8 100644 --- a/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/LocationClassVisitor.java +++ b/log4j-weaver/src/main/java/org/apache/logging/log4j/weaver/LocationClassVisitor.java @@ -16,7 +16,8 @@ */ package org.apache.logging.log4j.weaver; -import static org.apache.logging.log4j.weaver.Constants.*; +import static org.apache.logging.log4j.weaver.Constants.MESSAGE_SUPPLIER_TYPE; +import static org.apache.logging.log4j.weaver.Constants.MESSAGE_TYPE; import java.util.Collections; import java.util.HashMap; diff --git a/package.json b/package.json new file mode 100644 index 0000000..686f9f3 --- /dev/null +++ b/package.json @@ -0,0 +1,7 @@ +{ + "dependencies": { + "@antora/cli": "^3.2.0-alpha.4", + "@antora/site-generator-default": "^3.2.0-alpha.4", + "@asciidoctor/tabs": "^1.0.0-beta.6" + } +} diff --git a/pom.xml b/pom.xml index e28d5d9..a55f93c 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ org.apache.logging logging-parent - 10.5.0 + 11.0.0 org.apache.logging.log4j diff --git a/src/changelog/.0.x.x/.release-notes.adoc.ftl b/src/changelog/.0.x.x/.release-notes.adoc.ftl index 673ebf9..94e5000 100644 --- a/src/changelog/.0.x.x/.release-notes.adoc.ftl +++ b/src/changelog/.0.x.x/.release-notes.adoc.ftl @@ -34,7 +34,7 @@ //// [#release-notes-${release.version?replace("[^a-zA-Z0-9]", "-", "r")}] -=== ${release.version} +== ${release.version} <#if release.date?has_content>Release date:: ${release.date} diff --git a/src/changelog/.0.x.x/87_single_plugin_cache.xml b/src/changelog/.0.x.x/87_single_plugin_cache.xml index 3db7382..e9bdac2 100644 --- a/src/changelog/.0.x.x/87_single_plugin_cache.xml +++ b/src/changelog/.0.x.x/87_single_plugin_cache.xml @@ -1,7 +1,7 @@ Fixed transformation of a single `Log4j2Plugins.dat` plugin. diff --git a/src/changelog/.0.x.x/add-sbom.xml b/src/changelog/.0.x.x/add-sbom.xml index 3a9235e..4cdc3bb 100644 --- a/src/changelog/.0.x.x/add-sbom.xml +++ b/src/changelog/.0.x.x/add-sbom.xml @@ -1,24 +1,7 @@ - - Started generating CycloneDX SBOM with the recent update of `logging-parent` to version `10.2.0` diff --git a/src/changelog/.0.x.x/add-website.xml b/src/changelog/.0.x.x/add-website.xml index 591b561..30b4a32 100644 --- a/src/changelog/.0.x.x/add-website.xml +++ b/src/changelog/.0.x.x/add-website.xml @@ -1,8 +1,7 @@ - Started publishing https://logging.apache.org/log4j/transform[the project website] diff --git a/src/changelog/.0.x.x/antora.xml b/src/changelog/.0.x.x/antora.xml new file mode 100644 index 0000000..7aacd0a --- /dev/null +++ b/src/changelog/.0.x.x/antora.xml @@ -0,0 +1,8 @@ + + + + Website is migrated to Antora + diff --git a/src/changelog/.0.x.x/logging-parent-update.xml b/src/changelog/.0.x.x/logging-parent-update.xml index 82437f5..cc155a2 100644 --- a/src/changelog/.0.x.x/logging-parent-update.xml +++ b/src/changelog/.0.x.x/logging-parent-update.xml @@ -1,9 +1,7 @@ - - - Migrated `logging-parent` to version `10.2.0` and adopted its CI and `pom.xml` infrastructure + Adopted the CI and `pom.xml` infrastructure from `logging-parent` diff --git a/src/changelog/.0.x.x/update_apache_logging_parent.xml b/src/changelog/.0.x.x/update_apache_logging_parent.xml index 2a6e5d3..83e4daf 100644 --- a/src/changelog/.0.x.x/update_apache_logging_parent.xml +++ b/src/changelog/.0.x.x/update_apache_logging_parent.xml @@ -1,7 +1,7 @@ Update `apache/logging-parent` to version `` diff --git a/src/changelog/.0.x.x/update_commons_io_commons_io.xml b/src/changelog/.0.x.x/update_commons_io_commons_io.xml index 9415983..5b0e6ea 100644 --- a/src/changelog/.0.x.x/update_commons_io_commons_io.xml +++ b/src/changelog/.0.x.x/update_commons_io_commons_io.xml @@ -1,7 +1,7 @@ Update `commons-io:commons-io` to version `2.16.1` diff --git a/src/changelog/.0.x.x/update_commons_logging_commons_logging.xml b/src/changelog/.0.x.x/update_commons_logging_commons_logging.xml index 46e24ca..b37d766 100644 --- a/src/changelog/.0.x.x/update_commons_logging_commons_logging.xml +++ b/src/changelog/.0.x.x/update_commons_logging_commons_logging.xml @@ -1,7 +1,7 @@ Update `commons-logging:commons-logging` to version `1.3.1` diff --git a/src/changelog/.0.x.x/update_org_apache_commons_commons_lang3.xml b/src/changelog/.0.x.x/update_org_apache_commons_commons_lang3.xml index 2c4e151..abacce3 100644 --- a/src/changelog/.0.x.x/update_org_apache_commons_commons_lang3.xml +++ b/src/changelog/.0.x.x/update_org_apache_commons_commons_lang3.xml @@ -1,7 +1,7 @@ Update `org.apache.commons:commons-lang3` to version `3.14.0` diff --git a/src/changelog/.0.x.x/update_org_apache_logging_log4j_log4j_bom.xml b/src/changelog/.0.x.x/update_org_apache_logging_log4j_log4j_bom.xml index c0e29f1..64d5ae5 100644 --- a/src/changelog/.0.x.x/update_org_apache_logging_log4j_log4j_bom.xml +++ b/src/changelog/.0.x.x/update_org_apache_logging_log4j_log4j_bom.xml @@ -1,7 +1,7 @@ Update `org.apache.logging.log4j:log4j-bom` to version `2.23.1` diff --git a/src/changelog/.0.x.x/update_org_apache_logging_logging_parent.xml b/src/changelog/.0.x.x/update_org_apache_logging_logging_parent.xml index 42165be..ebcde9c 100644 --- a/src/changelog/.0.x.x/update_org_apache_logging_logging_parent.xml +++ b/src/changelog/.0.x.x/update_org_apache_logging_logging_parent.xml @@ -1,7 +1,7 @@ Update `org.apache.logging:logging-parent` to version `10.5.0` diff --git a/src/changelog/.0.x.x/update_org_apache_maven_maven_core.xml b/src/changelog/.0.x.x/update_org_apache_maven_maven_core.xml index aeebc9d..2c55234 100644 --- a/src/changelog/.0.x.x/update_org_apache_maven_maven_core.xml +++ b/src/changelog/.0.x.x/update_org_apache_maven_maven_core.xml @@ -1,7 +1,7 @@ Update `org.apache.maven:maven-core` to version `3.9.6` diff --git a/src/changelog/.0.x.x/update_org_apache_maven_plugins_maven_invoker_plugin.xml b/src/changelog/.0.x.x/update_org_apache_maven_plugins_maven_invoker_plugin.xml index b4ec436..1d71a4b 100644 --- a/src/changelog/.0.x.x/update_org_apache_maven_plugins_maven_invoker_plugin.xml +++ b/src/changelog/.0.x.x/update_org_apache_maven_plugins_maven_invoker_plugin.xml @@ -1,7 +1,7 @@ Update `org.apache.maven.plugins:maven-invoker-plugin` to version `3.6.1` diff --git a/src/changelog/.0.x.x/update_org_apache_maven_plugins_maven_shade_plugin.xml b/src/changelog/.0.x.x/update_org_apache_maven_plugins_maven_shade_plugin.xml index cd1d5be..5ea6488 100644 --- a/src/changelog/.0.x.x/update_org_apache_maven_plugins_maven_shade_plugin.xml +++ b/src/changelog/.0.x.x/update_org_apache_maven_plugins_maven_shade_plugin.xml @@ -1,7 +1,7 @@ Update `org.apache.maven.plugins:maven-shade-plugin` to version `3.5.2` diff --git a/src/changelog/.0.x.x/update_org_assertj_assertj_core.xml b/src/changelog/.0.x.x/update_org_assertj_assertj_core.xml index 0cfd944..d07de5e 100644 --- a/src/changelog/.0.x.x/update_org_assertj_assertj_core.xml +++ b/src/changelog/.0.x.x/update_org_assertj_assertj_core.xml @@ -1,7 +1,7 @@ Update `org.assertj:assertj-core` to version `3.25.3` diff --git a/src/changelog/.0.x.x/update_org_codehaus_plexus_plexus_utils.xml b/src/changelog/.0.x.x/update_org_codehaus_plexus_plexus_utils.xml index af04c94..a1a0761 100644 --- a/src/changelog/.0.x.x/update_org_codehaus_plexus_plexus_utils.xml +++ b/src/changelog/.0.x.x/update_org_codehaus_plexus_plexus_utils.xml @@ -1,7 +1,7 @@ Update `org.codehaus.plexus:plexus-utils` to version `4.0.1` diff --git a/src/changelog/.0.x.x/update_org_jacoco_jacoco_maven_plugin.xml b/src/changelog/.0.x.x/update_org_jacoco_jacoco_maven_plugin.xml index a36d76c..4dbe19e 100644 --- a/src/changelog/.0.x.x/update_org_jacoco_jacoco_maven_plugin.xml +++ b/src/changelog/.0.x.x/update_org_jacoco_jacoco_maven_plugin.xml @@ -1,7 +1,7 @@ Update `org.jacoco:jacoco-maven-plugin` to version `0.8.12` diff --git a/src/changelog/.0.x.x/update_org_junit_junit_bom.xml b/src/changelog/.0.x.x/update_org_junit_junit_bom.xml index 4e94c46..207a23f 100644 --- a/src/changelog/.0.x.x/update_org_junit_junit_bom.xml +++ b/src/changelog/.0.x.x/update_org_junit_junit_bom.xml @@ -1,7 +1,7 @@ Update `org.junit:junit-bom` to version `5.10.2` diff --git a/src/changelog/.0.x.x/update_org_ow2_asm_asm_bom.xml b/src/changelog/.0.x.x/update_org_ow2_asm_asm_bom.xml index 2e0b17f..c669554 100644 --- a/src/changelog/.0.x.x/update_org_ow2_asm_asm_bom.xml +++ b/src/changelog/.0.x.x/update_org_ow2_asm_asm_bom.xml @@ -1,7 +1,7 @@ Update `org.ow2.asm:asm-bom` to version `9.7` diff --git a/src/changelog/.0.x.x/update_org_slf4j_slf4j_api.xml b/src/changelog/.0.x.x/update_org_slf4j_slf4j_api.xml index 76b29c4..e58113b 100644 --- a/src/changelog/.0.x.x/update_org_slf4j_slf4j_api.xml +++ b/src/changelog/.0.x.x/update_org_slf4j_slf4j_api.xml @@ -1,7 +1,7 @@ Update `org.slf4j:slf4j-api` to version `2.0.13` diff --git a/src/changelog/.changelog.adoc.ftl b/src/changelog/.changelog.adoc.ftl index ebd41f0..00a9a1a 100644 --- a/src/changelog/.changelog.adoc.ftl +++ b/src/changelog/.changelog.adoc.ftl @@ -17,7 +17,8 @@ <#if entriesByType?size gt 0> <#list entriesByType as entryType, entries> -==== ${entryType?capitalize} +[#release-notes-${release.version?replace("[^a-zA-Z0-9]", "-", "r")}-${entryType?lower_case}] +=== ${entryType?capitalize} <#list entries as entry> * ${entry.description.text?replace("\\s+", " ", "r")}<#if entry.issues?has_content> (<#list entry.issues as issue>${issue.link}[${issue.id}]<#if issue?has_next>, ) diff --git a/src/changelog/.index.adoc.ftl b/src/changelog/.index.adoc.ftl index 8c4ff21..24c1ef3 100644 --- a/src/changelog/.index.adoc.ftl +++ b/src/changelog/.index.adoc.ftl @@ -33,9 +33,12 @@ 3. Commit both `.index.adoc.ftl` and the generated `.index.adoc` //// -[#release-notes] -== Release Notes +// Release notes index does not look nice with a deep sectioning, override it: +:page-toclevels: 1 +[#release-notes] += Release notes <#list releases as release><#if release.changelogEntryCount gt 0> -include::_release-notes/_${release.version}.adoc[] + +include::_release-notes/${release.version}.adoc[] diff --git a/src/changelog/0.1.0/.release-notes.adoc.ftl b/src/changelog/0.1.0/.release-notes.adoc.ftl index a3c917c..b2e6229 100644 --- a/src/changelog/0.1.0/.release-notes.adoc.ftl +++ b/src/changelog/0.1.0/.release-notes.adoc.ftl @@ -34,7 +34,7 @@ //// [#release-notes-${release.version?replace("[^a-zA-Z0-9]", "-", "r")}] -=== ${release.version} +== ${release.version} <#if release.date?has_content>Release date:: ${release.date} diff --git a/src/changelog/0.1.0/.release.xml b/src/changelog/0.1.0/.release.xml index d082eec..b4f6910 100644 --- a/src/changelog/0.1.0/.release.xml +++ b/src/changelog/0.1.0/.release.xml @@ -1,21 +1,5 @@ - - diff --git a/src/changelog/0.1.0/LOG4J2-3638_Provide_Maven_plugin_to_inline_location.xml b/src/changelog/0.1.0/LOG4J2-3638_Provide_Maven_plugin_to_inline_location.xml index 6c67752..e92d123 100644 --- a/src/changelog/0.1.0/LOG4J2-3638_Provide_Maven_plugin_to_inline_location.xml +++ b/src/changelog/0.1.0/LOG4J2-3638_Provide_Maven_plugin_to_inline_location.xml @@ -1,25 +1,8 @@ - - Added `log4j-transform-maven-plugin` bytecode transformation tool to provide location information without reflection diff --git a/src/changelog/0.1.0/LOG4J2-673_Maven_Shade_resource_transformer.xml b/src/changelog/0.1.0/LOG4J2-673_Maven_Shade_resource_transformer.xml index 277e99a..a317d1f 100644 --- a/src/changelog/0.1.0/LOG4J2-673_Maven_Shade_resource_transformer.xml +++ b/src/changelog/0.1.0/LOG4J2-673_Maven_Shade_resource_transformer.xml @@ -1,26 +1,8 @@ - - - Added `log4j-transform-maven-shade-plugin-extensions` resource transformer for the Maven Shade Plugin to merge `Log4j2Plugins.dat` plugin caches diff --git a/src/site/_constants.adoc b/src/site/_constants.adoc deleted file mode 100644 index b52ac71..0000000 --- a/src/site/_constants.adoc +++ /dev/null @@ -1,41 +0,0 @@ -//// - 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. -//// - -//// - ██ ██ █████ ██████ ███ ██ ██ ███ ██ ██████ ██ - ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██ ██ - ██ █ ██ ███████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ - ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ - ███ ███ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██████ ██ - - IF THIS FILE DOESN'T HAVE A `.tmpl.adoc` SUFFIX, IT IS AUTO-GENERATED, DO NOT EDIT IT! - - `_constants.adoc` is auto-generated from `_constants.tmpl.adoc`. - Auto-generation happens during `process-sources` phase of Maven. - Hence, you must always - - 1. Edit `_constants.tmpl.adoc` - 2. Run `./mvnw process-sources` - 3. Commit both `_constants.tmpl.adoc` and the generated `_constants.adoc` -//// - -:project-github-url: https://github.com/apache/logging-log4j-transform -:project-version: 0.2.0-SNAPSHOT -:project-name: Log4j Transform -:project-id: log4j-transform -:java-target-version: 8 -:java-compiler-version: [17,18) diff --git a/src/site/_constants.tmpl.adoc b/src/site/_constants.tmpl.adoc deleted file mode 100644 index 5c4b881..0000000 --- a/src/site/_constants.tmpl.adoc +++ /dev/null @@ -1,41 +0,0 @@ -//// - 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. -//// - -//// - ██ ██ █████ ██████ ███ ██ ██ ███ ██ ██████ ██ - ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██ ██ - ██ █ ██ ███████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ - ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ - ███ ███ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██████ ██ - - IF THIS FILE DOESN'T HAVE A `.tmpl.adoc` SUFFIX, IT IS AUTO-GENERATED, DO NOT EDIT IT! - - `_constants.adoc` is auto-generated from `_constants.tmpl.adoc`. - Auto-generation happens during `process-sources` phase of Maven. - Hence, you must always - - 1. Edit `_constants.tmpl.adoc` - 2. Run `./mvnw process-sources` - 3. Commit both `_constants.tmpl.adoc` and the generated `_constants.adoc` -//// - -:project-github-url: ${scm.url} -:project-version: ${project.version} -:project-name: Log4j Transform -:project-id: log4j-transform -:java-target-version: ${maven.compiler.target} -:java-compiler-version: ${minimalJavaBuildVersion} diff --git a/src/site/_release-notes.adoc b/src/site/_release-notes.adoc deleted file mode 100644 index c6036e5..0000000 --- a/src/site/_release-notes.adoc +++ /dev/null @@ -1,40 +0,0 @@ -//// - 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. -//// - -//// - ██ ██ █████ ██████ ███ ██ ██ ███ ██ ██████ ██ - ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██ ██ - ██ █ ██ ███████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ - ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ - ███ ███ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██████ ██ - - IF THIS FILE IS CALLED `index.adoc`, IT IS AUTO-GENERATED, DO NOT EDIT IT! - - Release notes `index.adoc` is generated from `src/changelog/.index.adoc.ftl`. - Auto-generation happens during `generate-sources` phase of Maven. - Hence, you must always - - 1. Edit `.index.adoc.ftl` - 2. Run `./mvnw generate-sources` - 3. Commit both `.index.adoc.ftl` and the generated `.index.adoc` -//// - -[#release-notes] -== Release Notes - -include::_release-notes/_0.x.x.adoc[] -include::_release-notes/_0.1.0.adoc[] diff --git a/src/site/_release-notes/_0.1.0.adoc b/src/site/_release-notes/_0.1.0.adoc deleted file mode 100644 index 59d55ac..0000000 --- a/src/site/_release-notes/_0.1.0.adoc +++ /dev/null @@ -1,47 +0,0 @@ -//// - 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. -//// - -//// - ██ ██ █████ ██████ ███ ██ ██ ███ ██ ██████ ██ - ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██ ██ - ██ █ ██ ███████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ - ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ - ███ ███ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██████ ██ - - IF THIS FILE DOESN'T HAVE A `.ftl` SUFFIX, IT IS AUTO-GENERATED, DO NOT EDIT IT! - - Version-specific release notes (`7.8.0.adoc`, etc.) are generated from `src/changelog/*/.release-notes.adoc.ftl`. - Auto-generation happens during `generate-sources` phase of Maven. - Hence, you must always - - 1. Find and edit the associated `.release-notes.adoc.ftl` - 2. Run `./mvnw generate-sources` - 3. Commit both `.release-notes.adoc.ftl` and the generated `7.8.0.adoc` -//// - -[#release-notes-0-1-0] -=== 0.1.0 - -Release date:: 2023-05-05 - -This is the first release of the project. - - -==== Added - -* Added `log4j-transform-maven-plugin` bytecode transformation tool to provide location information without reflection (https://issues.apache.org/jira/browse/LOG4J2-3638[LOG4J2-3638]) -* Added `log4j-transform-maven-shade-plugin-extensions` resource transformer for the Maven Shade Plugin to merge `Log4j2Plugins.dat` plugin caches (https://issues.apache.org/jira/browse/LOG4J2-673[LOG4J2-673]) diff --git a/src/site/_release-notes/_0.x.x.adoc b/src/site/_release-notes/_0.x.x.adoc deleted file mode 100644 index 04afca1..0000000 --- a/src/site/_release-notes/_0.x.x.adoc +++ /dev/null @@ -1,73 +0,0 @@ -//// - 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. -//// - -//// - ██ ██ █████ ██████ ███ ██ ██ ███ ██ ██████ ██ - ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██ ██ - ██ █ ██ ███████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ - ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ - ███ ███ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██████ ██ - - IF THIS FILE DOESN'T HAVE A `.ftl` SUFFIX, IT IS AUTO-GENERATED, DO NOT EDIT IT! - - Version-specific release notes (`7.8.0.adoc`, etc.) are generated from `src/changelog/*/.release-notes.adoc.ftl`. - Auto-generation happens during `generate-sources` phase of Maven. - Hence, you must always - - 1. Find and edit the associated `.release-notes.adoc.ftl` - 2. Run `./mvnw generate-sources` - 3. Commit both `.release-notes.adoc.ftl` and the generated `7.8.0.adoc` -//// - -[#release-notes-0-x-x] -=== 0.x.x - - - -This is the second release of the project. - - -==== Added - -* Started generating CycloneDX SBOM with the recent update of `logging-parent` to version `10.2.0` -* Started publishing https://logging.apache.org/log4j/transform[the project website] - -==== Changed - -* Migrated `logging-parent` to version `10.2.0` and adopted its CI and `pom.xml` infrastructure -* Update `org.apache.commons:commons-lang3` to version `3.14.0` (https://github.com/apache/logging-log4j-transform/pull/69[69]) -* Update `org.apache.maven:maven-core` to version `3.9.6` (https://github.com/apache/logging-log4j-transform/pull/65[65]) - -==== Fixed - -* Fixed transformation of a single `Log4j2Plugins.dat` plugin. (https://github.com/apache/logging-log4j-transform/pull/87[87]) - -==== Updated - -* Update `apache/logging-parent` to version `` (https://github.com/apache/logging-log4j-transform/pull/80[80]) -* Update `commons-io:commons-io` to version `2.16.1` (https://github.com/apache/logging-log4j-transform/pull/96[96]) -* Update `commons-logging:commons-logging` to version `1.3.1` (https://github.com/apache/logging-log4j-transform/pull/90[90]) -* Update `org.apache.logging.log4j:log4j-bom` to version `2.23.1` (https://github.com/apache/logging-log4j-transform/pull/88[88]) -* Update `org.apache.logging:logging-parent` to version `10.5.0` (https://github.com/apache/logging-log4j-transform/pull/72[72]) -* Update `org.apache.maven.plugins:maven-invoker-plugin` to version `3.6.1` (https://github.com/apache/logging-log4j-transform/pull/94[94]) -* Update `org.apache.maven.plugins:maven-shade-plugin` to version `3.5.2` (https://github.com/apache/logging-log4j-transform/pull/85[85]) -* Update `org.assertj:assertj-core` to version `3.25.3` (https://github.com/apache/logging-log4j-transform/pull/83[83]) -* Update `org.codehaus.plexus:plexus-utils` to version `4.0.1` (https://github.com/apache/logging-log4j-transform/pull/98[98]) -* Update `org.jacoco:jacoco-maven-plugin` to version `0.8.12` (https://github.com/apache/logging-log4j-transform/pull/95[95]) -* Update `org.junit:junit-bom` to version `5.10.2` (https://github.com/apache/logging-log4j-transform/pull/82[82]) -* Update `org.ow2.asm:asm-bom` to version `9.7` (https://github.com/apache/logging-log4j-transform/pull/89[89]) -* Update `org.slf4j:slf4j-api` to version `2.0.13` (https://github.com/apache/logging-log4j-transform/pull/97[97]) diff --git a/src/site/antora/antora.tmpl.yml b/src/site/antora/antora.tmpl.yml new file mode 100644 index 0000000..b336c2d --- /dev/null +++ b/src/site/antora/antora.tmpl.yml @@ -0,0 +1,49 @@ +# +# 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. +# + +# +# ██ ██ █████ ██████ ███ ██ ██ ███ ██ ██████ ██ +# ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██ ██ +# ██ █ ██ ███████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ +# ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ +# ███ ███ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██████ ██ +# +# THIS FILE IS USED AS A TEMPLATE TO AUTO-GENERATE `antora.yml`! +# +# The actual `antora.yml` that is used in `target/generated-site/antora` is auto-generated from `.antora.yml`. +# Auto-generation happens during `pre-site` phase of Maven. +# Hence, you must always +# +# 1. Edit `.antora.yml` +# 2. Edit `antora.yml` to match the fields in `.antora.yml` and fill Maven property placeholders with dummy values +# + +name: ROOT +title: Home +version: ~ +start_page: index.adoc +asciidoc: + attributes: + project-github-url: "${scm.url}" + project-version: "${project.version}" + project-name: "Log4j Transform" + project-id: "log4j-transform" + java-target-version: "${maven.compiler.target}" + java-compiler-version: "${minimalJavaBuildVersion}" + logging-services-url: "https://logging.apache.org" +nav: + - modules/ROOT/nav.adoc diff --git a/src/site/antora/antora.yml b/src/site/antora/antora.yml new file mode 100644 index 0000000..10aa92b --- /dev/null +++ b/src/site/antora/antora.yml @@ -0,0 +1,49 @@ +# +# 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. +# + +# +# ██ ██ █████ ██████ ███ ██ ██ ███ ██ ██████ ██ +# ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██ ██ +# ██ █ ██ ███████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ +# ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ +# ███ ███ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██████ ██ +# +# THIS FILE IS USED AS A TEMPLATE TO AUTO-GENERATE `antora.yml`! +# +# The actual `antora.yml` that is used in `target/generated-site/antora` is auto-generated from `.antora.yml`. +# Auto-generation happens during `pre-site` phase of Maven. +# Hence, you must always +# +# 1. Edit `.antora.yml` +# 2. Edit `antora.yml` to match the fields in `.antora.yml` and fill Maven property placeholders with dummy values +# + +name: ROOT +title: Home +version: ~ +start_page: index.adoc +asciidoc: + attributes: + project-github-url: "https://github.com/apache/logging-log4j-transform" + project-version: "1.2.3" + project-name: "Log4j Transform" + project-id: "log4j-transform" + java-target-version: "8" + java-compiler-version: "[17,18)" + logging-services-url: "https://logging.apache.org" +nav: + - modules/ROOT/nav.adoc diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc new file mode 100644 index 0000000..12edb29 --- /dev/null +++ b/src/site/antora/modules/ROOT/nav.adoc @@ -0,0 +1,25 @@ +//// + 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. +//// + +* Components +** xref:log4j-transform-maven-plugin.adoc[] +** xref:log4j-transform-maven-shade-plugin-extensions.adoc[] +* xref:development.adoc[] +* xref:release-notes.adoc[] +* {logging-services-url}/download.html[Download] +* {logging-services-url}/support.html[Support] +* {logging-services-url}/security.html[Security] diff --git a/src/site/antora/modules/ROOT/pages/development.adoc b/src/site/antora/modules/ROOT/pages/development.adoc new file mode 100644 index 0000000..2bb1144 --- /dev/null +++ b/src/site/antora/modules/ROOT/pages/development.adoc @@ -0,0 +1,44 @@ +//// + 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. +//// + += Development + +{project-name} uses {project-github-url}[GitHub] for source code management. + +The project requires a Java compiler matching the `{java-compiler-version}` range and targets Java `{java-target-version}`. + +You can build and verify sources using: + +[source,bash] +---- +./mvnw verify +---- + +You can build and view the website as follows: + +[source,bash] +---- +./mvnw -N site +---- + +You can view the generated website with a browser by pointing it to `target/site` directory. + +[#release-instructions] +== Release instructions + +{project-name} employs the CI/CD foundation provided by the {logging-services-url}/logging-parent[`logging-parent`]. +You can simply use its release instructions. diff --git a/src/site/antora/modules/ROOT/pages/index.adoc b/src/site/antora/modules/ROOT/pages/index.adoc new file mode 100644 index 0000000..40eed0b --- /dev/null +++ b/src/site/antora/modules/ROOT/pages/index.adoc @@ -0,0 +1,46 @@ +//// +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. +//// + += Log4j Transform + +{project-name} contains tools for binary postprocessing of projects that use https://logging.apache.org/log4j/2.x/[the Apache Log4j2 API]. + +[#maven-bom] +== Maven Bill of Materials (BOM) + +To keep your {project-name} module versions aligned, a https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#bill-of-materials-bom-poms[Maven Bill of Materials (BOM) POM] is provided for your convenience. + +To use this with Maven, add the dependency listed below to your `pom.xml` file. +Note that the `` nesting and the `import` instruction. +This will _import_ all modules bundled with the associated Log4j release to your `dependencyManagement`. +As a result, you don't have to specify versions of the imported modules (`log4j-weaver`, etc.) while using them as a ``. + +.`pom.xml` snippet importing `log4j-transform-bom` +[source,subs="+attributes"] +---- + + + + org.apache.logging.log4j + log4j-transform-bom + {project-version} + import + pom + + + +---- diff --git a/src/site/_log4j-transform-maven-plugin.adoc b/src/site/antora/modules/ROOT/pages/log4j-transform-maven-plugin.adoc similarity index 91% rename from src/site/_log4j-transform-maven-plugin.adoc rename to src/site/antora/modules/ROOT/pages/log4j-transform-maven-plugin.adoc index d2da48b..ad49a72 100644 --- a/src/site/_log4j-transform-maven-plugin.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-transform-maven-plugin.adoc @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. //// -[#log4j-transform-maven-plugin] -== Log4j Transform Maven Plugin + += Log4j Transform Maven Plugin The Transform Plugin is used to postprocess the compiled classes of your project and replace all Log4j 2.x API calls with https://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/LogBuilder.html[`LogBuilder`] calls with a statically precomputed location. This allows you to use location information in your logs without incurring in the *expensive* runtime calls usually used to acquire it. -[#log4j-transform-maven-plugin-why] -=== Why do we need it +[#why] +== Why do we need it Finding the location of a logging call is a very expensive operation (a couple of microseconds). @@ -143,8 +143,8 @@ By comparison, *disabling* location information on the same machine gives: |=== -[#log4j-transform-maven-plugin-how] -=== How it works +[#how] +== How it works The working principle is very simple: every call to the Log4j 2.x API like [source,java] @@ -170,16 +170,16 @@ public void helloLog() { In the current implementation locations are stored in classes whose name ends in `+++$$Log4j2$$Cache+++`, so they can not accidentally be used by XML/JSON serializers. -[#log4j-transform-maven-plugin-goals] -=== Goals +[#goals] +== Goals This plugin consists of a single goal: -xref:#log4j-transform-maven-plugin-process-classes[`log4j-transform:process-classes`]:: +xref:#process-classes[`log4j-transform:process-classes`]:: is bound to the process-classes phase and weaves your classes to include precomputed location information. -[#log4j-transform-maven-plugin-process-classes] -==== `log4j-transform:process-classes` +[#process-classes] +=== `log4j-transform:process-classes` Full name:: @@ -197,8 +197,8 @@ Attributes:: * The goal is thread-safe and supports parallel builds * Binds by default to the http://maven.apache.org/ref/current/maven-core/lifecycles.html[lifecycle phase]: `process-classes`. -[#log4j-transform-maven-plugin-process-classes-required-parameters] -===== Required Parameters +[#process-classes-required-parameters] +==== Required Parameters [cols="3,3,10"] |=== @@ -215,8 +215,8 @@ It defaults to `${project.build.outputDirectory}`. It defaults to `${project.build.outputDirectory}`. |=== -[#log4j-transform-maven-plugin-process-classes-optional-parameters] -===== Optional Parameters +[#process-classes-optional-parameters] +==== Optional Parameters [cols="3,3,10"] |=== @@ -236,8 +236,8 @@ It defaults to `${project.build.outputDirectory}`. It defaults to `0` and can be configured using the `lastModGranularityMs` property. |=== -[#log4j-transform-maven-plugin-usage] -=== Usage +[#usage] +== Usage To use the plugin you need to declare a dependency on https://central.sonatype.com/artifact/org.apache.logging.log4j/log4j-api/2.20.0[`log4j-api`] version 2.20.0 or newer. diff --git a/src/site/_log4j-transform-maven-shade-plugin-extensions.adoc b/src/site/antora/modules/ROOT/pages/log4j-transform-maven-shade-plugin-extensions.adoc similarity index 96% rename from src/site/_log4j-transform-maven-shade-plugin-extensions.adoc rename to src/site/antora/modules/ROOT/pages/log4j-transform-maven-shade-plugin-extensions.adoc index 8df852c..71ce292 100644 --- a/src/site/_log4j-transform-maven-shade-plugin-extensions.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-transform-maven-shade-plugin-extensions.adoc @@ -14,13 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. //// -[#maven-shade-plugin-extensions] -== Maven Shade Plugin Extensions + += Maven Shade Plugin Extensions This project contains a collection of https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html[resource transformer]s for the Apache Maven Shade Plugin that allows you to use additional Log4j 2.x Core component modules. [#log4j-plugin-cache-transformer] -=== Log4j Plugin Cache Transformer +== Log4j Plugin Cache Transformer A https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html[resource transformer] @@ -33,7 +33,7 @@ https://github.com/edwgiz/maven-shaded-log4j-transformer[edwgiz/maven-shaded-log and was donated to the Apache Software Foundation by its author. [#log4j-plugin-cache-transformer-usage] -==== Usage +=== Usage This resource transformer is usually used together with the `ManifestResourceTransformer` and `ServicesResourceTransformer` to integrate Log4j 2.x libraries in a shaded JAR. diff --git a/src/site/antora/modules/ROOT/pages/release-notes.adoc b/src/site/antora/modules/ROOT/pages/release-notes.adoc new file mode 100644 index 0000000..a2bfd86 --- /dev/null +++ b/src/site/antora/modules/ROOT/pages/release-notes.adoc @@ -0,0 +1,21 @@ +//// + 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. +//// + += Release notes + +This file is a stub. +Its content will be auto-generated during build. diff --git a/src/site/index.adoc b/src/site/index.adoc deleted file mode 100644 index 4ae4b4d..0000000 --- a/src/site/index.adoc +++ /dev/null @@ -1,122 +0,0 @@ -//// -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. -//// - -include::_constants.adoc[] - -= Log4j Transform - -{project-name} contains tools for binary postprocessing of projects that use https://logging.apache.org/log4j/2.x/[the Apache Log4j2 API]. - -include::_log4j-transform-maven-plugin.adoc[] - -include::_log4j-transform-maven-shade-plugin-extensions.adoc[] - -[#development] -== Development - -{project-name} uses {project-github-url}[GitHub] for source code management. - -The project requires a Java compiler matching the `{java-compiler-version}` range and targets Java `{java-target-version}`. - -You can build and verify sources using: - -[source,bash] ----- -./mvnw verify ----- - -You can build and view the website as follows: - -[source,bash] ----- -./mvnw -N site -python -m http.server -d target/site ----- - -[#distribution] -== Distribution - -In accordance with the Apache Software Foundation's release https://infra.apache.org/release-distribution.html[distribution policy] and https://infra.apache.org/release-publishing.html[creation process], project artifacts are _officially_ accessible from the following locations: - -* ASF https://repository.apache.org/content/repositories/releases[Release] and https://repository.apache.org/content/repositories/snapshots[snapshot] repositories (mirrored to https://central.sonatype.dev/[the Maven Central Repository]) -* ASF https://downloads.apache.org/logging/{project-id}[Distribution directory] - -See xref:#release-instructions[the release instructions] for details. - -[#maven-bom] -=== Maven Bill of Materials (BOM) - -To keep your {project-name} module versions aligned, a https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#bill-of-materials-bom-poms[Maven Bill of Materials (BOM) POM] is provided for your convenience. - -To use this with Maven, add the dependency listed below to your `pom.xml` file. -Note that the `` nesting and the `import` instruction. -This will _import_ all modules bundled with the associated Log4j release to your `dependencyManagement`. -As a result, you don't have to specify versions of the imported modules (`log4j-weaver`, etc.) while using them as a ``. - -.`pom.xml` snippet importing `log4j-transform-bom` -[source,subs="+attributes"] ----- - - - - org.apache.logging.log4j - log4j-transform-bom - {project-version} - import - pom - - - ----- - -[#cyclonedx-sbom] -=== CycloneDX Software Bill of Materials (SBOM) - -Starting with version `0.2.0`, {project-name} distributes https://cyclonedx.org/capabilities/sbom/[CyclenoDX Software Bill of Materials (SBOM)] along with each deployed artifact. -This is streamlined by `logging-parent`, see https://logging.apache.org/logging-parent/latest/#cyclonedx-sbom[its website] for details. - -[#support] -== Support - -Please keep in mind that this project is intended for internal usage only. -You can use GitHub Issues for feature requests and bug reports – not questions! -See https://logging.apache.org/log4j/2.x/support.html[the Log4j support policy] for details. - -[#security] -== Security - -If you have encountered an unlisted security vulnerability or other unexpected behaviour that has security impact, please report them privately to mailto:security@logging.apache.org[the Log4j security mailing list]. -See https://logging.apache.org/log4j/2.x/security.html[the Log4j Security page] for further details. - -include::_release-notes.adoc[] - -[#release-instructions] -== Release instructions - -{project-name} employs the CI/CD foundation provided by the https://logging.apache.org/logging-parent[`logging-parent`]. -You can simply use its release instructions. - -[#license] -== License - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. -See `NOTICE.txt` 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.