Skip to content

Commit 3c14aad

Browse files
committed
Bump logging-parent to 11.0.0-SNAPSHOT
1 parent c88a546 commit 3c14aad

File tree

4 files changed

+108
-173
lines changed

4 files changed

+108
-173
lines changed

.github/workflows/build.yaml

+7-8
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
build:
4040
if: github.actor != 'dependabot[bot]'
41-
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/10.6.0
41+
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@main
4242
with:
4343
java-version: |
4444
8
@@ -48,11 +48,11 @@ jobs:
4848
deploy-snapshot:
4949
needs: build
5050
if: github.repository == 'apache/logging-log4j2' && github.ref_name == '2.x'
51-
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@rel/10.6.0
51+
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@main
5252
# Secrets for deployments
5353
secrets:
54-
NEXUS_USER: ${{ secrets.NEXUS_USER }}
55-
NEXUS_PW: ${{ secrets.NEXUS_PW }}
54+
NEXUS_USERNAME: ${{ secrets.NEXUS_USER }}
55+
NEXUS_PASSWORD: ${{ secrets.NEXUS_PW }}
5656
with:
5757
java-version: |
5858
8
@@ -61,12 +61,12 @@ jobs:
6161
deploy-release:
6262
needs: build
6363
if: github.repository == 'apache/logging-log4j2' && startsWith(github.ref_name, 'release/')
64-
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@rel/10.6.0
64+
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@main
6565
# Secrets for deployments
6666
secrets:
6767
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
68-
LOGGING_STAGE_DEPLOYER_USER: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }}
69-
LOGGING_STAGE_DEPLOYER_PW: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }}
68+
NEXUS_USERNAME: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }}
69+
NEXUS_PASSWORD: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }}
7070
SVN_USERNAME: ${{ secrets.LOGGING_SVN_DEV_USERNAME }}
7171
SVN_PASSWORD: ${{ secrets.LOGGING_SVN_DEV_PASSWORD }}
7272
# Write permissions to allow the Maven `revision` property update, changelog release, etc.
@@ -77,4 +77,3 @@ jobs:
7777
8
7878
17
7979
project-id: log4j
80-
site-enabled: true

.github/workflows/deploy-site.yaml

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to you under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
name: deploy-site
19+
20+
on:
21+
push:
22+
branches:
23+
- "2.x"
24+
- "2.x-site-pro"
25+
- "release/*"
26+
paths-ignore:
27+
- "**.md"
28+
- "**.txt"
29+
30+
permissions: read-all
31+
32+
jobs:
33+
34+
deploy-site-stg:
35+
if: github.repository == 'apache/logging-log4j2' && github.ref_name == '2.x'
36+
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@main
37+
# Secrets for committing the generated site
38+
secrets:
39+
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
40+
# Write permissions for committing the generated site
41+
permissions:
42+
contents: write
43+
with:
44+
asf-yaml-content: |
45+
staging:
46+
profile: ~
47+
whoami: ${{ github.ref_name }}-site-stg-out
48+
subdir: content/log4j/2.x
49+
target-branch: ${{ github.ref_name }}-site-stg-out
50+
51+
deploy-site-pro:
52+
if: github.repository == 'apache/logging-log4j2' && github.ref_name == '2.x-site-pro'
53+
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@main
54+
# Secrets for committing the generated site
55+
secrets:
56+
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
57+
# Write permissions for committing the generated site
58+
permissions:
59+
contents: write
60+
with:
61+
asf-yaml-content: |
62+
publish:
63+
profile: ~
64+
whoami: ${{ github.ref_name }}-out
65+
subdir: content/log4j/2.x
66+
source-branch: ${{ github.ref_name }}
67+
target-branch: ${{ github.ref_name }}-out
68+
69+
export-version:
70+
if: github.repository == 'apache/logging-log4j2' && startsWith(github.ref_name, 'release/')
71+
runs-on: ubuntu-latest
72+
outputs:
73+
version: ${{ steps.export-version.outputs.version }}
74+
steps:
75+
- name: Export version
76+
id: export-version
77+
run: |
78+
version=$(echo "${{ github.ref_name }}" | sed 's/^release\///')
79+
echo "version=$version" >> "$GITHUB_OUTPUT"
80+
81+
deploy-site-rel:
82+
needs: export-version
83+
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@main
84+
# Secrets for committing the generated site
85+
secrets:
86+
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
87+
# Write permissions for committing the generated site
88+
permissions:
89+
contents: write
90+
with:
91+
asf-yaml-content: |
92+
staging:
93+
profile: ~
94+
whoami: ${{ github.ref_name }}-site-stg-out
95+
subdir: content/log4j/${{ needs.export-version.outputs.version }}
96+
target-branch: ${{ github.ref_name }}-site-stg-out

