From b181b6bdef8c01d84a6db39f191c97a54e22426d Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Mon, 7 Oct 2024 14:13:17 +0200 Subject: [PATCH] Adjust java compiler arguments based on jdk version. --- clustercontroller-core/pom.xml | 2 +- config-model/pom.xml | 2 +- container-core/pom.xml | 2 +- container-search/pom.xml | 2 +- document/pom.xml | 2 +- documentgen-test/pom.xml | 2 +- hosted-tenant-base/pom.xml | 2 +- .../language-server/pom.xml | 2 +- parent/pom.xml | 20 ++++++++++++++++++- vespa-documentgen-plugin/pom.xml | 2 +- zkfacade/pom.xml | 2 +- zookeeper-command-line-client/pom.xml | 2 +- zookeeper-server/zookeeper-server/pom.xml | 2 +- 13 files changed, 31 insertions(+), 13 deletions(-) diff --git a/clustercontroller-core/pom.xml b/clustercontroller-core/pom.xml index 2a47980ebf88..9ea712c18025 100644 --- a/clustercontroller-core/pom.xml +++ b/clustercontroller-core/pom.xml @@ -126,7 +126,7 @@ - -Xlint:all + ${vespaCompilerArgs.xlint} -Xlint:-classfile -Xlint:-serial -Werror diff --git a/config-model/pom.xml b/config-model/pom.xml index a9fad54d7f47..35a405c156a9 100644 --- a/config-model/pom.xml +++ b/config-model/pom.xml @@ -306,7 +306,7 @@ maven-compiler-plugin - -Xlint:all + ${vespaCompilerArgs.xlint} -Xlint:-rawtypes -Xlint:-unchecked -Xlint:-serial diff --git a/container-core/pom.xml b/container-core/pom.xml index 793476843017..dbf17237776b 100644 --- a/container-core/pom.xml +++ b/container-core/pom.xml @@ -444,7 +444,7 @@ maven-compiler-plugin - -Xlint:all + ${vespaCompilerArgs.xlint} -Xlint:-rawtypes -Xlint:-unchecked -Xlint:-serial diff --git a/container-search/pom.xml b/container-search/pom.xml index cdfa0505375e..4a2ccd4b40a4 100644 --- a/container-search/pom.xml +++ b/container-search/pom.xml @@ -241,7 +241,7 @@ maven-compiler-plugin - -Xlint:all + ${vespaCompilerArgs.xlint} -Xlint:-rawtypes -Xlint:-unchecked -Xlint:-serial diff --git a/document/pom.xml b/document/pom.xml index 650c500a2605..5b0d88f26e05 100644 --- a/document/pom.xml +++ b/document/pom.xml @@ -102,7 +102,7 @@ maven-compiler-plugin - -Xlint:all + ${vespaCompilerArgs.xlint} -Xlint:-serial -Xlint:-rawtypes -Xlint:-unchecked diff --git a/documentgen-test/pom.xml b/documentgen-test/pom.xml index 398cf2adb8e4..4f2fe69ec703 100644 --- a/documentgen-test/pom.xml +++ b/documentgen-test/pom.xml @@ -64,7 +64,7 @@ maven-compiler-plugin - -Xlint:all + ${vespaCompilerArgs.xlint} -Xlint:-unchecked -Xlint:-serial -Werror diff --git a/hosted-tenant-base/pom.xml b/hosted-tenant-base/pom.xml index 96ac8fe475bf..5e17768b3489 100644 --- a/hosted-tenant-base/pom.xml +++ b/hosted-tenant-base/pom.xml @@ -535,7 +535,7 @@ true true - -Xlint:all + ${vespaCompilerArgs.xlint} -Werror diff --git a/integration/schema-language-server/language-server/pom.xml b/integration/schema-language-server/language-server/pom.xml index dccf184ba1a0..5f293ebc0988 100644 --- a/integration/schema-language-server/language-server/pom.xml +++ b/integration/schema-language-server/language-server/pom.xml @@ -76,7 +76,7 @@ maven-compiler-plugin - -Xlint:all + ${vespaCompilerArgs.xlint} -Xlint:-deprecation -Xlint:-unchecked -Xlint:-rawtypes diff --git a/parent/pom.xml b/parent/pom.xml index d99534219cb9..8ba55fa35c60 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -86,7 +86,7 @@ true false - -Xlint:all + ${vespaCompilerArgs.xlint} -Xlint:-serial -Xlint:-try -Xlint:-processing @@ -455,6 +455,24 @@ + + java17VespaCompilerArgs + + [1,21) + + + -Xlint:all + + + + java21VespaCompilerArgs + + [21,25) + + + -Xlint:all,-this-escape + + diff --git a/vespa-documentgen-plugin/pom.xml b/vespa-documentgen-plugin/pom.xml index d121c24363f8..2a2e84017ab4 100644 --- a/vespa-documentgen-plugin/pom.xml +++ b/vespa-documentgen-plugin/pom.xml @@ -82,7 +82,7 @@ maven-compiler-plugin - -Xlint:all + ${vespaCompilerArgs.xlint} -Xlint:-unchecked -Xlint:-processing -Werror diff --git a/zkfacade/pom.xml b/zkfacade/pom.xml index b8f74335336d..0d6281da135d 100644 --- a/zkfacade/pom.xml +++ b/zkfacade/pom.xml @@ -77,7 +77,7 @@ - -Xlint:all + ${vespaCompilerArgs.xlint} -Xlint:-classfile -Xlint:-serial -Xlint:-try diff --git a/zookeeper-command-line-client/pom.xml b/zookeeper-command-line-client/pom.xml index 719bf5aa9801..3ca932b10eb8 100644 --- a/zookeeper-command-line-client/pom.xml +++ b/zookeeper-command-line-client/pom.xml @@ -84,7 +84,7 @@ - -Xlint:all + ${vespaCompilerArgs.xlint} -Xlint:-classfile -Werror diff --git a/zookeeper-server/zookeeper-server/pom.xml b/zookeeper-server/zookeeper-server/pom.xml index 791c026234a4..70b09dbcda6f 100644 --- a/zookeeper-server/zookeeper-server/pom.xml +++ b/zookeeper-server/zookeeper-server/pom.xml @@ -75,7 +75,7 @@ - -Xlint:all + ${vespaCompilerArgs.xlint} -Xlint:-classfile -Werror