Skip to content

Add Encode.forJson for JSON string values #95

Add Encode.forJson for JSON string values

Add Encode.forJson for JSON string values #95

Workflow file for this run

name: Java CI
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up JDK 17
uses: actions/setup-java@v6
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Check jakarta-test uses this build's encoder version
run: |
evaluate() {
mvn -B -ntp -q "$@" org.apache.maven.plugins:maven-help-plugin:3.5.2:evaluate -DforceStdout
}
reactor=$(evaluate -N -Dexpression=project.version) || { echo "$reactor"; exit 1; }
tested=$(evaluate -f jakarta-test/pom.xml -Dexpression=encoder.version) || { echo "$tested"; exit 1; }
if [ "$reactor" != "$tested" ]; then
echo "::error file=jakarta-test/pom.xml::encoder.version is '$tested' but the build is '$reactor'. Update jakarta-test/pom.xml when bumping the version."
exit 1
fi
echo "jakarta-test tests encoder-jakarta-jsp $tested from this build"
- name: Test clean reactor compilation
run: mvn -B -ntp clean test-compile
- name: Run build
run: mvn -B -ntp install -PtestJakarta
esapi-compatibility:
name: ESAPI ${{ matrix.esapi-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
esapi-version:
- '2.5.1.0'
- '2.5.2.0'
- '2.5.3.0'
- '2.5.3.1'
- '2.5.4.0'
- '2.5.5.0'
- '2.6.0.0'
- '2.6.1.0'
- '2.6.2.0'
- '2.7.0.0'
steps:
- uses: actions/checkout@v7
- name: Set up JDK 17
uses: actions/setup-java@v6
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Test ESAPI compatibility
run: mvn -B -ntp -pl esapi -am verify -Desapi.version=${{ matrix.esapi-version }}