This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 3c14aad00e2a268ab259809e13f41290bc3389f5 Author: Volkan Yazıcı <vol...@yazi.ci> AuthorDate: Fri Apr 12 14:46:17 2024 +0200 Bump `logging-parent` to `11.0.0-SNAPSHOT` --- .github/workflows/build.yaml | 15 ++-- .github/workflows/deploy-site.yaml | 96 +++++++++++++++++++++ pom.xml | 169 ++----------------------------------- src/site/antora/antora.tmpl.yml | 1 - 4 files changed, 108 insertions(+), 173 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1a95a6dcb0..9a8216d9b5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -38,7 +38,7 @@ jobs: build: if: 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@main with: java-version: | 8 @@ -48,11 +48,11 @@ jobs: deploy-snapshot: needs: build if: github.repository == 'apache/logging-log4j2' && github.ref_name == '2.x' - uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@rel/10.6.0 + uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@main # Secrets for deployments secrets: - NEXUS_USER: ${{ secrets.NEXUS_USER }} - NEXUS_PW: ${{ secrets.NEXUS_PW }} + NEXUS_USERNAME: ${{ secrets.NEXUS_USER }} + NEXUS_PASSWORD: ${{ secrets.NEXUS_PW }} with: java-version: | 8 @@ -61,12 +61,12 @@ jobs: deploy-release: needs: build if: github.repository == 'apache/logging-log4j2' && startsWith(github.ref_name, 'release/') - uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@rel/10.6.0 + uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@main # Secrets for deployments secrets: GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }} - LOGGING_STAGE_DEPLOYER_USER: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }} - LOGGING_STAGE_DEPLOYER_PW: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }} + NEXUS_USERNAME: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }} + NEXUS_PASSWORD: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }} SVN_USERNAME: ${{ secrets.LOGGING_SVN_DEV_USERNAME }} SVN_PASSWORD: ${{ secrets.LOGGING_SVN_DEV_PASSWORD }} # Write permissions to allow the Maven `revision` property update, changelog release, etc. @@ -77,4 +77,3 @@ jobs: 8 17 project-id: log4j - site-enabled: true diff --git a/.github/workflows/deploy-site.yaml b/.github/workflows/deploy-site.yaml new file mode 100644 index 0000000000..9e3c086bea --- /dev/null +++ b/.github/workflows/deploy-site.yaml @@ -0,0 +1,96 @@ +# +# 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. +# + +name: deploy-site + +on: + push: + branches: + - "2.x" + - "2.x-site-pro" + - "release/*" + paths-ignore: + - "**.md" + - "**.txt" + +permissions: read-all + +jobs: + + deploy-site-stg: + if: github.repository == 'apache/logging-log4j2' && github.ref_name == '2.x' + uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@main + # 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/2.x + target-branch: ${{ github.ref_name }}-site-stg-out + + deploy-site-pro: + if: github.repository == 'apache/logging-log4j2' && github.ref_name == '2.x-site-pro' + uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@main + # 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: | + publish: + profile: ~ + whoami: ${{ github.ref_name }}-out + subdir: content/log4j/2.x + source-branch: ${{ github.ref_name }} + target-branch: ${{ github.ref_name }}-out + + export-version: + if: github.repository == 'apache/logging-log4j2' && startsWith(github.ref_name, 'release/') + runs-on: ubuntu-latest + outputs: + version: ${{ steps.export-version.outputs.version }} + steps: + - name: Export version + id: export-version + run: | + version=$(echo "${{ github.ref_name }}" | sed 's/^release\///') + echo "version=$version" >> "$GITHUB_OUTPUT" + + deploy-site-rel: + needs: export-version + uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@main + # 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/${{ needs.export-version.outputs.version }} + target-branch: ${{ github.ref_name }}-site-stg-out diff --git a/pom.xml b/pom.xml index 519bfb5427..b745f689b4 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ <parent> <groupId>org.apache.logging</groupId> <artifactId>logging-parent</artifactId> - <version>10.6.0</version> + <version>11.0.0-SNAPSHOT</version> <relativePath /> </parent> @@ -615,7 +615,7 @@ This section consists of plugins responsible for generating the site. Note that only this (i.e., the root) module is supposed to have a `site` goal, it is skipped for all other modules! --> - <!-- Define `currentYear` property used while generating the site --> + <!-- Define `currentYear` property used by the `maven-javadoc-plugin` configuration --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> @@ -657,68 +657,15 @@ <bottom><![CDATA[<p align="center"> Copyright © {inceptionYear}-{currentYear} {organizationName}. All Rights Reserved.<br/> - Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation. + Apache, Log4j, and the Apache feather logo are trademarks or registered trademarks of {organizationName}. + Oracle and Java are registered trademarks of Oracle and/or its affiliates. + Other names may be trademarks of their respective owners. </p>]]></bottom> </configuration> </execution> </executions> </plugin> - <!-- Export release notes --> - <plugin> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-changelog-maven-plugin</artifactId> - <executions> - <execution> - <!-- Execution ID must match the one inherited from `logging-parent` (i.e., `export-changelog`) to override it! --> - <id>export-changelog</id> - <goals> - <goal>export</goal> - </goals> - <phase>pre-site</phase> - <inherited>false</inherited> - <configuration> - <outputDirectory>${project.build.directory}/generated-site/antora/modules/ROOT/pages</outputDirectory> - <indexTemplates> - <template> - <source>.index.adoc.ftl</source> - <target>release-notes.adoc</target> - </template> - </indexTemplates> - <changelogTemplates> - <template> - <source>.release-notes.adoc.ftl</source> - <target>_release-notes/%v.adoc</target> - </template> - </changelogTemplates> - </configuration> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <inherited>false</inherited> - <executions> - - <!-- Copy `src/site/antora/antora.tmpl.yml` to `target/antora-yml/antora.yml` --> - <execution> - <id>copy-antora-yml</id> - <goals> - <goal>run</goal> - </goals> - <phase>pre-site</phase> - <configuration> - <target> - <copy file="${project.basedir}/src/site/antora/antora.tmpl.yml" overwrite="true" tofile="${project.build.directory}/antora-yml/antora.yml" /> - </target> - </configuration> - </execution> - - </executions> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -753,38 +700,11 @@ <!-- Process `target/antora-yml` and output to `target/generated-site/antora` --> <execution> <id>filter-antora-yml</id> - <goals> - <goal>copy-resources</goal> - </goals> - <phase>pre-site</phase> - <inherited>false</inherited> - <configuration> - <outputDirectory>${project.build.directory}/generated-site/antora</outputDirectory> - <resources> - <resource> - <directory>${project.build.directory}/antora-yml</directory> - <filtering>true</filtering> - </resource> - </resources> - </configuration> </execution> <!-- Copy `src/site` to `target/generated-site` --> <execution> <id>copy-site</id> - <goals> - <goal>copy-resources</goal> - </goals> - <phase>pre-site</phase> - <inherited>false</inherited> - <configuration> - <outputDirectory>${project.build.directory}/generated-site</outputDirectory> - <resources> - <resource> - <directory>${project.basedir}/src/site</directory> - </resource> - </resources> - </configuration> </execution> <!-- Copy `target/site/apidocs` to the root module's `target/site/javadoc/<artifactId>` folder --> @@ -894,85 +814,6 @@ </plugin> - <plugin> - <groupId>com.github.eirslett</groupId> - <artifactId>frontend-maven-plugin</artifactId> - <version>${frontend-maven-plugin.version}</version> - <inherited>false</inherited> - <executions> - - <!-- Install Node & NPM --> - <execution> - <id>install-node-and-npm</id> - <goals> - <goal>install-node-and-npm</goal> - </goals> - <phase>pre-site</phase> - <configuration> - <nodeVersion>v${node.version}</nodeVersion> - <npmVersion>${npm.version}</npmVersion> - </configuration> - </execution> - - <!-- Install Antora --> - <execution> - <id>install-antora</id> - <goals> - <goal>npm</goal> - </goals> - <phase>pre-site</phase> - </execution> - - </executions> - </plugin> - - <!-- Run Antora --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>${exec-maven-plugin.version}</version> - <executions> - <execution> - <id>run-antora</id> - <goals> - <goal>exec</goal> - </goals> - <phase>site</phase> - <inherited>false</inherited> - <configuration> - <executable>${project.basedir}/node/node</executable> - <arguments> - <!-- Running `node/node node_modules/.bin/antora antora-playbook.yaml ...` doesn't work on Windows[1]. - I come up with the below solution working on both Linux and Windows. - Pay attention to the following details: - - 1. `@antora/cli` is executed programmatically (this is what `node_modules/.bin/antora` does under the hood) - 2. Single-quotes must be used (double-quotes get erased and hence cause syntax errors) - 3. Relative paths must be used[2] - - [1] For some reason, the `node_modules/.bin/antora` script is not properly executed. - The following works though: `cd node_modules/.bin; ../../node/node antora ../../antora-playbook.yaml`. - Motivated by this, tried configuring the `workingDirectory` parameter of the plugin, though it did not help. - [2] `${project.basedir}/antora-playbook.yaml` strangely resolves to `C:\Users\user\logging-log4j2\Usersuserlogging-log4j2/antora-playbook.yaml`. - I tried using `const path = require('path'); ... path.resolve('${project.basedir}', 'antora-playbook.yaml')`, but it failed with the same error too. --> - <argument>--eval</argument> - <argument>require('@antora/cli')(['generate', '--playbook', 'antora-playbook.yaml', '--to-dir', 'target/site'])</argument> - </arguments> - </configuration> - </execution> - </executions> - </plugin> - - <!-- Skip the `export-asciidoc-to-html` execution inherited from `logging-parent` --> - <plugin> - <groupId>org.asciidoctor</groupId> - <artifactId>asciidoctor-maven-plugin</artifactId> - <inherited>false</inherited> - <configuration> - <skip>true</skip> - </configuration> - </plugin> - <!-- ███████ ███ ██ ██████ ███████ ██ ████████ ███████ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ █████ ██ ██ ██ ██ ██ ███████ ██ ██ █████ diff --git a/src/site/antora/antora.tmpl.yml b/src/site/antora/antora.tmpl.yml index ffe4268d70..01edf16908 100644 --- a/src/site/antora/antora.tmpl.yml +++ b/src/site/antora/antora.tmpl.yml @@ -48,4 +48,3 @@ asciidoc: java-compiler-version: "${minimalJavaBuildVersion}" nav: - modules/ROOT/nav.adoc - - modules/manual/nav.adoc