ICU-23072 Support from JDK 11 up, drop support for JDK 8
Some checks are pending
GHA ICU4C / icu4c-docs-build (push) Waiting to run
GHA ICU4C / gcc11-cpp20 (push) Waiting to run
GHA ICU4C / clang-release-build-and-test (push) Waiting to run
GHA ICU4C / clang-options-build-and-test (--enable-static --disable-shared) (push) Waiting to run
GHA ICU4C / clang-options-build-and-test (--enable-static) (push) Waiting to run
GHA ICU4C / gcc-10-stdlib17 (push) Waiting to run
GHA ICU4C / clang-asan (push) Waiting to run
GHA ICU4C / clang18-cpp20-warning-as-errors (-std=c++20 -stdlib=libc++) (push) Waiting to run
GHA ICU4C / clang18-cpp20-warning-as-errors (-std=c++20) (push) Waiting to run
GHA ICU4C / macos-clang (push) Waiting to run
CIFuzz / Fuzzing (address) (push) Waiting to run
CIFuzz / Fuzzing (undefined) (push) Waiting to run
GHA ICU4C / gcc-debug-build-and-test (push) Waiting to run
GHA ICU4C / clang-lsan (push) Waiting to run
GHA ICU4C / clang-ubsan (push) Waiting to run
GHA ICU4C / clang-cfi (push) Waiting to run
GHA ICU4C / clang-tsan (push) Waiting to run
GHA ICU4C / clang-datafilter (push) Waiting to run
GHA ICU4C / clang-cpp17 (push) Waiting to run
GHA ICU4C / u-charset-is-utf8-test (push) Waiting to run
GHA ICU4C / u-override-cxx-allocation-is-0-test (push) Waiting to run
GHA ICU4C / lstm-test (push) Waiting to run
GHA ICU4C / adaboost-test (push) Waiting to run
GHA ICU4C / testmap (push) Waiting to run
GHA ICU4C / copyright-scan (push) Waiting to run
GHA ICU4C / internal-header-compilation (push) Waiting to run
GHA ICU4C / valid-UTF-8-and-no-BOM-check (push) Waiting to run
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_BREAK_ITERATION=1) (push) Waiting to run
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_COLLATION=1) (push) Waiting to run
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_FILTERED_BREAK_ITERATION=1) (push) Waiting to run
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_FORMATTING=1) (push) Waiting to run
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_IDNA=1) (push) Waiting to run
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_NORMALIZATION=1 -DUCONFIG_NO_BREAK_ITERATION=1 -DUCONFIG_NO_IDNA=1 -DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_MF2=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REGUL… (push) Waiting to run
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_LEGACY_CONVERSION=1) (push) Waiting to run
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_MF2=1) (push) Waiting to run
GHA ICU4C / clang-lang-with-extn-tags (push) Waiting to run
GHA ICU4C / windows-msvc (/p:Configuration=Debug /p:Platform=Win32, x86 Debug) (push) Waiting to run
GHA ICU4C / windows-msvc (/p:Configuration=Debug /p:Platform=x64, x64 Debug) (push) Waiting to run
GHA ICU4C / windows-msvc (/p:Configuration=Release /p:Platform=ARM, arm Release) (push) Waiting to run
GHA ICU4C / windows-msvc (/p:LanguageStandard=stdcpplatest /p:Configuration=Release /p:Platform=x64, x64 Release) (push) Waiting to run
GHA ICU4C / windows-msvc (/p:_HAS_EXCEPTIONS=0 /p:Configuration=Release /p:Platform=x64, x64 Release) (push) Waiting to run
GHA ICU4C / windows-msvc-datafilter (push) Waiting to run
GHA ICU4C / windows-msvc-dist-release (arm64, ARM64, WinARM64) (push) Waiting to run
GHA ICU4C / windows-msvc-dist-release (x64, x64, Win64) (push) Waiting to run
GHA ICU4C / windows-msvc-dist-release (x86, Win32, Win32) (push) Waiting to run
GHA ICU4C / windows-msys2-gcc-x86_64 (push) Waiting to run
GHA ICU4C / run-with-stubdata (push) Waiting to run
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_TRANSLITERATION=1) (push) Waiting to run
GHA ICU4C / unicode-update-tools (push) Waiting to run
GHA ICU4C / icu4c-test-samples (push) Waiting to run
GHA ICU4C / icu4c-without-collation-rule-strings (push) Waiting to run
GHA ICU4C / icu4c-uconfig-no-conversion (push) Waiting to run
GHA ICU4C / icu4c-icuexportdata (push) Waiting to run
GHA ICU4J / icu4j-mvn-init-cache (push) Waiting to run
GHA ICU4J / icu4j-mvn-build-and-test (11) (push) Blocked by required conditions
GHA ICU4J / icu4j-mvn-build-and-test (17) (push) Blocked by required conditions
GHA ICU4J / icu4j-mvn-build-and-test (21) (push) Blocked by required conditions
GHA ICU4J / lstm-icu4j-build-and-test (push) Blocked by required conditions
ICU Common / icu4j-mvn-init-cache (push) Waiting to run
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_NORMALIZATION=1) (push) Waiting to run
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_REGULAR_EXPRESSIONS=1) (push) Waiting to run
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_SERVICE=1) (push) Waiting to run
GHA ICU4C / uconfig-unit-tests (-DUCONFIG_NO_TRANSLITERATION=1) (push) Waiting to run
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_BREAK_ITERATION=1) (push) Waiting to run
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_COLLATION=1) (push) Waiting to run
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_FILTERED_BREAK_ITERATION=1) (push) Waiting to run
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_FORMATTING=1) (push) Waiting to run
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_IDNA=1) (push) Waiting to run
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_NORMALIZATION=1 -DUCONFIG_NO_BREAK_ITERATION=1 -DUCONFIG_NO_IDNA=1 -DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_MF2=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REG… (push) Waiting to run
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_LEGACY_CONVERSION=1) (push) Waiting to run
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_MF2=1) (push) Waiting to run
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_NORMALIZATION=1) (push) Waiting to run
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_REGULAR_EXPRESSIONS=1) (push) Waiting to run
GHA ICU4C / uconfig-header-tests (-DUCONFIG_NO_SERVICE=1) (push) Waiting to run
GHA ICU4J / adaboost-icu4j-build-and-test (push) Blocked by required conditions
ICU Common / copyright-scan (push) Waiting to run
ICU Common / valid-UTF-8-and-no-BOM-check (push) Waiting to run
GHA CI Valgrind / clang-valgrind-intltest (collator) (push) Waiting to run
GHA CI Valgrind / clang-valgrind-intltest (idna) (push) Waiting to run
GHA CI Valgrind / clang-valgrind-intltest (normalize) (push) Waiting to run
GHA CI Valgrind / clang-valgrind-intltest (rbbi) (push) Waiting to run
GHA CI Valgrind / clang-valgrind-intltest (rbnf) (push) Waiting to run
ICU Common / icu4c-release-tools (push) Blocked by required conditions
GHA ICU Docs / Test build of User Guide docs (push) Waiting to run
GHA CI Valgrind / clang-valgrind-test (push) Waiting to run
GHA CI Valgrind / clang-valgrind-intltest (bidi) (push) Waiting to run
GHA CI Valgrind / clang-valgrind-intltest (convert) (push) Waiting to run
GHA CI Valgrind / clang-valgrind-intltest (csdet) (push) Waiting to run
GHA CI Valgrind / clang-valgrind-intltest (format) (push) Waiting to run
GHA CI Valgrind / clang-valgrind-intltest (icuserv) (push) Waiting to run
GHA CI Valgrind / clang-valgrind-intltest (rbnfp) (push) Waiting to run
GHA CI Valgrind / clang-valgrind-intltest (rbnfrt) (push) Waiting to run
GHA CI Valgrind / clang-valgrind-intltest (regex) (push) Waiting to run
GHA CI Valgrind / clang-valgrind-intltest (spoof) (push) Waiting to run
GHA CI Valgrind / clang-valgrind-intltest (translit) (push) Waiting to run
GHA CI Valgrind / clang-valgrind-intltest (utility) (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run

This commit is contained in:
Mihai Nita 2025-03-31 13:19:40 -07:00
parent ee90520429
commit 7eb090f910
8 changed files with 43 additions and 253 deletions

View file

@ -60,7 +60,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
java-version: '11'
# Download all of the artifacts needed for the code and build plugins, but
# exclude any needed by profiles depending on system artifacts
- name: Download all artifacts
@ -75,7 +75,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java-version: [ '8', '11', '17', '21' ]
java-version: [ '11', '17', '21' ]
runs-on: ubuntu-22.04 # Updated in BRS
steps:
- name: Checkout and setup

View file

@ -66,7 +66,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
java-version: '11'
# Download all of the artifacts needed for the code and build plugins, but
# exclude any needed by profiles depending on system artifacts
- name: Download all artifacts

View file

@ -27,11 +27,16 @@ env:
permissions:
contents: read
# Using Java 11 because Java version not deemed significant for downloading artifacts,
# and is the lowest version we support, so the cached artifacts can be used by any other version.
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: '11'
jobs:
# Initialize the Maven artifact cache
# Uses Java 8 because Java version not deemed significant for downloading
# artifacts
#
# This job is created according to the cache strategy of reuse from a single job:
# https://github.com/actions/cache/blob/main/caching-strategies.md#make-cache-read-only--reuse-cache-from-centralized-job
@ -49,10 +54,6 @@ jobs:
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: '8'
# Download all of the artifacts needed for the code and build plugins
- name: Download all artifacts
run: |
@ -78,10 +79,6 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
lookup-only: true
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: '11'
- name: ICU4J little-endian
run: |
cd icu4c/source;
@ -342,11 +339,6 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
lookup-only: true
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: '8'
- name: Build and run unicodesetperf test
run: |
cd icu4j;
@ -354,9 +346,8 @@ jobs:
git status
cd perf-tests;
mkdir -p perf/results/j_unicodesetperf/${{ matrix.perf }};
mvn dependency:copy-dependencies
mvn dependency:copy-dependencies
java -cp ./target/*:./target/dependency/* com.ibm.icu.dev.test.perf.UnicodeSetPerf ${{ matrix.perf }} -a -t 2 -p 4 [:Lt:] | tee perf/results/j_unicodesetperf/${{ matrix.perf }}/output.txt
- name: Store performance test results
uses: gregtatum/github-action-benchmark@d3f06f738e9612988d575db23fae5ca0008d3d12
with:
@ -400,20 +391,14 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
lookup-only: true
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: '8'
- name: Build and run ucharacterperf test
run: |
cd icu4j;
mvn ${SHARED_MVN_ARGS} install -DskipITs -DskipTests;
cd perf-tests;
mkdir -p perf/results/j_ucharacterperf;
mvn dependency:copy-dependencies
mvn dependency:copy-dependencies
java -cp ./target/*:./target/dependency/* com.ibm.icu.dev.test.perf.UCharacterPerf -a -t 2 -p 4 0 ffff | tee perf/results/j_ucharacterperf/output.txt
- name: Store performance test results
uses: gregtatum/github-action-benchmark@d3f06f738e9612988d575db23fae5ca0008d3d12
with:
@ -460,11 +445,6 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
lookup-only: true
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: '8'
- name: Build and run decimalformatperf
run: |
cd icu4j;
@ -475,9 +455,8 @@ jobs:
# tests over 180 secs. minimizes the possibility of push conflicts when storing
# tests results in the data branch.
sleep $(($RANDOM % 180));
mvn dependency:copy-dependencies
mvn dependency:copy-dependencies
java -cp ./target/*:./target/dependency/* com.ibm.icu.dev.test.perf.DecimalFormatPerformanceTest ${{ matrix.perf }} -a -t 2 -p 4 -L ${{ matrix.locale }} "#,###.##" "1.234,56" -r 1 | tee perf/results/j_decimalformatperf/${{ matrix.locale }}/${{ matrix.perf }}/output.txt
- name: Store performance test results
uses: gregtatum/github-action-benchmark@d3f06f738e9612988d575db23fae5ca0008d3d12
with:
@ -525,11 +504,6 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
lookup-only: true
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: '8'
- name: Build and run normperf
env:
DATA_FILE_PATH: data/collation
@ -542,7 +516,7 @@ jobs:
# tests over 180 secs. minimizes the possibility of push conflicts when storing
# tests results in the data branch.
sleep $(($RANDOM % 180));
mvn dependency:copy-dependencies
mvn dependency:copy-dependencies
java -cp ./target/*:./target/dependency/* com.ibm.icu.dev.test.perf.NormalizerPerformanceTest ${{ matrix.perf }} -a -t 2 -p 4 -f $DATA_FILE_PATH/${{ matrix.source_text }}.txt -e UTF-8 ${{ matrix.mode }} | tee perf/results/j_normperf/${{ matrix.source_text }}/${{ matrix.perf }}/output.txt
cat perf/results/j_normperf/${{ matrix.source_text }}/${{ matrix.perf }}/output.txt
@ -660,11 +634,6 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
lookup-only: true
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: '8'
- name: Build and run converterperf
env:
DATA_FILE_PATH: data/conversion
@ -677,7 +646,7 @@ jobs:
# tests over 180 secs. minimizes the possibility of push conflicts when storing
# tests results in the data branch.
sleep $(($RANDOM % 180));
mvn dependency:copy-dependencies
mvn dependency:copy-dependencies
java -cp ./target/*:./target/dependency/* com.ibm.icu.dev.test.perf.ConverterPerformanceTest ${{ matrix.perf }} -a -t 2 -p 4 -f $DATA_FILE_PATH/${{ matrix.source_text }}.txt -e UTF-8 -T ${{ matrix.test_enc }} | tee perf/results/j_converterperf/${{ matrix.source_text }}/${{ matrix.test_enc }}/${{ matrix.perf }}/output.txt
- name: Store performance test results
@ -739,11 +708,6 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
lookup-only: true
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: '8'
- name: Extract identifying digit and parameter.
run: |
ddir='${{ matrix.parms }}';
@ -759,7 +723,7 @@ jobs:
# tests over 180 secs. minimizes the possibility of push conflicts when storing
# tests results in the data branch.
sleep $(($RANDOM % 180));
mvn dependency:copy-dependencies
mvn dependency:copy-dependencies
java -cp ./target/*:./target/dependency/* com.ibm.icu.dev.test.perf.DateFormatPerformanceTest ${{ matrix.perf }} -a -t 2 -p 4 -L ${{ matrix.locale }} ${{ env.PARM }} -r 1 | tee perf/results/j_dateformatperf/${{ matrix.locale }}/${{ matrix.perf }}/${{ env.DDIR }}/output.txt
- name: Store performance test results

View file

@ -55,7 +55,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4.2.2
with:
java-version: '8' # The custom Taglets for javadoc (tools/build) are still Java 8. They need updating to use a different JDK version.
java-version: '11'
distribution: 'temurin'
server-id: icu4j-maven-repo # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME # env variable for username in deploy

View file

@ -108,45 +108,13 @@
<include>**/*IT.java</include>
<include>**/*ITCase.java</include>
</includes>
<!--
For Java 8:
Set up the locale service provider using the .jar file of `icu4j-localespi` main code from the `package` phase
Leave empty for Java 9+.
Using the `java.ext.dirs` special Java system property on Java 9+ runtimes triggers an
error that tells the user to place those jars on the classpath instead.
-->
<!--
Notes:
https://stackoverflow.com/a/5039973/2077918
The `java.ext.dirs` is a special Java system property that activates the Java extension mechanism.
The Java extension mechanism was deprecated in Java 8 (users are recommended to use `-classpath` instead),
and the extension mechanism was removed in Java 9 altogether.
For backwards compatibility testing for users of the Java extension mechansim,
this configuration achieves the effect of having the localespi code in a .jar file that gets loaded
by running this test in a phase following the `package` phase in which the .jar file is created.
https://stackoverflow.com/questions/45223908/why-does-the-java-extension-mechanism-not-check-the-classpath-for-an-optional-pa
For some reason, the plugin was effectively not honoring the values as expected that were set in
<systemPropertyVariables>, so instead, the <argLine> value was used to set the JVM options. This
approach was inspired by: https://stackoverflow.com/a/48213614/2077918
-->
<argLine>${localespi-tests.jvm.args}</argLine>
<!--
For Java 9+:
Configure to use the locale service provider using the .jar file of `icu4j-localespi` main code from the `package` phase
Leave empty for Java 8 to take defaults ("SPI,JRE").
See: https://stackoverflow.com/questions/45223908/why-does-the-java-extension-mechanism-not-check-the-classpath-for-an-optional-pa
-->
<systemPropertyVariables>
<java.locale.providers>${localespi-tests.locale-providers}</java.locale.providers>
<java.locale.providers>CLDR,COMPAT,SPI</java.locale.providers>
</systemPropertyVariables>
</configuration>
</plugin>
@ -167,82 +135,6 @@
</build>
<profiles>
<!--
For testing localespi using the Java extensions feature, which last existed in Java 8.
ICU4J currently has a minimum supported version of 8.
-->
<profile>
<id>localespi-tests-java8</id>
<activation>
<jdk>(,8]</jdk>
</activation>
<properties>
<localespi-tests.jvm.args>-Djava.ext.dirs="${java.io.tmpdir}/ext-test-jars"</localespi-tests.jvm.args>
<localespi-tests.locale-providers></localespi-tests.locale-providers>
</properties>
<build>
<plugins>
<!--
Mainly for running localespi tests in Java 8:
The easiest way to get the integration tests to pass (in particular, to get the JVM that is
spawned with the `-Djava.ext.dirs` system property value to be interpreted properly in order
for the extensions jars therein to be loaded correctly) was to copy the jars needed to a
separate directory. (The alternative of pointing to the build directories of the respective
submodules didn't seem to work.)
This isn't of much use for Java 9+, in which extensions are deprecated and the regular
classpath is to be used instead.
-->
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>it-test-copy-localespi-extension-jars</id>
<phase>integration-test</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>icu4j</artifactId>
<version>${project.version}</version>
<type>${project.packaging}</type>
</artifactItem>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>icu4j-localespi</artifactId>
<version>${project.version}</version>
<type>${project.packaging}</type>
</artifactItem>
</artifactItems>
<!-- https://stackoverflow.com/questions/36181371/how-can-i-get-the-temp-folder-of-a-machine-running-maven -->
<outputDirectory>${java.io.tmpdir}/ext-test-jars</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!--
For testing localespi using the classpath for Java 9+, since Java extensions were
deprecated after Java 8.
-->
<profile>
<id>localespi-tests-java9</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<properties>
<localespi-tests.jvm.args></localespi-tests.jvm.args>
<localespi-tests.locale-providers>CLDR,COMPAT,SPI</localespi-tests.locale-providers>
</properties>
</profile>
<profile>
<id>with_javadoc</id>
<build>

View file

@ -43,14 +43,15 @@
<module>demos</module>
<module>samples</module>
<module>tools/build</module>
<module>tools/misc</module>
<module>tools/taglets</module>
<module>perf-tests</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release>
<maven-central-repo-url>https://oss.sonatype.org</maven-central-repo-url>
<maven-central-releases-repo-url>${maven-central-repo-url}/service/local/staging/deploy/maven2</maven-central-releases-repo-url>
@ -198,14 +199,7 @@
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<!-- Plugin bug, maven.compiler.* properties are not honored, see
https://issues.apache.org/jira/browse/MCOMPILER-545
-->
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
<version>3.14.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
@ -323,6 +317,9 @@
<requireMavenVersion>
<version>3.6.3</version>
</requireMavenVersion>
<requireJavaVersion>
<version>[11,)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
@ -658,36 +655,10 @@
</build>
</profile>
<!-- Starting with JDK 9, the Java compiler supports the release version.
Unlike source (checking the language features) and target (the version of the classes generated),
this option also checks that newer APIs are not used.
https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-release.html
Would be nice if the maven-compiler-plugin would filter this out below JDK 9, but it does not.
So we must use an auto-activated profile for this option.
-->
<profile>
<id>newer_jdk</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<modules>
<module>tools/build</module>
<module>tools/taglets</module>
</modules>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>8</release>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- mvn test -ntp -DskipTests -DskipITs -P errorprone -->
<!-- mvn clean test -ntp -DskipTests -DskipITs -l errorprone.log -P errorprone
Then inspect the content of the errorprone.log file.
We will have some script to convert that to a more friendly format (likely html) -->
<id>errorprone</id>
<build>
<plugins>
@ -695,11 +666,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
<!-- Use <compilerArg> to pass flags to errorprone. See https://errorprone.info/docs/flags -->
<showWarnings>true</showWarnings>
<failOnError>false</failOnError>
<fork>true</fork>
<!-- Use <compilerArg> to pass flags to errorprone. See https://errorprone.info/docs/flags -->
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<!--
@ -709,6 +679,18 @@
The drawback is that there are not errors now, they get mixed with the real warnings.
-->
<arg>-Xplugin:ErrorProne -XepAllErrorsAsWarnings</arg>
<arg>-Xmaxerrs</arg>
<arg>10000</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>

View file

@ -14,28 +14,4 @@
<artifactId>tools_build</artifactId>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<profiles>
<profile>
<id>newer_jdk</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>11</release>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View file

@ -14,28 +14,4 @@
<artifactId>tools_taglets</artifactId>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<profiles>
<profile>
<id>newer_jdk</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>11</release>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>