pom.xml

+5-164
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<parent>
3232
<groupId>org.apache.logging</groupId>
3333
<artifactId>logging-parent</artifactId>
34-
<version>10.6.0</version>
34+
<version>11.0.0-SNAPSHOT</version>
3535
<relativePath />
3636
</parent>
3737

@@ -615,7 +615,7 @@
615615
This section consists of plugins responsible for generating the site.
616616
Note that only this (i.e., the root) module is supposed to have a `site` goal, it is skipped for all other modules! -->
617617

618-
<!-- Define `currentYear` property used while generating the site -->
618+
<!-- Define `currentYear` property used by the `maven-javadoc-plugin` configuration -->
619619
<plugin>
620620
<groupId>org.codehaus.mojo</groupId>
621621
<artifactId>build-helper-maven-plugin</artifactId>
@@ -657,68 +657,15 @@
657657
<bottom><![CDATA[<p align="center">
658658
Copyright &copy; {inceptionYear}-{currentYear} {organizationName}.
659659
All Rights Reserved.<br/>
660-
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.
660+
Apache, Log4j, and the Apache feather logo are trademarks or registered trademarks of {organizationName}.
661+
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
662+
Other names may be trademarks of their respective owners.
661663
</p>]]></bottom>
662664
</configuration>
663665
</execution>
664666
</executions>
665667
</plugin>
666668

667-
<!-- Export release notes -->
668-
<plugin>
669-
<groupId>org.apache.logging.log4j</groupId>
670-
<artifactId>log4j-changelog-maven-plugin</artifactId>
671-
<executions>
672-
<execution>
673-
<!-- Execution ID must match the one inherited from `logging-parent` (i.e., `export-changelog`) to override it! -->
674-
<id>export-changelog</id>
675-
<goals>
676-
<goal>export</goal>
677-
</goals>
678-
<phase>pre-site</phase>
679-
<inherited>false</inherited>
680-
<configuration>
681-
<outputDirectory>${project.build.directory}/generated-site/antora/modules/ROOT/pages</outputDirectory>
682-
<indexTemplates>
683-
<template>
684-
<source>.index.adoc.ftl</source>
685-
<target>release-notes.adoc</target>
686-
</template>
687-
</indexTemplates>
688-
<changelogTemplates>
689-
<template>
690-
<source>.release-notes.adoc.ftl</source>
691-
<target>_release-notes/%v.adoc</target>
692-
</template>
693-
</changelogTemplates>
694-
</configuration>
695-
</execution>
696-
</executions>
697-
</plugin>
698-
699-
<plugin>
700-
<groupId>org.apache.maven.plugins</groupId>
701-
<artifactId>maven-antrun-plugin</artifactId>
702-
<inherited>false</inherited>
703-
<executions>
704-
705-
<!-- Copy `src/site/antora/antora.tmpl.yml` to `target/antora-yml/antora.yml` -->
706-
<execution>
707-
<id>copy-antora-yml</id>
708-
<goals>
709-
<goal>run</goal>
710-
</goals>
711-
<phase>pre-site</phase>
712-
<configuration>
713-
<target>
714-
<copy file="${project.basedir}/src/site/antora/antora.tmpl.yml" overwrite="true" tofile="${project.build.directory}/antora-yml/antora.yml" />
715-
</target>
716-
</configuration>
717-
</execution>
718-
719-
</executions>
720-
</plugin>
721-
722669
<plugin>
723670

724671
<groupId>org.apache.maven.plugins</groupId>
@@ -753,38 +700,11 @@
753700
<!-- Process `target/antora-yml` and output to `target/generated-site/antora` -->
754701
<execution>
755702
<id>filter-antora-yml</id>
756-
<goals>
757-
<goal>copy-resources</goal>
758-
</goals>
759-
<phase>pre-site</phase>
760-
<inherited>false</inherited>
761-
<configuration>
762-
<outputDirectory>${project.build.directory}/generated-site/antora</outputDirectory>
763-
<resources>
764-
<resource>
765-
<directory>${project.build.directory}/antora-yml</directory>
766-
<filtering>true</filtering>
767-
</resource>
768-
</resources>
769-
</configuration>
770703
</execution>
771704

