This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch gha/v0 in repository https://gitbox.apache.org/repos/asf/logging-parent.git
commit 34abf0376c19d5ed4b18f790bed16298f1cf42f9 Author: Volkan Yazıcı <[email protected]> AuthorDate: Mon Mar 30 20:37:48 2026 +0200 Initial content. --- .editorconfig | 66 +++++ .gitattributes | 20 ++ .github/workflows/build-reusable.yaml | 214 ++++++++++++++ .github/workflows/codeql-analysis-reusable.yaml | 74 +++++ .github/workflows/deploy-release-reusable.yaml | 314 +++++++++++++++++++++ .github/workflows/deploy-site-reusable.yaml | 189 +++++++++++++ .github/workflows/deploy-snapshot-reusable.yaml | 85 ++++++ .../workflows/verify-reproducibility-reusable.yaml | 115 ++++++++ .gitignore | 33 +++ LICENSE.txt | 202 +++++++++++++ NOTICE.txt | 5 + README.adoc | 19 ++ 12 files changed, 1336 insertions(+) diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..6c3d154 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,66 @@ +# 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. + +# Configuration here must match the one for Spotless in `pom.xml`! + +root = true + +[*] +indent_size = 4 +ij_continuation_indent_size = 8 +indent_style = space +trim_trailing_whitespace = true + +# `ij_any_use_relative_indents = true` is deliberately left out since it messes up the indentation in ternary operator usages + +# Split some things over multiple lines to keep lines short +ij_any_call_parameters_wrap = on_every_item +ij_any_method_parameters_wrap = on_every_item +ij_any_method_call_chain_wrap = on_every_item + +# Don't align with the first line to avoid single-line changes having an impact in the rest of the code +ij_any_align_multiline_parameters_in_calls = false +ij_any_align_multiline_parameters = false +ij_any_align_multiline_chained_methods = false + +# Only use `import *` when importing 5 or more +ij_java_names_count_to_use_import_on_demand = 5 +ij_java_class_count_to_use_import_on_demand = 5 + +# Order imports +# `*` denotes any packages except explicitly specified ones +# `|` denotes a blank line +# `$` denotes the prefix for static packages +# `**` means including subpackages +ij_java_imports_layout = java.**, |, javax.**, |, org.apache.logging.**, |, *, |, $java.**, |, $javax.**, |, $org.apache.logging.**, |, $* + +# Force curly braces +ij_any_for_brace_force = always +ij_any_if_brace_force = always +ij_any_do_while_brace_force = always +ij_any_while_brace_force = always + +# Don't align parameters and exceptions in javadoc based on the longest names to avoid single-line changes having an impact in the rest of the code +ij_java_doc_align_param_comments = false +ij_java_doc_align_exception_comments = false + +[*.{xml,xsd,properties,yml,yaml,json}] +indent_size = 2 + +[*.{md,adoc}] +indent_size = 2 +ij_any_wrap_long_lines = false +# The `no` value doesn't work in IntelliJ IDEA so a big number does the trick as well in most cases: +max_line_length = 9999 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..b2cc9f4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,20 @@ +# 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. + +# Checked by Spotless (LF line endings) +*.java text eol=lf +*.xml text eol=lf +*.yaml text eol=lf +*.yml text eol=lf diff --git a/.github/workflows/build-reusable.yaml b/.github/workflows/build-reusable.yaml new file mode 100644 index 0000000..1c96d0a --- /dev/null +++ b/.github/workflows/build-reusable.yaml @@ -0,0 +1,214 @@ +# +# 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: build-reusable + +on: + workflow_call: + inputs: + develocity-enabled: + description: Enable Develocity Build Scan publication + default: false + type: boolean + java-version: + description: The Java compiler version + default: 17 + type: string + maven-args: + description: Additional Maven arguments + type: string + ref: + description: The branch, tag or SHA to checkout + # When running on `pull_request_target` use the PR branch, not the target branch + default: ${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} + type: string + repository: + description: GitHub repository name with owner + default: ${{ github.repository }} + type: string + reproducibility-check-enabled: + description: Runs a reproducibility check on the build + default: true + type: boolean + site-enabled: + description: Flag indicating if Maven `site` goal should be run + default: false + type: boolean + test-report-enabled: + description: Enables the upload of test reports + default: true + type: boolean + test-report-suffix: + description: Suffix to add to the uploaded artifacts + default: '' + type: string + + secrets: + DV_ACCESS_TOKEN: + description: Access token to Gradle Enterprise + required: false + +env: + MAVEN_ARGS: ${{ inputs.maven-args }} + +# Explicitly drop all permissions inherited from the caller for security. +# Reference: https://docs.github.com/en/actions/sharing-automations/reusing-workflows#access-and-permissions +permissions: { } + +jobs: + + build: + + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ macos-latest, ubuntu-latest, windows-latest ] + + steps: + + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 + with: + repository: ${{ inputs.repository }} + ref: ${{ inputs.ref }} + + - name: Set up Java + uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0 + with: + distribution: zulu + java-version: ${{ inputs.java-version }} + cache: maven + + - name: Set up Develocity + if: inputs.develocity-enabled + shell: bash + run: | + if [ -f .mvn/develocity.xml ]; then + DEVELOCITY_VERSION=$(./mvnw help:evaluate -q -DforceStdout -Dexpression=develocity-maven-plugin.version) + USER_DATA_VERSION=$(./mvnw help:evaluate -q -DforceStdout -Dexpression=develocity-user-data-extension.version) + cat >.mvn/extensions.xml <<EOF + <extensions> + <extension> + <groupId>com.gradle</groupId> + <artifactId>develocity-maven-extension</artifactId> + <version>$DEVELOCITY_VERSION</version> + </extension> + <extension> + <groupId>com.gradle</groupId> + <artifactId>common-custom-user-data-maven-extension</artifactId> + <version>$USER_DATA_VERSION</version> + </extension> + </extensions> + EOF + # Print file for debugging purposes + cat .mvn/extensions.xml + fi + + - name: Setup Develocity Build Scan capture + if: inputs.develocity-enabled + uses: gradle/develocity-actions/setup-maven@4a2aed82eea165ba2d5c494fc2a8730d7fdff229 # 1.4 + with: + develocity-access-key: ${{ secrets.DV_ACCESS_TOKEN }} + + # We use `install` instead of `verify`, otherwise the build website step below fails + - name: Build + id: build + shell: bash + run: | + ./mvnw \ + --show-version --batch-mode --errors --no-transfer-progress \ + -DtrimStackTrace=false \ + -DinstallAtEnd=true \ + clean install + + # We upload tests results. + - name: Upload test reports + if: ${{ always() && inputs.test-report-enabled }} + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2 + with: + name: "test-report-${{matrix.os}}-${{github.run_number}}-${{github.run_attempt}}${{inputs.test-report-suffix}}" + path: | + **/target/surefire-reports + **/target/logs + + - name: Clean up Develocity + if: inputs.develocity-enabled + shell: bash + run: | + rm -f .mvn/extensions.xml + # Clean up changes introduced by gradle/develocity-actions/maven-setup + echo "MAVEN_OPTS=" >> "$GITHUB_ENV" + + # Node.js cache is needed for Antora + - name: Set up Node.js cache + if: inputs.site-enabled + id: nodejs-cache + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # 4.2.4 + with: + # We should be calculating the cache key using `package-lock.json` instead! + # See https://stackoverflow.com/a/48524475/1278899 + # For that, `package-lock.json` needs to be committed into the repository – right now it is `.gitignore`d. + # Once it is there, we should ideally switch from `npm i` to `npm ci`. + # For that, we need to configure `dependabot` to update hundreds of dependencies listed in `package-lock.json`. + # That translates to a never ending rain of `dependabot` PRs. + # I doubt if the wasted CPU cycles worth the gain. + key: "${{ runner.os }}-nodejs-cache-${{ hashFiles('node', 'node_modules') }}" + # `actions/cache` doesn't recommend caching `node_modules`. + # Though none of its recipes fit our bill, since we install Node.js using `frontend-maven-plugin`. + # See https://github.com/actions/cache/blob/main/examples.md#node---npm + # We settle for this quick-n-dirty solution for the time being. + path: | + node + node_modules + + - name: Build the website + if: inputs.site-enabled + shell: bash + env: + # Making Node.js cache hit visible for debugging purposes + NODEJS_CACHE_HIT: ${{ steps.nodejs-cache.outputs.cache-hit }} + run: | + ./mvnw \ + --show-version --batch-mode --errors --no-transfer-progress \ + site + + # `clean verify artifact:compare` is required to generate the build reproducibility report. + # For details, see: https://maven.apache.org/guides/mini/guide-reproducible-builds.html#how-to-test-my-maven-build-reproducibility + - name: Verify build reproducibility + if: inputs.reproducibility-check-enabled + id: reproducibility + shell: bash + run: | + ./mvnw \ + --show-version --batch-mode --errors --no-transfer-progress \ + -DskipTests=true \ + clean verify artifact:compare + + # Upload reproducibility results if the build fails. + - name: Upload reproducibility results + if: inputs.reproducibility-check-enabled && failure() && steps.reproducibility.conclusion == 'failure' + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2 + with: + name: reproducibility-${{matrix.os}}-${{github.run_number}}-${{github.run_attempt}} + path: | + **/target/bom.xml + **/target/*.buildcompare + **/target/*.jar + **/target/*.zip + **/target/reference/** diff --git a/.github/workflows/codeql-analysis-reusable.yaml b/.github/workflows/codeql-analysis-reusable.yaml new file mode 100644 index 0000000..217d5e8 --- /dev/null +++ b/.github/workflows/codeql-analysis-reusable.yaml @@ -0,0 +1,74 @@ +# +# 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: codeql-analysis + +on: + workflow_call: + inputs: + java-version: + description: The Java compiler version + default: 17 + type: string + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'kotlin', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://git.io/codeql-language-support + language: + description: Language used in the repository + default: java + type: string + +# Explicitly drop all permissions inherited from the caller for security. +# Reference: https://docs.github.com/en/actions/sharing-automations/reusing-workflows#access-and-permissions +permissions: { } + +jobs: + + analyze: + name: Analyze + runs-on: ubuntu-latest + # Permissions required to publish Security Alerts + permissions: + security-events: write + + steps: + + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 + + - name: Initialize CodeQL + uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # 3.29.0 + with: + # Also check GitHub Actions + languages: ${{ inputs.language }}, actions + + - name: Setup JDK + uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0 + with: + distribution: zulu + java-version: ${{ inputs.java-version }} + cache: maven + + - name: Build with Maven + shell: bash + run: | + ./mvnw \ + --show-version --batch-mode --errors --no-transfer-progress \ + -DskipTests \ + clean verify + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # 3.29.0 diff --git a/.github/workflows/deploy-release-reusable.yaml b/.github/workflows/deploy-release-reusable.yaml new file mode 100644 index 0000000..03b447f --- /dev/null +++ b/.github/workflows/deploy-release-reusable.yaml @@ -0,0 +1,314 @@ +# +# 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-release-reusable + +on: + workflow_call: + inputs: + java-version: + description: The Java compiler version + default: 17 + type: string + project-id: + description: Identifier used in the distribution artifact and Subversion repository folder filenames (e.g., `logging-parent`) + required: true + type: string + outputs: + project-version: + description: The version of the project + value: ${{ jobs.deploy.outputs.project-version }} + nexus-url: + description: The URL of the Nexus repository used + value: ${{ jobs.deploy.outputs.nexus-url }} + secrets: + GPG_SECRET_KEY: + description: GPG secret key for signing artifacts + required: true + NEXUS_USERNAME: + description: Nexus staging repository username for deploying artifacts + required: true + NEXUS_PASSWORD: + description: Nexus staging repository password for deploying artifacts + required: true + SVN_USERNAME: + description: Subversion username for uploading the release distribution + required: true + SVN_PASSWORD: + description: Subversion password for uploading the release distribution + required: true + +# Explicitly drop all permissions inherited from the caller for security. +# Reference: https://docs.github.com/en/actions/sharing-automations/reusing-workflows#access-and-permissions +permissions: { } + +jobs: + deploy: + runs-on: ubuntu-latest + outputs: + project-version: ${{ steps.version.outputs.project-version }} + nexus-url: ${{ steps.nexus.outputs.nexus-url }} + permissions: + # Write permissions to allow the Maven `revision` property update, changelog release, etc. + contents: write + + steps: + + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 + + - name: Set up Java & GPG + uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 3.7.0 + with: + distribution: zulu + java-version: ${{ inputs.java-version }} + cache: maven + server-id: apache.releases.https + server-username: NEXUS_USERNAME + server-password: NEXUS_PASSWORD + gpg-private-key: ${{ secrets.GPG_SECRET_KEY }} + + - name: Set up Git user + shell: bash + run: | + # Set up user name and email required for `git commit` + git config user.name "ASF Logging Services RM" + git config user.email [email protected] + + - name: Export version + id: version + shell: bash + env: + GIT_BRANCH_NAME: ${{ github.ref_name }} + run: | + [[ "$GIT_BRANCH_NAME" =~ ^release/.+$ ]] || { + echo "was expecting a \`release/\`-prefixed Git branch name, found: \`$GIT_BRANCH_NAME\`" + exit 1 + } + export PROJECT_VERSION=$(echo "$GIT_BRANCH_NAME" | sed 's/^release\///') + echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_ENV + # Export version to calling workflow + echo "project-version=$PROJECT_VERSION" >> $GITHUB_OUTPUT + + - name: Set the Maven `revision` property + shell: bash + run: | + export REVISION=$(./mvnw \ + --non-recursive --quiet --batch-mode \ + -DforceStdout=true \ + -Dexpression=revision \ + help:evaluate \ + | tail -n 1) + if [ "$REVISION" != "$PROJECT_VERSION" ]; then + echo "Maven \`revision\` property \`$REVISION\` doesn't match with the project version \`$PROJECT_VERSION\`, updating \`pom.xml\`..." + ./mvnw \ + --non-recursive --batch-mode --errors --no-transfer-progress \ + -Dproperty=revision \ + -DnewVersion="$PROJECT_VERSION" \ + -DgenerateBackupPoms=false \ + versions:set-property + git commit -S pom.xml -m "Set version to \`$PROJECT_VERSION\`" + git push -f origin + fi + + - name: Set the Maven `project.build.outputTimestamp` property + shell: bash + run: | + export PROPERTY="project.build.outputTimestamp" + grep -qE '^[\t ]+<'$PROPERTY'>' pom.xml || { + echo "Failed to find the \`$PROPERTY\` Maven property!" + exit 1 + } + export TIMESTAMP=$(TZ=UTC0 git show --quiet --date="format-local:%Y-%m-%dT%H:%M:%SZ" --format="%cd") + sed -r 's|^([\t ]+<'$PROPERTY'>).+(</'$PROPERTY'>)$|\1'$TIMESTAMP'\2|g' -i pom.xml + if [ -n "$(git status --porcelain)" ]; then + git commit -S pom.xml -m "Update the \`$PROPERTY\` property" + git push -f origin + fi + + - name: Release changelog + shell: bash + run: | + ./mvnw \ + --non-recursive --batch-mode --errors --no-transfer-progress \ + -P changelog-release + git add src + if [ -n "$(git status --porcelain)" ]; then + git commit -S src -m "Release changelog for version \`$PROJECT_VERSION\`" + git push -f origin + fi + + - name: Upload to Nexus + id: nexus + shell: bash + env: + # `NEXUS_USERNAME` and `NEXUS_PASSWORD` are used in `~/.m2/settings.xml` created by `setup-java` action + NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} + NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + # `SIGN_KEY` is used by `sign-maven-plugin` + SIGN_KEY: ${{ secrets.GPG_SECRET_KEY }} + run: | + ./mvnw \ + --show-version --batch-mode --errors --no-transfer-progress \ + -P deploy,release + export NEXUS_URL=$(awk '/^(stagingRepository.url)/ { gsub(/(^.+=|\\)/, ""); print $1 }' target/nexus-staging/staging/*.properties) + echo "NEXUS_URL=$NEXUS_URL" >> $GITHUB_ENV + # Export repository URL to calling workflow + echo "nexus-url=$NEXUS_URL" >> $GITHUB_OUTPUT + + # Node.js cache is needed for Antora + - name: Set up Node.js cache + id: nodejs-cache + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # 4.2.4 + with: + # We should be calculating the cache key using `package-lock.json` instead! + # See https://stackoverflow.com/a/48524475/1278899 + # For that, `package-lock.json` needs to be committed into the repository – right now it is `.gitignore`d. + # Once it is there, we should ideally switch from `npm i` to `npm ci`. + # For that, we need to configure `dependabot` to update hundreds of dependencies listed in `package-lock.json`. + # That translates to a never ending rain of `dependabot` PRs. + # I doubt if the wasted CPU cycles worth the gain. + key: "${{ runner.os }}-nodejs-cache-${{ hashFiles('node', 'node_modules') }}" + # `actions/cache` doesn't recommend caching `node_modules`. + # Though none of its recipes fit our bill, since we install Node.js using `frontend-maven-plugin`. + # See https://github.com/actions/cache/blob/main/examples.md#node---npm + # We settle for this quick-n-dirty solution for the time being. + path: | + node + node_modules + + # Website build is needed to generate the release notes + - name: Build the website + shell: bash + env: + # Making Node.js cache hit visible for debugging purposes + NODEJS_CACHE_HIT: ${{ steps.nodejs-cache.outputs.cache-hit }} + run: | + export TIMESTAMP=$(./mvnw \ + --non-recursive --quiet --batch-mode \ + -DforceStdout=true \ + -Dexpression=project.build.outputTimestamp \ + help:evaluate \ + | tail -n 1) + ./mvnw \ + --show-version --batch-mode --errors --no-transfer-progress \ + site + + - name: Collect distribution attachments information + shell: bash + run: | + # Folder where the Nexus Staging Maven plugin places the staged artifacts + export ALT_DEPLOYMENT_REPO_FILEPATH="target/nexus-staging/staging" + + # This regex needs to work for both Java (`distribution` profile) and `find` (while counting attachments)! + # Hence, we don't escape dots, etc. with backslashes, which is problematic to get working in both worlds. + export DIST_ATTACHMENT_FILEPATH_PATTERN="^$ALT_DEPLOYMENT_REPO_FILEPATH/.+-$PROJECT_VERSION"'((-tests)?.jar|-cyclonedx.xml)$' + export DIST_ATTACHMENT_COUNT=$(find "$ALT_DEPLOYMENT_REPO_FILEPATH" -type f -regextype posix-extended -regex "$DIST_ATTACHMENT_FILEPATH_PATTERN" | wc -l) + + # Pass the necessary environment variables + cat >> $GITHUB_ENV << EOF + DIST_ATTACHMENT_FILEPATH_PATTERN=$DIST_ATTACHMENT_FILEPATH_PATTERN + DIST_ATTACHMENT_COUNT=$DIST_ATTACHMENT_COUNT + EOF + + - name: Create the distribution + shell: bash + env: + PROJECT_ID: ${{ inputs.project-id }} + run: | + + # Generate the distribution (i.e., `src.zip` and optional `bin.zip`) + ./mvnw \ + --show-version --batch-mode --errors --no-transfer-progress \ + --non-recursive \ + -P distribution \ + -DattachmentFilepathPattern="$DIST_ATTACHMENT_FILEPATH_PATTERN" \ + -DattachmentCount="$DIST_ATTACHMENT_COUNT" + + # Rename distribution files + export DIST_FILENAME_PREFIX="apache-${PROJECT_ID}" + export DIST_FILENAME_VERSIONED_PREFIX="${DIST_FILENAME_PREFIX}-${PROJECT_VERSION}" + export DIST_FILEPATH_PREFIX="/tmp/${DIST_FILENAME_VERSIONED_PREFIX}" + export DIST_FILEPATH_SRC="${DIST_FILEPATH_PREFIX}-src.zip" + export DIST_FILEPATH_BIN="${DIST_FILEPATH_PREFIX}-bin.zip" + mv "target/src.zip" "$DIST_FILEPATH_SRC" + test -f "target/bin.zip" && mv "$_" "$DIST_FILEPATH_BIN" + + # Create signature and checksum files + for DIST_FILEPATH in "$DIST_FILEPATH_SRC" "$DIST_FILEPATH_BIN"; do + if [ -f "$DIST_FILEPATH" ]; then + gpg --armor --detach-sign --yes --pinentry-mode error "$DIST_FILEPATH" + sha512sum "$DIST_FILEPATH" \ + | ( read CHECKSUM FILEPATH; echo $CHECKSUM" "$(basename "$FILEPATH") ) \ + > "$DIST_FILEPATH.sha512" + fi + done + + # Pass the necessary environment variables + cat >> $GITHUB_ENV << EOF + DIST_FILENAME_PREFIX=$DIST_FILENAME_PREFIX + DIST_FILENAME_VERSIONED_PREFIX=$DIST_FILENAME_VERSIONED_PREFIX + DIST_FILEPATH_PREFIX=$DIST_FILEPATH_PREFIX + EOF + + - name: Upload to Subversion + shell: bash + env: + PROJECT_ID: ${{ inputs.project-id }} + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + run: | + + # Install Subversion + sudo apt install --assume-yes --no-install-recommends subversion + + # Find the effective Git commit ID + export COMMIT_ID=$(git rev-parse HEAD) + + # Checkout the SVN repository + export SVN_DIR="/tmp/svn-repo" + svn co \ + "https://dist.apache.org/repos/dist/dev/logging/$PROJECT_ID" \ + "$SVN_DIR" + cd "$SVN_DIR" + + # Switch to the distribution folder + [ -d "$PROJECT_VERSION" ] || { + mkdir "$PROJECT_VERSION" + svn add "$PROJECT_VERSION" + } + cd "$PROJECT_VERSION" + + # Clean up old files + find . -name "${DIST_FILENAME_PREFIX}*" -type f -print0 | xargs -0 -r svn delete + + # Generate emails + for EMAIL_TYPE in vote announce; do + "$GITHUB_WORKSPACE/.github/generate-email.sh" \ + "$EMAIL_TYPE" "$PROJECT_VERSION" "$COMMIT_ID" "$NEXUS_URL" \ + > "${DIST_FILENAME_VERSIONED_PREFIX}-email-${EMAIL_TYPE}.txt" + done + + # Copy the distribution + cp "$DIST_FILEPATH_PREFIX"* . + + # Add & commit changes + svn add "$DIST_FILENAME_PREFIX"* + svn commit \ + --username "$SVN_USERNAME" \ + --password "$SVN_PASSWORD" \ + -m "Added \`${DIST_FILENAME_PREFIX}\` artifacts for release \`${PROJECT_VERSION}\`" diff --git a/.github/workflows/deploy-site-reusable.yaml b/.github/workflows/deploy-site-reusable.yaml new file mode 100644 index 0000000..d48c017 --- /dev/null +++ b/.github/workflows/deploy-site-reusable.yaml @@ -0,0 +1,189 @@ +# +# 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-reusable + +on: + workflow_call: + inputs: + asf-yaml-content: + description: The contents of the `.asf.yaml` that will be created + required: true + type: string + java-version: + description: The Java compiler version + default: 17 + type: string + install-required: + description: Flag indicating if Maven `install` goal should be run before running the `site` goal + default: false + type: boolean + target-branch: + description: The name of the branch the generated site content will be written to + required: true + type: string + target-path: + description: The directory path the generated site content will be placed under + default: "." + type: string + secrets: + GPG_SECRET_KEY: + description: GPG secret key for signing commits + required: true + +# Explicitly drop all permissions inherited from the caller for security. +# Reference: https://docs.github.com/en/actions/sharing-automations/reusing-workflows#access-and-permissions +permissions: { } + +jobs: + + deploy: + runs-on: ubuntu-latest + permissions: + # Write permissions for committing the generated site + contents: write + + steps: + + - name: Checkout the source branch + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 + + - name: Set up Java + uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 3.7.0 + with: + distribution: zulu + java-version: ${{ inputs.java-version }} + cache: maven + gpg-private-key: ${{ secrets.GPG_SECRET_KEY }} + + - name: Build the project + shell: bash + if: inputs.install-required + run: | + ./mvnw \ + --show-version --batch-mode --errors --no-transfer-progress \ + -Dmaven.test.skip \ + install + + # Node.js cache is needed for Antora + - name: Restore Node.js cache + id: nodejs-cache-restore + uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # 4.2.4 + with: + # The cache is OS independent + enableCrossOsArchive: true + # The cache needs to be updated only when `logging-parent` is updated + key: "nodejs-cache-${{ hashFiles('package-lock.json') }}" + # Only the NPM modules need to be cached, since Node.js and NPM are retrieved from the Maven local repository + path: node_modules + + - name: Build the website + shell: bash + run: | + ./mvnw \ + --show-version --batch-mode --errors --no-transfer-progress \ + site + cd target/site + find . -empty -type d -delete + find . -print0 | sort --zero-terminated | xargs -0 zip -qoX "$RUNNER_TEMP/site.zip" + echo "SOURCE_COMMIT_ID=$(git rev-parse HEAD)" >> $GITHUB_ENV + + - name: Set up Git user + shell: bash + run: | + # Set up user name and email required for `git commit` + git config user.name "ASF Logging Services RM" + git config user.email [email protected] + + # Checking out a new branch will delete the `node_modules` folder, + # so we need to save the cache here. + - name: Save Node.js cache + uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # 4.2.4 + with: + key: ${{ steps.nodejs-cache-restore.outputs.cache-primary-key }} + path: node_modules + + - name: Create the target branch + shell: bash + env: + TARGET_BRANCH: ${{ inputs.target-branch }} + run: | + git ls-remote --exit-code --heads origin "refs/heads/$TARGET_BRANCH" >/dev/null 2>&1 || { + echo "Remote branch \`$TARGET_BRANCH\` doesn't exist, creating it" + git checkout --orphan "$TARGET_BRANCH" + echo "Content for initializing an orphan branch for the website to be generated from \`$SOURCE_COMMIT_ID\`" > README.txt + git add README.txt + git commit -S README.txt -m "Initial content for the website to be generated from \`$SOURCE_COMMIT_ID\`" + git push origin "$TARGET_BRANCH" + } + + - name: Checkout the target branch + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 + with: + ref: ${{ inputs.target-branch }} + + - name: Update the target path + shell: bash + env: + TARGET_PATH: ${{ inputs.target-path }} + ASF_YAML_CONTENT: ${{ inputs.asf-yaml-content }} + run: | + # Check if there already exists an `.asf.yaml` + ASF_YAML_EXISTS=$([ -f .asf.yaml ] && echo "true" || echo "false") + + # Clean up the target path + git ls-files -z -- "$TARGET_PATH" | xargs -0 git rm -rfq + + # Place the generated site + unzip -q "$RUNNER_TEMP/site.zip" -d "$TARGET_PATH" + git add "$TARGET_PATH" + + # Recover `.asf.yaml`, if there was one. + # Otherwise `git status` will always show a change even when there are no changes in the website content. + # That is because we always populate `.asf.yaml` with some random values at the end to fix an INFRA issue. + if [ "$ASF_YAML_EXISTS" = "true" ]; then + git checkout HEAD .asf.yaml + fi + + # Commit changes, if there are any + if [ -n "$(git status --porcelain)" ]; then + + # Commit & push site changes + git commit -S -a -m "Add website content generated from \`$SOURCE_COMMIT_ID\`" + git push -f origin + + # Populate `.asf.yaml` + cat >.asf.yaml <<EOF + $ASF_YAML_CONTENT + + # INFRA cannot handle change sets bigger than a certain size: https://the-asf.slack.com/archives/CBX4TSBQ8/p1709724983391709 + # This file will be used to push a small commit to help the INFRA to recover. + # + # Random values to cause a change: + # + # - Seed: $RANDOM + # - Commit ID: $SOURCE_COMMIT_ID + # - Timestamp: $(date --utc '+%Y-%m-%dT%H:%M:%SZ') + EOF + git add .asf.yaml + git commit -S .asf.yaml -m "Add \`.asf.yaml\` along with an INFRA fix for the website content generated from \`$SOURCE_COMMIT_ID\`" + + # Push changes *separately*! + # A separate small commit push necessary due to the INFRA issue explained above. + git push -f origin + + fi diff --git a/.github/workflows/deploy-snapshot-reusable.yaml b/.github/workflows/deploy-snapshot-reusable.yaml new file mode 100644 index 0000000..b868a5d --- /dev/null +++ b/.github/workflows/deploy-snapshot-reusable.yaml @@ -0,0 +1,85 @@ +# +# 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-snapshot-reusable + +on: + workflow_call: + inputs: + java-version: + description: The Java compiler version + default: 17 + type: string + outputs: + project-version: + description: The version of the project + value: ${{ jobs.deploy.outputs.project-version }} + secrets: + NEXUS_USERNAME: + description: Nexus snapshot repository username for deploying artifacts + required: true + NEXUS_PASSWORD: + description: Nexus snapshot repository password for deploying artifacts + required: true + +# Explicitly drop all permissions inherited from the caller for security. +# Reference: https://docs.github.com/en/actions/sharing-automations/reusing-workflows#access-and-permissions +permissions: { } + +jobs: + deploy: + runs-on: ubuntu-latest + outputs: + project-version: ${{ steps.version.outputs.project-version }} + steps: + + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 + + - name: Set up Java + uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 3.7.0 + with: + distribution: zulu + java-version: ${{ inputs.java-version }} + cache: maven + server-id: apache.snapshots.https + server-username: NEXUS_USERNAME + server-password: NEXUS_PASSWORD + + - name: Export version + id: version + shell: bash + run: | + export PROJECT_VERSION=$(./mvnw \ + --quiet --batch-mode -DforceStdout=true \ + -Dexpression=project.version \ + help:evaluate \ + | tail -n 1) + echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_ENV + # Export version to calling workflow + echo "project-version=$PROJECT_VERSION" >> $GITHUB_OUTPUT + + - name: Upload to Nexus + shell: bash + env: + # `NEXUS_USERNAME` and `NEXUS_PASSWORD` are used in `~/.m2/settings.xml` created by `setup-java` action + NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} + NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + run: | + ./mvnw \ + --show-version --batch-mode --errors --no-transfer-progress \ + -P deploy diff --git a/.github/workflows/verify-reproducibility-reusable.yaml b/.github/workflows/verify-reproducibility-reusable.yaml new file mode 100644 index 0000000..a743210 --- /dev/null +++ b/.github/workflows/verify-reproducibility-reusable.yaml @@ -0,0 +1,115 @@ +# +# 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: verify-reproducibility-reusable + +on: + workflow_call: + inputs: + java-version: + description: The Java compiler version + default: 17 + type: string + maven-args: + description: Additional Maven arguments + type: string + nexus-url: + description: The URL of the reference Nexus repository + type: string + runs-on: + description: The type of runners to use as JSON array + default: '["ubuntu-latest"]' + type: string + +env: + MAVEN_ARGS: ${{ inputs.maven-args }} + NEXUS_URL: ${{ inputs.nexus-url }} + +# Explicitly drop all permissions inherited from the caller for security. +# Reference: https://docs.github.com/en/actions/sharing-automations/reusing-workflows#access-and-permissions +permissions: { } + +jobs: + + build: + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: ${{ fromJSON(inputs.runs-on) }} + + steps: + + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 + with: + ref: ${{ github.ref }} + + - name: Set up Java + uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0 + with: + distribution: zulu + java-version: ${{ inputs.java-version }} + + # + # Generates a cache key prefix to enable partial cache hits. + # If there's no exact match for the full cache key, any cache with this prefix can be used as a fallback. + # To avoid unbounded cache growth, the prefix includes the current month, + # ensuring a new cache is started each month. + # + - name: Compute Cache Key Prefix + shell: bash + run: | + date +"CACHE_KEY=verify-reproducibility-%Y-%m" >> $GITHUB_ENV + + # + # Configures caching for the local Maven repository. + # Uses a custom cache key to isolate artifacts built in this workflow, + # preventing reproducibility results from being affected by cached outputs from other workflows. + # + - name: Set up Maven Cache + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # 4.2.4 + with: + path: ~/.m2/repository + key: "${{ env.CACHE_KEY }}-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}" + restore-keys: | + ${{ env.CACHE_KEY }}-${{ runner.os }}- + + # `clean verify artifact:compare` is required to generate the build reproducibility report. + # For details, see: https://maven.apache.org/guides/mini/guide-reproducible-builds.html#how-to-test-my-maven-build-reproducibility + - name: Verify build reproducibility + shell: bash + run: | + ./mvnw \ + --show-version --batch-mode --errors --no-transfer-progress \ + -DskipTests=true \ + -Dreference.repo="${NEXUS_URL}" \ + clean verify artifact:compare + + # Upload reproducibility results if the build fails. + - name: Upload reproducibility results + if: failure() + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2 + with: + name: reproducibility-${{matrix.os}}-${{github.run_number}}-${{github.run_attempt}} + path: | + **/target/bom.xml + **/target/*.buildcompare + **/target/*.jar + **/target/*.zip + **/target/reference/** diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8338b2f --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +# 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. + +# Maven +target/ +.flattened-pom.xml +/.mvn/extensions.xml +/.mvn/wrapper/maven-wrapper.jar +# IDEA +.idea/ +*.iml +*.iws +# Eclipse +.project +.classpath +.settings/ +# Node.js +node +node_modules +# Visual Studio +/.vs/* diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed 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. diff --git a/NOTICE.txt b/NOTICE.txt new file mode 100644 index 0000000..6f6f3d9 --- /dev/null +++ b/NOTICE.txt @@ -0,0 +1,5 @@ +Apache Log4j Parent +Copyright 2022-2024 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). diff --git a/README.adoc b/README.adoc new file mode 100644 index 0000000..e769b81 --- /dev/null +++ b/README.adoc @@ -0,0 +1,19 @@ +//// +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. +//// + +GitHub Actions materials **internally** used in Maven-based projects of https://logging.apache.org[the Apache Logging Services] projects. +See https://logging.apache.org/logging-parent[the project website] for further information.
