Skip to content

Bump org.apache.commons:commons-text from 1.10.0 to 1.12.0 #591

Bump org.apache.commons:commons-text from 1.10.0 to 1.12.0

Bump org.apache.commons:commons-text from 1.10.0 to 1.12.0 #591

Workflow file for this run

#-------------------------------------------------------------------------------
# Copyright 2023-2024 Norconex Inc.
#
# 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.
#-------------------------------------------------------------------------------
name: Maven Java CI
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Source checkout
uses: actions/checkout@v4
with:
# depth 0 means checkout all commits... we need that
# in case there are many commits in a push/PR
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v42.1.0
with:
dir_names: true
dir_names_max_depth: 2
write_output_files: true
files_ignore: |
./README.md
./TODO.txt
./V4_MIGRATION.md
**/README.md
**/TODO.txt
# - name: Build
# if: steps.changed-files.outputs.any_changed == 'true'
# run: |
# mvn_args="install"
# if [ ${{ github.event_name }} == 'pull_request' ]; then
# mvn_args="-Dgpg.skip=true install"
# fi
# if [ ${{ github.event_name }} == 'push' ] && [ ${{ github.repository }} == 'Norconex/crawlers' ]; then
# mvn_args="install sonar:sonar"
# fi
# if [ ${{ github.actor }} == 'dependabot[bot]' ]; then
# mvn_args="-Dgpg.skip=true -Dmaven.javadoc.skip=true package"
# fi
# echo "Maven args: clean ${mvn_args}"
# mvn clean ${mvn_args} -amd --batch-mode --threads=1
# env:
# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
# MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
# MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# We get changed Maven module so we only analyze those when dealing
# with pull requets.
- name: Get changed modules (PR only)
id: changed-modules
if: >
github.event_name == 'pull_request' &&
steps.changed-files.outputs.any_changed == 'true'
run: |
bash .github/workflows/scripts/changed-modules.sh
echo "any_changed=$(cat .github/outputs/any-module-changed.txt)" >> $GITHUB_OUTPUT
- name: Build
if: steps.changed-files.outputs.any_changed == 'true'
run: |
mvn_args="install"
if [ ${{ github.event_name }} == 'pull_request' ]; then
mvn_args="-Dgpg.skip=true -Dmaven.javadoc.skip=true install"
fi
if [ ${{ github.event_name }} == 'push' ] && [ ${{ github.repository }} == 'Norconex/crawlers' ]; then
mvn_args="-Dmaven.javadoc.skip=true install"
fi
if [[ "$GITHUB_ACTOR" == dependabot* ]]; then
mvn_args="-Dgpg.skip=true -Dmaven.javadoc.skip=true package"
fi
echo "Maven args: clean ${mvn_args}"
mvn clean ${mvn_args} -amd --batch-mode --threads=2
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: Analyze
if: >
steps.changed-files.outputs.any_changed == 'true' &&
startsWith(github.actor, 'dependabot') == false
# Note: As of this writing, for SonarCloud to work with monorepos,
# each projects must be analyzed separately.
run: |
dirs=""
if [ -f ".github/outputs/changed-module-dirs-deps.txt" ]; then
dirs=$(cat ".github/outputs/changed-module-dirs-deps.txt");
fi
if [ -z "$dirs" ]; then
dirs=$(bash ".github/workflows/scripts/all_project_dirs.sh");
fi
for dir in $dirs; do
echo "Analyzing ${dir}..."
(cd ${dir}; mvn sonar:sonar)
done
# run: |
# mvn sonar:sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Deploy (Push only)
if: >
github.repository == 'Norconex/crawlers' &&
github.event_name == 'push' &&
steps.changed-files.outputs.any_changed == 'true'
# run: |
# mvn jar:jar deploy:deploy --threads=2
run: |
mvn deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}