772705
<!-- Copy `src/site` to `target/generated-site` -->
773706
<execution>
774707
<id>copy-site</id>
775-
<goals>
776-
<goal>copy-resources</goal>
777-
</goals>
778-
<phase>pre-site</phase>
779-
<inherited>false</inherited>
780-
<configuration>
781-
<outputDirectory>${project.build.directory}/generated-site</outputDirectory>
782-
<resources>
783-
<resource>
784-
<directory>${project.basedir}/src/site</directory>
785-
</resource>
786-
</resources>
787-
</configuration>
788708
</execution>
789709

790710
<!-- Copy `target/site/apidocs` to the root module's `target/site/javadoc/<artifactId>` folder -->
@@ -894,85 +814,6 @@
894814

895815
</plugin>
896816

897-
<plugin>
898-
<groupId>com.github.eirslett</groupId>
899-
<artifactId>frontend-maven-plugin</artifactId>
900-
<version>${frontend-maven-plugin.version}</version>
901-
<inherited>false</inherited>
902-
<executions>
903-
904-
<!-- Install Node & NPM -->
905-
<execution>
906-
<id>install-node-and-npm</id>
907-
<goals>
908-
<goal>install-node-and-npm</goal>
909-
</goals>
910-
<phase>pre-site</phase>
911-
<configuration>
912-
<nodeVersion>v${node.version}</nodeVersion>
913-
<npmVersion>${npm.version}</npmVersion>
914-
</configuration>
915-
</execution>
916-
917-
<!-- Install Antora -->
918-
<execution>
919-
<id>install-antora</id>
920-
<goals>
921-
<goal>npm</goal>
922-
</goals>
923-
<phase>pre-site</phase>
924-
</execution>
925-
926-
</executions>
927-
</plugin>
928-
929-
<!-- Run Antora -->
930-
<plugin>
931-
<groupId>org.codehaus.mojo</groupId>
932-
<artifactId>exec-maven-plugin</artifactId>
933-
<version>${exec-maven-plugin.version}</version>
934-
<executions>
935-
<execution>
936-
<id>run-antora</id>
937-
<goals>
938-
<goal>exec</goal>
939-
</goals>
940-
<phase>site</phase>
941-
<inherited>false</inherited>
942-
<configuration>
943-
<executable>${project.basedir}/node/node</executable>
944-
<arguments>
945-
<!-- Running `node/node node_modules/.bin/antora antora-playbook.yaml ...` doesn't work on Windows[1].
946-
I come up with the below solution working on both Linux and Windows.
947-
Pay attention to the following details:
948-
949-
1. `@antora/cli` is executed programmatically (this is what `node_modules/.bin/antora` does under the hood)
950-
2. Single-quotes must be used (double-quotes get erased and hence cause syntax errors)
951-
3. Relative paths must be used[2]
952-
953-
[1] For some reason, the `node_modules/.bin/antora` script is not properly executed.
954-
The following works though: `cd node_modules/.bin; ../../node/node antora ../../antora-playbook.yaml`.
955-
Motivated by this, tried configuring the `workingDirectory` parameter of the plugin, though it did not help.
956-
[2] `${project.basedir}/antora-playbook.yaml` strangely resolves to `C:\Users\user\logging-log4j2\Usersuserlogging-log4j2/antora-playbook.yaml`.
957-
I tried using `const path = require('path'); ... path.resolve('${project.basedir}', 'antora-playbook.yaml')`, but it failed with the same error too. -->
958-
<argument>--eval</argument>
959-
<argument>require('@antora/cli')(['generate', '--playbook', 'antora-playbook.yaml', '--to-dir', 'target/site'])</argument>
960-
</arguments>
961-
</configuration>
962-
</execution>
963-
</executions>
964-
</plugin>
965-
966-
<!-- Skip the `export-asciidoc-to-html` execution inherited from `logging-parent` -->
967-
<plugin>
968-
<groupId>org.asciidoctor</groupId>
969-
<artifactId>asciidoctor-maven-plugin</artifactId>
970-
<inherited>false</inherited>
971-
<configuration>
972-
<skip>true</skip>
973-
</configuration>
974-
</plugin>
975-
976817
<!-- ███████ ███ ██ ██████ ███████ ██ ████████ ███████
977818
██ ████ ██ ██ ██ ██ ██ ██ ██ ██
978819
█████ ██ ██ ██ ██ ██ ███████ ██ ██ █████

src/site/antora/antora.tmpl.yml

-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,3 @@ asciidoc:
4848
java-compiler-version: "${minimalJavaBuildVersion}"
4949
nav:
5050
- modules/ROOT/nav.adoc
51-
- modules/manual/nav.adoc

0 commit comments

Comments
 (0)