From ffe77218ef4f7f9fadc74b72f109a2175efe9fea Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 11 Jun 2026 10:17:45 +0200 Subject: [PATCH 01/19] #40: Updated dependencies --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 531e847..96d18af 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.exasol exasol-testcontainers - 7.2.3 + 7.3.0 test @@ -34,7 +34,7 @@ org.junit.jupiter junit-jupiter-params - 5.14.4 + 6.1.0 test @@ -58,7 +58,7 @@ org.slf4j slf4j-jdk14 - 2.0.17 + 2.0.18 test From 7e27f23a0efdc33f8db58f61ecc116c1ee86d24d Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 11 Jun 2026 10:25:08 +0200 Subject: [PATCH 02/19] #40: Fixed JavaDoc warning about wrong order of @serial and main Javadoc name. --- src/main/java/com/exasol/ExaConnectionAccessException.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/exasol/ExaConnectionAccessException.java b/src/main/java/com/exasol/ExaConnectionAccessException.java index 963f095..ed7659c 100644 --- a/src/main/java/com/exasol/ExaConnectionAccessException.java +++ b/src/main/java/com/exasol/ExaConnectionAccessException.java @@ -6,7 +6,10 @@ */ public class ExaConnectionAccessException extends Exception { private static final long serialVersionUID = 1L; - /** @serial Message without connection exception prefix. */ + /** + * Message without connection exception prefix. + * @serial + * */ private final String message; /** From a6e187588aeb402ee5dbd2c0e633bbc4ef2c60c1 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 11 Jun 2026 11:30:05 +0200 Subject: [PATCH 03/19] #40: Updated changelog. --- doc/changes/changes_1.0.10.md | 13 +++++++++---- pom.xml | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/doc/changes/changes_1.0.10.md b/doc/changes/changes_1.0.10.md index 93c642b..e4e13ad 100644 --- a/doc/changes/changes_1.0.10.md +++ b/doc/changes/changes_1.0.10.md @@ -1,18 +1,23 @@ -# Exasol UDF API for Java 1.0.10, released 2026-??-?? +# Exasol UDF API for Java 1.0.10, released 2026-06-11 -Code name: +Code name: UDF Code Coverage Reporting ## Summary -## Features +In this release we added the missing JaCoCo agent injection to the integration test, so that now the code coverage is reported properly. -* ISSUE_NUMBER: description +## Bugfixes + +* 40: Fixed code coverage reporting from UDF. ## Dependency Updates ### Test Dependency Updates +* Updated `com.exasol:exasol-testcontainers:7.2.3` to `7.3.0` * Added `org.jacoco:org.jacoco.agent:0.8.14` +* Updated `org.junit.jupiter:junit-jupiter-params:5.14.4` to `6.1.0` +* Updated `org.slf4j:slf4j-jdk14:2.0.17` to `2.0.18` ### Plugin Dependency Updates diff --git a/pom.xml b/pom.xml index 96d18af..a062227 100644 --- a/pom.xml +++ b/pom.xml @@ -64,6 +64,20 @@ + + + org.apache.maven.plugins + maven-compiler-plugin + 3.15.0 + + ${java.version} + true + + -Xlint:all + -Werror + + + com.exasol project-keeper-maven-plugin From 07a2a22a95948c91023910b2c5b1cf327d2fc1ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=A4r?= Date: Thu, 11 Jun 2026 13:37:39 +0200 Subject: [PATCH 04/19] #40: Fixed build for Java 17. Handled excluded Xerces because of CVE. --- .github/workflows/ci-build.yml | 47 ++--- .github/workflows/dependencies_check.yml | 15 +- .github/workflows/dependencies_update.yml | 9 +- .github/workflows/release.yml | 26 ++- .project-keeper.yml | 4 +- .settings/org.eclipse.jdt.core.prefs | 6 +- dependencies.md | 205 ++++++++++--------- doc/changes/changelog.md | 2 +- doc/changes/changes_1.0.10.md | 25 --- doc/changes/changes_2.0.0.md | 36 ++++ pk_generated_parent.pom | 2 +- pom.xml | 36 +++- src/test/java/com/exasol/test/JavaUdfIT.java | 21 +- 13 files changed, 237 insertions(+), 197 deletions(-) delete mode 100644 doc/changes/changes_1.0.10.md create mode 100644 doc/changes/changes_2.0.0.md diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index f6640ab..46a1829 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -33,13 +33,11 @@ jobs: fail-fast: false matrix: exasol_db_version: [ - 2025.2.1, - 2025.1.10, - 7.1.30 + 2026.1.0 ] env: { - DEFAULT_EXASOL_DB_VERSION: 2025.2.1 + DEFAULT_EXASOL_DB_VERSION: 2026.1.0 } steps: - name: Free Disk Space @@ -58,12 +56,11 @@ jobs: - name: Set up JDKs id: setup-java uses: actions/setup-java@v5 - with: - distribution: temurin - java-version: |- - 11 - 17 + with: { + distribution: temurin, + java-version: '17', cache: maven + } - name: Cache SonarCloud packages id: cache-sonar uses: actions/cache@v5 @@ -158,18 +155,18 @@ jobs: fetch-depth: 0, persist-credentials: false } - - name: Set up JDK 17 + - name: Set up JDK 21 id: setup-java uses: actions/setup-java@v5 with: { distribution: temurin, - java-version: '17', + java-version: '21', cache: maven } - - name: Run tests and build with Maven 17 + - name: Run tests and build with Maven 21 id: build-next-java run: | - mvn --batch-mode clean package -DtrimStackTrace=false -Djava.version=17 \ + mvn --batch-mode clean package -DtrimStackTrace=false -Djava.version=21 \ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ -DossindexSkip=true ossindex: @@ -195,15 +192,14 @@ jobs: - name: Set up JDKs id: setup-java uses: actions/setup-java@v5 - with: - distribution: temurin - java-version: |- - 11 - 17 - cache: maven - server-id: ossindex - server-username: OSSINDEX_USERNAME + with: { + distribution: temurin, + java-version: '17', + cache: maven, + server-id: ossindex, + server-username: OSSINDEX_USERNAME, server-password: OSSINDEX_API_TOKEN + } - name: Run Ossindex id: ossindex run: | @@ -273,12 +269,11 @@ jobs: - name: Set up JDKs id: setup-java uses: actions/setup-java@v5 - with: - distribution: temurin - java-version: |- - 11 - 17 + with: { + distribution: temurin, + java-version: '17', cache: maven + } - name: Check if release is needed id: check-release if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') }} diff --git a/.github/workflows/dependencies_check.yml b/.github/workflows/dependencies_check.yml index c7220ca..b813250 100644 --- a/.github/workflows/dependencies_check.yml +++ b/.github/workflows/dependencies_check.yml @@ -34,15 +34,14 @@ jobs: - name: Set up JDKs id: setup-jdks uses: actions/setup-java@v5 - with: - distribution: temurin - java-version: |- - 11 - 17 - cache: maven - server-id: ossindex - server-username: OSSINDEX_USERNAME + with: { + distribution: temurin, + java-version: '17', + cache: maven, + server-id: ossindex, + server-username: OSSINDEX_USERNAME, server-password: OSSINDEX_API_TOKEN + } - name: Generate ossindex report id: ossindex-report run: | diff --git a/.github/workflows/dependencies_update.yml b/.github/workflows/dependencies_update.yml index 73478fe..511f3a2 100644 --- a/.github/workflows/dependencies_update.yml +++ b/.github/workflows/dependencies_update.yml @@ -43,12 +43,11 @@ jobs: - name: Set up JDKs id: setup-jdks uses: actions/setup-java@v5 - with: - distribution: temurin - java-version: |- - 11 - 17 + with: { + distribution: temurin, + java-version: '17', cache: maven + } - name: Print issues id: debug-print-issues run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ca8846..3058c70 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -84,26 +84,24 @@ jobs: id: configure-maven-central-credentials if: ${{ true }} uses: actions/setup-java@v5 - with: - distribution: temurin - java-version: |- - 11 - 17 - server-id: maven-central-portal - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + with: { + distribution: temurin, + java-version: '17', + server-id: maven-central-portal, + server-username: MAVEN_USERNAME, + server-password: MAVEN_PASSWORD, + gpg-private-key: '${{ secrets.OSSRH_GPG_SECRET_KEY }}', gpg-passphrase: MAVEN_GPG_PASSPHRASE + } - name: Set up JDKs id: setup-jdks if: ${{ ! true }} uses: actions/setup-java@v5 - with: - distribution: temurin - java-version: |- - 11 - 17 + with: { + distribution: temurin, + java-version: '17', cache: maven + } - name: Fail if not running on main or release branch id: check-main-or-release-branch if: ${{ github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/heads/release/') }} diff --git a/.project-keeper.yml b/.project-keeper.yml index 196c776..eeca476 100644 --- a/.project-keeper.yml +++ b/.project-keeper.yml @@ -8,9 +8,7 @@ sources: build: runnerOs: ubuntu-24.04 exasolDbVersions: - - "2025.2.1" - - "2025.1.10" - - "7.1.30" + - "2026.1.0" workflows: - name: ci-build.yml stepCustomizations: diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index f5f6a72..ef2bcae 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -14,9 +14,9 @@ org.eclipse.jdt.core.compiler.annotation.owning=org.eclipse.jdt.annotation.Ownin org.eclipse.jdt.core.compiler.annotation.resourceanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -121,7 +121,7 @@ org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.processAnnotations=disabled org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 org.eclipse.jdt.core.formatter.align_arrows_in_switch_on_columns=false org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 diff --git a/dependencies.md b/dependencies.md index 5f54ffa..e879b85 100644 --- a/dependencies.md +++ b/dependencies.md @@ -1,105 +1,118 @@ # Dependencies +## Compile Dependencies + +| Dependency | License | +| ------------ | --------------------- | +| [aXMLRPC][0] | The MIT License (MIT) | + ## Test Dependencies -| Dependency | License | -| ---------------------------------------------- | -------------------------------- | -| [Test containers for Exasol on Docker][0] | [MIT License][1] | -| [Testcontainers :: JUnit Jupiter Extension][2] | [MIT][3] | -| [Test Database Builder for Java][4] | [MIT License][5] | -| [Matcher for SQL Result Sets][6] | [MIT License][7] | -| [JUnit Jupiter Params][8] | [Eclipse Public License v2.0][9] | -| [Hamcrest][10] | [BSD-3-Clause][11] | -| [mockito-junit-jupiter][12] | [MIT][13] | -| [Maven Project Version Getter][14] | [MIT License][15] | -| [SLF4J JDK14 Provider][16] | [MIT][17] | -| [JaCoCo :: Agent][18] | [EPL-2.0][19] | +| Dependency | License | +| ---------------------------------------------- | --------------------------------- | +| [exasol-test-setup-abstraction-java][1] | [MIT License][2] | +| [udf-debugging-java][3] | [MIT License][4] | +| [Test containers for Exasol on Docker][5] | [MIT License][6] | +| [Testcontainers :: JUnit Jupiter Extension][7] | [MIT][8] | +| [Test Database Builder for Java][9] | [MIT License][10] | +| [Matcher for SQL Result Sets][11] | [MIT License][12] | +| [JUnit Jupiter Params][13] | [Eclipse Public License v2.0][14] | +| [Hamcrest][15] | [BSD-3-Clause][16] | +| [mockito-junit-jupiter][17] | [MIT][18] | +| [Maven Project Version Getter][19] | [MIT License][20] | +| [SLF4J JDK14 Provider][21] | [MIT][22] | +| [JaCoCo :: Agent][23] | [EPL-2.0][24] | ## Plugin Dependencies -| Dependency | License | -| ------------------------------------------------------- | ------------------------------------------- | -| [SonarQube Scanner for Maven][20] | [GNU LGPL 3][21] | -| [Apache Maven Toolchains Plugin][22] | [Apache-2.0][23] | -| [Apache Maven Compiler Plugin][24] | [Apache-2.0][23] | -| [Apache Maven Enforcer Plugin][25] | [Apache-2.0][23] | -| [Maven Flatten Plugin][26] | [Apache Software License][23] | -| [org.sonatype.ossindex.maven:ossindex-maven-plugin][27] | [ASL2][28] | -| [Maven Surefire Plugin][29] | [Apache-2.0][23] | -| [Versions Maven Plugin][30] | [Apache License, Version 2.0][23] | -| [duplicate-finder-maven-plugin Maven Mojo][31] | [Apache License 2.0][32] | -| [Apache Maven Artifact Plugin][33] | [Apache-2.0][23] | -| [Apache Maven Deploy Plugin][34] | [Apache-2.0][23] | -| [Apache Maven GPG Plugin][35] | [Apache-2.0][23] | -| [Apache Maven Source Plugin][36] | [Apache-2.0][23] | -| [Apache Maven Javadoc Plugin][37] | [Apache-2.0][23] | -| [Central Publishing Maven Plugin][38] | [The Apache License, Version 2.0][23] | -| [Apache Maven Dependency Plugin][39] | [Apache-2.0][23] | -| [Maven Failsafe Plugin][40] | [Apache-2.0][23] | -| [JaCoCo :: Maven Plugin][41] | [EPL-2.0][19] | -| [Quality Summarizer Maven Plugin][42] | [MIT License][43] | -| [error-code-crawler-maven-plugin][44] | [MIT License][45] | -| [Git Commit Id Maven Plugin][46] | [GNU Lesser General Public License 3.0][47] | -| [Project Keeper Maven plugin][48] | [The MIT License][49] | -| [Apache Maven JAR Plugin][50] | [Apache-2.0][23] | -| [Apache Maven Clean Plugin][51] | [Apache-2.0][23] | -| [Apache Maven Resources Plugin][52] | [Apache-2.0][23] | -| [Apache Maven Install Plugin][53] | [Apache-2.0][23] | -| [Apache Maven Site Plugin][54] | [Apache-2.0][23] | +| Dependency | License | +| ------------------------------------------------------- | ---------------------------------------------- | +| [SonarQube Scanner for Maven][25] | [GNU LGPL 3][26] | +| [Apache Maven Toolchains Plugin][27] | [Apache-2.0][28] | +| [Apache Maven Compiler Plugin][29] | [Apache-2.0][28] | +| [Apache Maven Enforcer Plugin][30] | [Apache-2.0][28] | +| [Maven Flatten Plugin][31] | [Apache Software License][28] | +| [org.sonatype.ossindex.maven:ossindex-maven-plugin][32] | [ASL2][33] | +| [Maven Surefire Plugin][34] | [Apache-2.0][28] | +| [Versions Maven Plugin][35] | [Apache License, Version 2.0][28] | +| [duplicate-finder-maven-plugin Maven Mojo][36] | [Apache License 2.0][37] | +| [Apache Maven Artifact Plugin][38] | [Apache-2.0][28] | +| [Apache Maven Deploy Plugin][39] | [Apache-2.0][28] | +| [Apache Maven GPG Plugin][40] | [Apache-2.0][28] | +| [Apache Maven Source Plugin][41] | [Apache-2.0][28] | +| [Apache Maven Javadoc Plugin][42] | [Apache-2.0][28] | +| [Central Publishing Maven Plugin][43] | [The Apache License, Version 2.0][28] | +| [Apache Maven Dependency Plugin][44] | [Apache-2.0][28] | +| [Maven Failsafe Plugin][45] | [Apache-2.0][28] | +| [JaCoCo :: Maven Plugin][46] | [EPL-2.0][24] | +| [Quality Summarizer Maven Plugin][47] | [MIT License][48] | +| [error-code-crawler-maven-plugin][49] | [MIT License][50] | +| [Git Commit Id Maven Plugin][51] | [GNU Lesser General Public License 3.0][52] | +| [Project Keeper Maven plugin][53] | [The MIT License][54] | +| [Maven JAR Plugin][55] | [The Apache Software License, Version 2.0][33] | +| [Apache Maven Clean Plugin][56] | [Apache-2.0][28] | +| [Apache Maven Resources Plugin][57] | [Apache-2.0][28] | +| [Apache Maven Install Plugin][58] | [Apache-2.0][28] | +| [Apache Maven Site Plugin][59] | [Apache-2.0][28] | -[0]: https://github.com/exasol/exasol-testcontainers/ -[1]: https://github.com/exasol/exasol-testcontainers/blob/main/LICENSE -[2]: https://java.testcontainers.org -[3]: http://opensource.org/licenses/MIT -[4]: https://github.com/exasol/test-db-builder-java/ -[5]: https://github.com/exasol/test-db-builder-java/blob/main/LICENSE -[6]: https://github.com/exasol/hamcrest-resultset-matcher/ -[7]: https://github.com/exasol/hamcrest-resultset-matcher/blob/main/LICENSE -[8]: https://junit.org/ -[9]: https://www.eclipse.org/legal/epl-v20.html -[10]: http://hamcrest.org/JavaHamcrest/ -[11]: https://raw.githubusercontent.com/hamcrest/JavaHamcrest/master/LICENSE -[12]: https://github.com/mockito/mockito -[13]: https://opensource.org/licenses/MIT -[14]: https://github.com/exasol/maven-project-version-getter/ -[15]: https://github.com/exasol/maven-project-version-getter/blob/main/LICENSE -[16]: http://www.slf4j.org -[17]: https://opensource.org/license/mit -[18]: https://www.eclemma.org/jacoco/index.html -[19]: https://www.eclipse.org/legal/epl-2.0/ -[20]: https://docs.sonarsource.com/sonarqube-server/latest/extension-guide/developing-a-plugin/plugin-basics/sonar-scanner-maven/sonar-maven-plugin/ -[21]: http://www.gnu.org/licenses/lgpl.txt -[22]: https://maven.apache.org/plugins/maven-toolchains-plugin/ -[23]: https://www.apache.org/licenses/LICENSE-2.0.txt -[24]: https://maven.apache.org/plugins/maven-compiler-plugin/ -[25]: https://maven.apache.org/enforcer/maven-enforcer-plugin/ -[26]: https://www.mojohaus.org/flatten-maven-plugin/ -[27]: https://sonatype.github.io/ossindex-maven/maven-plugin/ -[28]: http://www.apache.org/licenses/LICENSE-2.0.txt -[29]: https://maven.apache.org/surefire/maven-surefire-plugin/ -[30]: https://www.mojohaus.org/versions/versions-maven-plugin/ -[31]: https://basepom.github.io/duplicate-finder-maven-plugin -[32]: http://www.apache.org/licenses/LICENSE-2.0.html -[33]: https://maven.apache.org/plugins/maven-artifact-plugin/ -[34]: https://maven.apache.org/plugins/maven-deploy-plugin/ -[35]: https://maven.apache.org/plugins/maven-gpg-plugin/ -[36]: https://maven.apache.org/plugins/maven-source-plugin/ -[37]: https://maven.apache.org/plugins/maven-javadoc-plugin/ -[38]: https://central.sonatype.org -[39]: https://maven.apache.org/plugins/maven-dependency-plugin/ -[40]: https://maven.apache.org/surefire/maven-failsafe-plugin/ -[41]: https://www.jacoco.org/jacoco/trunk/doc/maven.html -[42]: https://github.com/exasol/quality-summarizer-maven-plugin/ -[43]: https://github.com/exasol/quality-summarizer-maven-plugin/blob/main/LICENSE -[44]: https://github.com/exasol/error-code-crawler-maven-plugin/ -[45]: https://github.com/exasol/error-code-crawler-maven-plugin/blob/main/LICENSE -[46]: https://github.com/git-commit-id/git-commit-id-maven-plugin -[47]: http://www.gnu.org/licenses/lgpl-3.0.txt -[48]: https://github.com/exasol/project-keeper/ -[49]: https://github.com/exasol/project-keeper/blob/main/LICENSE -[50]: https://maven.apache.org/plugins/maven-jar-plugin/ -[51]: https://maven.apache.org/plugins/maven-clean-plugin/ -[52]: https://maven.apache.org/plugins/maven-resources-plugin/ -[53]: https://maven.apache.org/plugins/maven-install-plugin/ -[54]: https://maven.apache.org/plugins/maven-site-plugin/ +[0]: https://github.com/gturri/aXMLRPC +[1]: https://github.com/exasol/exasol-test-setup-abstraction-java/ +[2]: https://github.com/exasol/exasol-test-setup-abstraction-java/blob/main/LICENSE +[3]: https://github.com/exasol/udf-debugging-java/ +[4]: https://github.com/exasol/udf-debugging-java/blob/main/LICENSE +[5]: https://github.com/exasol/exasol-testcontainers/ +[6]: https://github.com/exasol/exasol-testcontainers/blob/main/LICENSE +[7]: https://java.testcontainers.org +[8]: http://opensource.org/licenses/MIT +[9]: https://github.com/exasol/test-db-builder-java/ +[10]: https://github.com/exasol/test-db-builder-java/blob/main/LICENSE +[11]: https://github.com/exasol/hamcrest-resultset-matcher/ +[12]: https://github.com/exasol/hamcrest-resultset-matcher/blob/main/LICENSE +[13]: https://junit.org/ +[14]: https://www.eclipse.org/legal/epl-v20.html +[15]: http://hamcrest.org/JavaHamcrest/ +[16]: https://raw.githubusercontent.com/hamcrest/JavaHamcrest/master/LICENSE +[17]: https://github.com/mockito/mockito +[18]: https://opensource.org/licenses/MIT +[19]: https://github.com/exasol/maven-project-version-getter/ +[20]: https://github.com/exasol/maven-project-version-getter/blob/main/LICENSE +[21]: http://www.slf4j.org +[22]: https://opensource.org/license/mit +[23]: https://www.eclemma.org/jacoco/index.html +[24]: https://www.eclipse.org/legal/epl-2.0/ +[25]: https://docs.sonarsource.com/sonarqube-server/latest/extension-guide/developing-a-plugin/plugin-basics/sonar-scanner-maven/sonar-maven-plugin/ +[26]: http://www.gnu.org/licenses/lgpl.txt +[27]: https://maven.apache.org/plugins/maven-toolchains-plugin/ +[28]: https://www.apache.org/licenses/LICENSE-2.0.txt +[29]: https://maven.apache.org/plugins/maven-compiler-plugin/ +[30]: https://maven.apache.org/enforcer/maven-enforcer-plugin/ +[31]: https://www.mojohaus.org/flatten-maven-plugin/ +[32]: https://sonatype.github.io/ossindex-maven/maven-plugin/ +[33]: http://www.apache.org/licenses/LICENSE-2.0.txt +[34]: https://maven.apache.org/surefire/maven-surefire-plugin/ +[35]: https://www.mojohaus.org/versions/versions-maven-plugin/ +[36]: https://basepom.github.io/duplicate-finder-maven-plugin +[37]: http://www.apache.org/licenses/LICENSE-2.0.html +[38]: https://maven.apache.org/plugins/maven-artifact-plugin/ +[39]: https://maven.apache.org/plugins/maven-deploy-plugin/ +[40]: https://maven.apache.org/plugins/maven-gpg-plugin/ +[41]: https://maven.apache.org/plugins/maven-source-plugin/ +[42]: https://maven.apache.org/plugins/maven-javadoc-plugin/ +[43]: https://central.sonatype.org +[44]: https://maven.apache.org/plugins/maven-dependency-plugin/ +[45]: https://maven.apache.org/surefire/maven-failsafe-plugin/ +[46]: https://www.jacoco.org/jacoco/trunk/doc/maven.html +[47]: https://github.com/exasol/quality-summarizer-maven-plugin/ +[48]: https://github.com/exasol/quality-summarizer-maven-plugin/blob/main/LICENSE +[49]: https://github.com/exasol/error-code-crawler-maven-plugin/ +[50]: https://github.com/exasol/error-code-crawler-maven-plugin/blob/main/LICENSE +[51]: https://github.com/git-commit-id/git-commit-id-maven-plugin +[52]: http://www.gnu.org/licenses/lgpl-3.0.txt +[53]: https://github.com/exasol/project-keeper/ +[54]: https://github.com/exasol/project-keeper/blob/main/LICENSE +[55]: http://maven.apache.org/plugins/maven-jar-plugin/ +[56]: https://maven.apache.org/plugins/maven-clean-plugin/ +[57]: https://maven.apache.org/plugins/maven-resources-plugin/ +[58]: https://maven.apache.org/plugins/maven-install-plugin/ +[59]: https://maven.apache.org/plugins/maven-site-plugin/ diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md index fbf6452..fc1ef2b 100644 --- a/doc/changes/changelog.md +++ b/doc/changes/changelog.md @@ -1,6 +1,6 @@ # Changes -* [1.0.10](changes_1.0.10.md) +* [2.0.0](changes_2.0.0.md) * [1.0.9](changes_1.0.9.md) * [1.0.8](changes_1.0.8.md) * [1.0.7](changes_1.0.7.md) diff --git a/doc/changes/changes_1.0.10.md b/doc/changes/changes_1.0.10.md deleted file mode 100644 index e4e13ad..0000000 --- a/doc/changes/changes_1.0.10.md +++ /dev/null @@ -1,25 +0,0 @@ -# Exasol UDF API for Java 1.0.10, released 2026-06-11 - -Code name: UDF Code Coverage Reporting - -## Summary - -In this release we added the missing JaCoCo agent injection to the integration test, so that now the code coverage is reported properly. - -## Bugfixes - -* 40: Fixed code coverage reporting from UDF. - -## Dependency Updates - -### Test Dependency Updates - -* Updated `com.exasol:exasol-testcontainers:7.2.3` to `7.3.0` -* Added `org.jacoco:org.jacoco.agent:0.8.14` -* Updated `org.junit.jupiter:junit-jupiter-params:5.14.4` to `6.1.0` -* Updated `org.slf4j:slf4j-jdk14:2.0.17` to `2.0.18` - -### Plugin Dependency Updates - -* Updated `com.exasol:project-keeper-maven-plugin:5.6.1` to `5.6.2` -* Added `org.apache.maven.plugins:maven-dependency-plugin:3.10.0` diff --git a/doc/changes/changes_2.0.0.md b/doc/changes/changes_2.0.0.md new file mode 100644 index 0000000..ad4a990 --- /dev/null +++ b/doc/changes/changes_2.0.0.md @@ -0,0 +1,36 @@ +# Exasol UDF API for Java 2.0.0, released 2026-06-11 + +Code name: Java 17 + +## Summary + +The Exasol UDF API is now built with Java 17. Java 11 is no longer supported. + +**This is a breaking change for [Exasol 7.1](https://docs.exasol.com/db/latest/planning/life_cycle/life_cycle_policy.htm#Exasol)** (which reaches end-of-life end of June 2026). + +If you still have UDF that require Java 11, please use release 1.0.9 of the API. Content-wise nothing changed except the JRE compatibility. + +In the course of the Java 17 switch, we also upgraded from JUnit 5 to 6 and added the missing JaCoCo agent injection to the integration test, so that now the code coverage is reported properly. + +## Bugfixes + +## Dependency Updates + +### Compile Dependency Updates + +* Added `fr.turri:aXMLRPC:1.17.0` + +### Test Dependency Updates + +* Added `com.exasol:exasol-test-setup-abstraction-java:2.1.11` +* Updated `com.exasol:exasol-testcontainers:7.2.3` to `7.3.0` +* Added `com.exasol:udf-debugging-java:0.6.18` +* Added `org.jacoco:org.jacoco.agent:0.8.14` +* Updated `org.junit.jupiter:junit-jupiter-params:5.14.4` to `6.1.0` +* Updated `org.slf4j:slf4j-jdk14:2.0.17` to `2.0.18` + +### Plugin Dependency Updates + +* Updated `com.exasol:project-keeper-maven-plugin:5.6.1` to `5.6.2` +* Added `org.apache.maven.plugins:maven-dependency-plugin:3.10.0` +* Updated `org.apache.maven.plugins:maven-jar-plugin:3.5.0` to `2.4` diff --git a/pk_generated_parent.pom b/pk_generated_parent.pom index 5852c10..1f2e099 100644 --- a/pk_generated_parent.pom +++ b/pk_generated_parent.pom @@ -3,7 +3,7 @@ 4.0.0 com.exasol udf-api-java-generated-parent - 1.0.10 + 2.0.0 pom UTF-8 diff --git a/pom.xml b/pom.xml index a062227..66a43bb 100644 --- a/pom.xml +++ b/pom.xml @@ -2,11 +2,38 @@ 4.0.0 udf-api-java - 1.0.10 + 2.0.0 Exasol UDF API for Java Interface between User Defined Functions (UDFs) written in Java and the Exasol database. https://github.com/exasol/udf-api-java/ + + 17 + + + com.exasol + exasol-test-setup-abstraction-java + 2.1.11 + test + + + com.exasol + udf-debugging-java + 0.6.18 + test + + + fr.turri + aXMLRPC + 1.17.0 + + + + xerces + xercesImpl + + + com.exasol exasol-testcontainers @@ -68,13 +95,11 @@ org.apache.maven.plugins maven-compiler-plugin - 3.15.0 ${java.version} true - -Xlint:all - -Werror + -Xlint:path @@ -93,7 +118,6 @@ org.apache.maven.plugins maven-jar-plugin - 3.5.0 @@ -113,7 +137,7 @@ udf-api-java-generated-parent com.exasol - 1.0.10 + 2.0.0 pk_generated_parent.pom diff --git a/src/test/java/com/exasol/test/JavaUdfIT.java b/src/test/java/com/exasol/test/JavaUdfIT.java index fad513e..26d7c0d 100644 --- a/src/test/java/com/exasol/test/JavaUdfIT.java +++ b/src/test/java/com/exasol/test/JavaUdfIT.java @@ -10,15 +10,17 @@ import java.util.concurrent.TimeoutException; import java.util.logging.Logger; +import com.exasol.dbbuilder.dialects.exasol.ExasolObjectConfiguration; +import com.exasol.exasoltestsetup.ExasolTestSetup; +import com.exasol.exasoltestsetup.ExasolTestSetupFactory; +import com.exasol.udfdebugging.UdfTestSetup; import org.junit.jupiter.api.*; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; -import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import com.exasol.bucketfs.Bucket; import com.exasol.bucketfs.BucketAccessException; -import com.exasol.containers.ExasolContainer; import com.exasol.dbbuilder.dialects.Schema; import com.exasol.dbbuilder.dialects.exasol.ExasolObjectFactory; import com.exasol.matcher.ResultSetStructureMatcher; @@ -41,10 +43,8 @@ */ @Testcontainers class JavaUdfIT { - @Container @SuppressWarnings("resource") // Will be closed by @Container annotation - private static final ExasolContainer> EXASOL = new ExasolContainer<>() - .withReuse(true); + private static final ExasolTestSetup EXASOL = new ExasolTestSetupFactory().getTestSetup(); private static final Logger LOGGER = Logger.getLogger(JavaUdfIT.class.getName()); private static final String PROJECT_VERSION = MavenProjectVersionGetter.getCurrentProjectVersion(); private static final String UDF_UNDER_TEST_JAR = "udf-api-java-" + PROJECT_VERSION + "-tests.jar"; @@ -55,11 +55,14 @@ class JavaUdfIT { private static Schema schema; @BeforeAll - static void beforeAll() throws BucketAccessException, FileNotFoundException { + static void beforeAll() throws BucketAccessException, FileNotFoundException, SQLException { connection = EXASOL.createConnection(); - final ExasolObjectFactory factory = new ExasolObjectFactory(connection); - schema = factory.createSchema("CONTEXT_SCHEMA"); - copyUdfUnderTestToDefaultBucket(); + try(final UdfTestSetup udfTestSetup=new UdfTestSetup(EXASOL, connection)) { + final ExasolObjectFactory factory = new ExasolObjectFactory(EXASOL.createConnection(), + ExasolObjectConfiguration.builder().withJvmOptions(udfTestSetup.getJvmOptions()).build()); + schema = factory.createSchema("CONTEXT_SCHEMA"); + copyUdfUnderTestToDefaultBucket(); + } } private static void copyUdfUnderTestToDefaultBucket() throws BucketAccessException, FileNotFoundException { From 8b2c14cc2dabc5c51c506d1a1f7fa5806131ece1 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 11 Jun 2026 13:55:42 +0200 Subject: [PATCH 05/19] #40: Fixed changelog. --- dependencies.md | 60 ++++++++++++++++++------------------ doc/changes/changes_2.0.0.md | 2 +- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/dependencies.md b/dependencies.md index e879b85..bcf5faf 100644 --- a/dependencies.md +++ b/dependencies.md @@ -26,35 +26,35 @@ ## Plugin Dependencies -| Dependency | License | -| ------------------------------------------------------- | ---------------------------------------------- | -| [SonarQube Scanner for Maven][25] | [GNU LGPL 3][26] | -| [Apache Maven Toolchains Plugin][27] | [Apache-2.0][28] | -| [Apache Maven Compiler Plugin][29] | [Apache-2.0][28] | -| [Apache Maven Enforcer Plugin][30] | [Apache-2.0][28] | -| [Maven Flatten Plugin][31] | [Apache Software License][28] | -| [org.sonatype.ossindex.maven:ossindex-maven-plugin][32] | [ASL2][33] | -| [Maven Surefire Plugin][34] | [Apache-2.0][28] | -| [Versions Maven Plugin][35] | [Apache License, Version 2.0][28] | -| [duplicate-finder-maven-plugin Maven Mojo][36] | [Apache License 2.0][37] | -| [Apache Maven Artifact Plugin][38] | [Apache-2.0][28] | -| [Apache Maven Deploy Plugin][39] | [Apache-2.0][28] | -| [Apache Maven GPG Plugin][40] | [Apache-2.0][28] | -| [Apache Maven Source Plugin][41] | [Apache-2.0][28] | -| [Apache Maven Javadoc Plugin][42] | [Apache-2.0][28] | -| [Central Publishing Maven Plugin][43] | [The Apache License, Version 2.0][28] | -| [Apache Maven Dependency Plugin][44] | [Apache-2.0][28] | -| [Maven Failsafe Plugin][45] | [Apache-2.0][28] | -| [JaCoCo :: Maven Plugin][46] | [EPL-2.0][24] | -| [Quality Summarizer Maven Plugin][47] | [MIT License][48] | -| [error-code-crawler-maven-plugin][49] | [MIT License][50] | -| [Git Commit Id Maven Plugin][51] | [GNU Lesser General Public License 3.0][52] | -| [Project Keeper Maven plugin][53] | [The MIT License][54] | -| [Maven JAR Plugin][55] | [The Apache Software License, Version 2.0][33] | -| [Apache Maven Clean Plugin][56] | [Apache-2.0][28] | -| [Apache Maven Resources Plugin][57] | [Apache-2.0][28] | -| [Apache Maven Install Plugin][58] | [Apache-2.0][28] | -| [Apache Maven Site Plugin][59] | [Apache-2.0][28] | +| Dependency | License | +| ------------------------------------------------------- | ------------------------------------------- | +| [SonarQube Scanner for Maven][25] | [GNU LGPL 3][26] | +| [Apache Maven Toolchains Plugin][27] | [Apache-2.0][28] | +| [Apache Maven Compiler Plugin][29] | [Apache-2.0][28] | +| [Apache Maven Enforcer Plugin][30] | [Apache-2.0][28] | +| [Maven Flatten Plugin][31] | [Apache Software License][28] | +| [org.sonatype.ossindex.maven:ossindex-maven-plugin][32] | [ASL2][33] | +| [Maven Surefire Plugin][34] | [Apache-2.0][28] | +| [Versions Maven Plugin][35] | [Apache License, Version 2.0][28] | +| [duplicate-finder-maven-plugin Maven Mojo][36] | [Apache License 2.0][37] | +| [Apache Maven Artifact Plugin][38] | [Apache-2.0][28] | +| [Apache Maven Deploy Plugin][39] | [Apache-2.0][28] | +| [Apache Maven GPG Plugin][40] | [Apache-2.0][28] | +| [Apache Maven Source Plugin][41] | [Apache-2.0][28] | +| [Apache Maven Javadoc Plugin][42] | [Apache-2.0][28] | +| [Central Publishing Maven Plugin][43] | [The Apache License, Version 2.0][28] | +| [Apache Maven Dependency Plugin][44] | [Apache-2.0][28] | +| [Maven Failsafe Plugin][45] | [Apache-2.0][28] | +| [JaCoCo :: Maven Plugin][46] | [EPL-2.0][24] | +| [Quality Summarizer Maven Plugin][47] | [MIT License][48] | +| [error-code-crawler-maven-plugin][49] | [MIT License][50] | +| [Git Commit Id Maven Plugin][51] | [GNU Lesser General Public License 3.0][52] | +| [Project Keeper Maven plugin][53] | [The MIT License][54] | +| [Apache Maven JAR Plugin][55] | [Apache-2.0][28] | +| [Apache Maven Clean Plugin][56] | [Apache-2.0][28] | +| [Apache Maven Resources Plugin][57] | [Apache-2.0][28] | +| [Apache Maven Install Plugin][58] | [Apache-2.0][28] | +| [Apache Maven Site Plugin][59] | [Apache-2.0][28] | [0]: https://github.com/gturri/aXMLRPC [1]: https://github.com/exasol/exasol-test-setup-abstraction-java/ @@ -111,7 +111,7 @@ [52]: http://www.gnu.org/licenses/lgpl-3.0.txt [53]: https://github.com/exasol/project-keeper/ [54]: https://github.com/exasol/project-keeper/blob/main/LICENSE -[55]: http://maven.apache.org/plugins/maven-jar-plugin/ +[55]: https://maven.apache.org/plugins/maven-jar-plugin/ [56]: https://maven.apache.org/plugins/maven-clean-plugin/ [57]: https://maven.apache.org/plugins/maven-resources-plugin/ [58]: https://maven.apache.org/plugins/maven-install-plugin/ diff --git a/doc/changes/changes_2.0.0.md b/doc/changes/changes_2.0.0.md index ad4a990..b6ceda0 100644 --- a/doc/changes/changes_2.0.0.md +++ b/doc/changes/changes_2.0.0.md @@ -33,4 +33,4 @@ In the course of the Java 17 switch, we also upgraded from JUnit 5 to 6 and adde * Updated `com.exasol:project-keeper-maven-plugin:5.6.1` to `5.6.2` * Added `org.apache.maven.plugins:maven-dependency-plugin:3.10.0` -* Updated `org.apache.maven.plugins:maven-jar-plugin:3.5.0` to `2.4` +* Updated `org.apache.maven.plugins:maven-jar-plugin:3.5.0` to `3.4.1` From 9da359af2bdf4555f090f7312e2462d2afc0b2c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=A4r?= Date: Thu, 11 Jun 2026 14:00:32 +0200 Subject: [PATCH 06/19] #40: Took dependency update list from CI. --- doc/changes/changes_2.0.0.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/changes/changes_2.0.0.md b/doc/changes/changes_2.0.0.md index ad4a990..9c0a906 100644 --- a/doc/changes/changes_2.0.0.md +++ b/doc/changes/changes_2.0.0.md @@ -33,4 +33,3 @@ In the course of the Java 17 switch, we also upgraded from JUnit 5 to 6 and adde * Updated `com.exasol:project-keeper-maven-plugin:5.6.1` to `5.6.2` * Added `org.apache.maven.plugins:maven-dependency-plugin:3.10.0` -* Updated `org.apache.maven.plugins:maven-jar-plugin:3.5.0` to `2.4` From ab780665ee4db647dfeceea07b2935286a31a63b Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 11 Jun 2026 14:06:41 +0200 Subject: [PATCH 07/19] #40: Added missing issue mention. --- doc/changes/changes_2.0.0.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/changes/changes_2.0.0.md b/doc/changes/changes_2.0.0.md index b6ceda0..b22d75f 100644 --- a/doc/changes/changes_2.0.0.md +++ b/doc/changes/changes_2.0.0.md @@ -14,6 +14,8 @@ In the course of the Java 17 switch, we also upgraded from JUnit 5 to 6 and adde ## Bugfixes +* #40: Report integration test coverage + ## Dependency Updates ### Compile Dependency Updates From 231de77bcafe459d472bc6371f365bba775cf21e Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 11 Jun 2026 14:11:08 +0200 Subject: [PATCH 08/19] #40: Remove Maven JAR plugin. --- doc/changes/changes_2.0.0.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/changes/changes_2.0.0.md b/doc/changes/changes_2.0.0.md index b22d75f..1b49d10 100644 --- a/doc/changes/changes_2.0.0.md +++ b/doc/changes/changes_2.0.0.md @@ -34,5 +34,4 @@ In the course of the Java 17 switch, we also upgraded from JUnit 5 to 6 and adde ### Plugin Dependency Updates * Updated `com.exasol:project-keeper-maven-plugin:5.6.1` to `5.6.2` -* Added `org.apache.maven.plugins:maven-dependency-plugin:3.10.0` -* Updated `org.apache.maven.plugins:maven-jar-plugin:3.5.0` to `3.4.1` +* Added `org.apache.maven.plugins:maven-dependency-plugin:3.10.0` \ No newline at end of file From daf337fbd613a7328f2ef1b9245e01e6e2550ae8 Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Thu, 11 Jun 2026 14:52:19 +0200 Subject: [PATCH 09/19] Run PK fix --- doc/changes/changes_2.0.0.md | 2 +- pom.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/changes/changes_2.0.0.md b/doc/changes/changes_2.0.0.md index 1b49d10..5a3b0ea 100644 --- a/doc/changes/changes_2.0.0.md +++ b/doc/changes/changes_2.0.0.md @@ -34,4 +34,4 @@ In the course of the Java 17 switch, we also upgraded from JUnit 5 to 6 and adde ### Plugin Dependency Updates * Updated `com.exasol:project-keeper-maven-plugin:5.6.1` to `5.6.2` -* Added `org.apache.maven.plugins:maven-dependency-plugin:3.10.0` \ No newline at end of file +* Added `org.apache.maven.plugins:maven-dependency-plugin:3.10.0` diff --git a/pom.xml b/pom.xml index 66a43bb..7d9a65c 100644 --- a/pom.xml +++ b/pom.xml @@ -118,9 +118,12 @@ org.apache.maven.plugins maven-jar-plugin + 3.5.0 + + test-jar From ff39196da43c1d5b17514d7842ce8f3a5d3e7610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=A4r?= Date: Fri, 12 Jun 2026 15:23:08 +0200 Subject: [PATCH 10/19] Refactored script creation to use database object factory. --- src/test/java/com/exasol/test/JavaUdfIT.java | 131 +++++++++---------- 1 file changed, 65 insertions(+), 66 deletions(-) diff --git a/src/test/java/com/exasol/test/JavaUdfIT.java b/src/test/java/com/exasol/test/JavaUdfIT.java index 26d7c0d..7aadc3f 100644 --- a/src/test/java/com/exasol/test/JavaUdfIT.java +++ b/src/test/java/com/exasol/test/JavaUdfIT.java @@ -7,10 +7,13 @@ import java.io.FileNotFoundException; import java.nio.file.Path; import java.sql.*; +import java.util.Locale; import java.util.concurrent.TimeoutException; import java.util.logging.Logger; import com.exasol.dbbuilder.dialects.exasol.ExasolObjectConfiguration; +import com.exasol.dbbuilder.dialects.exasol.ExasolSchema; +import com.exasol.dbbuilder.dialects.exasol.udf.UdfScript; import com.exasol.exasoltestsetup.ExasolTestSetup; import com.exasol.exasoltestsetup.ExasolTestSetupFactory; import com.exasol.udfdebugging.UdfTestSetup; @@ -21,7 +24,6 @@ import com.exasol.bucketfs.Bucket; import com.exasol.bucketfs.BucketAccessException; -import com.exasol.dbbuilder.dialects.Schema; import com.exasol.dbbuilder.dialects.exasol.ExasolObjectFactory; import com.exasol.matcher.ResultSetStructureMatcher; import com.exasol.mavenprojectversiongetter.MavenProjectVersionGetter; @@ -43,7 +45,6 @@ */ @Testcontainers class JavaUdfIT { - @SuppressWarnings("resource") // Will be closed by @Container annotation private static final ExasolTestSetup EXASOL = new ExasolTestSetupFactory().getTestSetup(); private static final Logger LOGGER = Logger.getLogger(JavaUdfIT.class.getName()); private static final String PROJECT_VERSION = MavenProjectVersionGetter.getCurrentProjectVersion(); @@ -52,17 +53,17 @@ class JavaUdfIT { private static final String JAR_INCLUDE_DIRECTIVE = "%jar /buckets/bfsdefault/default/" + UDF_UNDER_TEST_JAR; private static Connection connection; - private static Schema schema; + private static UdfTestSetup udfTestSetup; + private static ExasolSchema schema; @BeforeAll static void beforeAll() throws BucketAccessException, FileNotFoundException, SQLException { connection = EXASOL.createConnection(); - try(final UdfTestSetup udfTestSetup=new UdfTestSetup(EXASOL, connection)) { - final ExasolObjectFactory factory = new ExasolObjectFactory(EXASOL.createConnection(), - ExasolObjectConfiguration.builder().withJvmOptions(udfTestSetup.getJvmOptions()).build()); - schema = factory.createSchema("CONTEXT_SCHEMA"); - copyUdfUnderTestToDefaultBucket(); - } + udfTestSetup=new UdfTestSetup(EXASOL, connection); + final ExasolObjectFactory factory = new ExasolObjectFactory(connection, + ExasolObjectConfiguration.builder().withJvmOptions(udfTestSetup.getJvmOptions()).build()); + schema = factory.createSchema("CONTEXT_SCHEMA"); + copyUdfUnderTestToDefaultBucket(); } private static void copyUdfUnderTestToDefaultBucket() throws BucketAccessException, FileNotFoundException { @@ -82,46 +83,38 @@ static void afterAll() throws SQLException { if ((connection != null) && !connection.isClosed()) { connection.close(); } + if (udfTestSetup != null) { + udfTestSetup.close(); + } } - @CsvSource({ // - "getDatabaseName, DB1", // - "getDatabaseVersion, \\d+\\.\\d+\\.\\d+", // - "getNodeCount, 1", // - "getOutputType, RETURN", // - "getScopeUser, SYS", // - "getScriptCode, %jar(?:\\R|.)*class(?:\\R|.)*", // - "getScriptSchema, CONTEXT_SCHEMA", // - "getScriptName, CONTEXT_METHOD_GETSCRIPTNAME", // + @CsvSource({ + "getDatabaseName, DB1", + "getDatabaseVersion, \\d+\\.\\d+\\.\\d+", + "getNodeCount, 1", + "getOutputType, RETURN", + "getScopeUser, SYS", + "getScriptCode, %jvmoption(?:\\R|.)*%jar(?:\\R|.)*class(?:\\R|.)*", + "getScriptSchema, CONTEXT_SCHEMA", + "getScriptName, CONTEXT_METHOD_GETSCRIPTNAME", "getScriptLanguage, Java \\d+\\.\\d+.\\d+" }) @ParameterizedTest void testGetDatabaseContextInformation(final String methodName, final String expectedResult) { - final String fullyQualifiedScriptName = createContextMethodTestScript(schema, methodName); - final String value = executeScalarScriptWithStringReturn(fullyQualifiedScriptName, methodName); - assertThat("Result of method " + methodName + "()", value, matchesPattern(expectedResult)); - } - - private String createContextMethodTestScript(final Schema schema, final String methodName) { - final String scriptName = "CONTEXT_METHOD_" + methodName.toUpperCase(); - final String fullyQualifiedScriptName = getFullyQualifiedScriptName(schema, scriptName); - executeStatement("CREATE JAVA SCALAR SCRIPT " + fullyQualifiedScriptName // - + "(method_name VARCHAR(100)) RETURNS VARCHAR(2000) AS\n" // - + " " + JAR_INCLUDE_DIRECTIVE + ";\n" // - + " %scriptclass com.exasol.test.testobject.MetadataMethodExerciser;\n" // - + "\n/\n"); - return fullyQualifiedScriptName; - } - - private static String getFullyQualifiedScriptName(final Schema schema, final String scriptName) { - return "\"" + schema.getName() + "\".\"" + scriptName + "\""; + try(final UdfScript script = createContextMethodTestScript(methodName)) { + final String value = executeScalarScriptWithStringReturn(script.getFullyQualifiedName(), methodName); + assertThat("Result of method " + methodName + "()", value, matchesPattern(expectedResult)); + } } - private static void executeStatement(final String sql) { - try (final Statement statement = connection.createStatement()) { - statement.execute(sql); - } catch (final SQLException exception) { - throw new AssertionError("Unable to execute statement:\n" + sql + "\n", exception); - } + private UdfScript createContextMethodTestScript(final String methodName) { + final String scriptName = "CONTEXT_METHOD_" + methodName.toUpperCase(Locale.ENGLISH); + return schema.createUdfBuilder(scriptName) + .parameter("method_name", "VARCHAR(100)") + .inputType(UdfScript.InputType.SCALAR) + .language(UdfScript.Language.JAVA) + .content(JAR_INCLUDE_DIRECTIVE + ";\n%scriptclass com.exasol.test.testobject.MetadataMethodExerciser;") + .returns("VARCHAR(2000)") + .build(); } private String executeScalarScriptWithStringReturn(final String fullyQualifiedScriptName, final String methodName) { @@ -139,16 +132,17 @@ private String executeScalarScriptWithStringReturn(final String fullyQualifiedSc void testGetTimestampFromSetScript() { final String date = "2001-02-03"; final String time = "04:05:06.007"; - final String scriptName = "GET_TIMESTAMP_SCRIPT"; - final String fullyQualifiedScriptName = getFullyQualifiedScriptName(schema, scriptName); - executeStatement("CREATE JAVA SET SCRIPT " + fullyQualifiedScriptName // - + "(V TIMESTAMP) RETURNS VARCHAR(2000) AS\n" // - + " " + JAR_INCLUDE_DIRECTIVE + ";\n" // - + " %scriptclass com.exasol.test.testobject.GetTimestampUdf;\n" // - + "/\n"); - assertQueryResult("SELECT " + fullyQualifiedScriptName + "(T.V)" + // - "FROM VALUES (TO_TIMESTAMP('" + date + "T" + time + "Z', 'YYYY-MM-DDTHH24:MI:SS.FF3Z')) AS T(V)", // - table().row(date + " " + time)); + try(UdfScript script = schema.createUdfBuilder("GET_TIMESTAMP_SCRIPT") + .parameter("V", "TIMESTAMP") + .language(UdfScript.Language.JAVA) + .inputType(UdfScript.InputType.SET) + .content(JAR_INCLUDE_DIRECTIVE +";\n%scriptclass com.exasol.test.testobject.GetTimestampUdf;") + .returns("VARCHAR(2000)") + .build()) { + assertQueryResult("SELECT " + script.getFullyQualifiedName() + "(T.V)" + + " FROM VALUES (TO_TIMESTAMP('" + date + "T" + time + "Z', 'YYYY-MM-DDTHH24:MI:SS.FF3Z')) AS T(V)", + table().row(date + " " + time)); + } } private static void assertQueryResult(final String sql, final ResultSetStructureMatcher.Builder rowMatcher) { @@ -162,24 +156,29 @@ private static void assertQueryResult(final String sql, final ResultSetStructure @Test void testGetSizeFromScalarScript() { - final String scriptName = "SIZE_IN_SCALAR_CONTEXT"; - final String fullyQualifiedScriptName = getFullyQualifiedScriptName(schema, scriptName); - executeStatement("CREATE JAVA SCALAR SCRIPT " + fullyQualifiedScriptName + "() RETURNS INTEGER AS\n" // - + " " + JAR_INCLUDE_DIRECTIVE + ";\n" // - + " %scriptclass com.exasol.test.testobject.GetSizeUdf;\n" // - + "/\n"); - assertQueryResult("SELECT " + fullyQualifiedScriptName + "()", table().row(1L)); + try(final UdfScript script = schema.createUdfBuilder("SIZE_IN_SCALAR_CONTEXT") + .language(UdfScript.Language.JAVA) + .inputType(UdfScript.InputType.SCALAR) + .content(JAR_INCLUDE_DIRECTIVE + ";\n%scriptclass com.exasol.test.testobject.GetSizeUdf;") + .returns("INTEGER") + .build()) { + assertQueryResult("SELECT " + script.getFullyQualifiedName() + "()", table().row(1L)); + } } @Test void testGetSizeFromSetScript() { final String scriptName = "SIZE_IN_SET_CONTEXT"; - final String fullyQualifiedScriptName = getFullyQualifiedScriptName(schema, scriptName); - executeStatement("CREATE JAVA SET SCRIPT " + fullyQualifiedScriptName + "(COL CHAR(1)) RETURNS INTEGER AS\n" // - + " " + JAR_INCLUDE_DIRECTIVE + ";\n" // - + " %scriptclass com.exasol.test.testobject.GetSizeUdf;\n" // - + "/\n"); - assertQueryResult("SELECT " + fullyQualifiedScriptName + "(v) FROM VALUES ('a'), ('b'), ('c') AS v(v)", // - table().row(3L)); + try(final UdfScript script = schema.createUdfBuilder(scriptName) + .parameter("COL", "CHAR(1)") + .language(UdfScript.Language.JAVA) + .inputType(UdfScript.InputType.SET) + .content(JAR_INCLUDE_DIRECTIVE + ";\n%scriptclass com.exasol.test.testobject.GetSizeUdf;") + .returns("INTEGER") + .build() + ) { + assertQueryResult("SELECT " + script.getFullyQualifiedName() + "(v) FROM VALUES ('a'), ('b'), ('c') AS v(v)", + table().row(3L)); + } } } From e57e688149d76ddd3ad48b106ccfd33b0fe69e85 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Mon, 15 Jun 2026 13:14:43 +0200 Subject: [PATCH 11/19] #40: Moved XMLRPC exclusion one level up. --- dependencies.md | 203 +++++++++++++++++------------------ doc/changes/changes_2.0.0.md | 4 - pom.xml | 21 ++-- 3 files changed, 107 insertions(+), 121 deletions(-) diff --git a/dependencies.md b/dependencies.md index bcf5faf..6abeff8 100644 --- a/dependencies.md +++ b/dependencies.md @@ -1,118 +1,111 @@ # Dependencies -## Compile Dependencies - -| Dependency | License | -| ------------ | --------------------- | -| [aXMLRPC][0] | The MIT License (MIT) | - ## Test Dependencies | Dependency | License | | ---------------------------------------------- | --------------------------------- | -| [exasol-test-setup-abstraction-java][1] | [MIT License][2] | -| [udf-debugging-java][3] | [MIT License][4] | -| [Test containers for Exasol on Docker][5] | [MIT License][6] | -| [Testcontainers :: JUnit Jupiter Extension][7] | [MIT][8] | -| [Test Database Builder for Java][9] | [MIT License][10] | -| [Matcher for SQL Result Sets][11] | [MIT License][12] | -| [JUnit Jupiter Params][13] | [Eclipse Public License v2.0][14] | -| [Hamcrest][15] | [BSD-3-Clause][16] | -| [mockito-junit-jupiter][17] | [MIT][18] | -| [Maven Project Version Getter][19] | [MIT License][20] | -| [SLF4J JDK14 Provider][21] | [MIT][22] | -| [JaCoCo :: Agent][23] | [EPL-2.0][24] | +| [exasol-test-setup-abstraction-java][0] | [MIT License][1] | +| [udf-debugging-java][2] | [MIT License][3] | +| [Test containers for Exasol on Docker][4] | [MIT License][5] | +| [Testcontainers :: JUnit Jupiter Extension][6] | [MIT][7] | +| [Test Database Builder for Java][8] | [MIT License][9] | +| [Matcher for SQL Result Sets][10] | [MIT License][11] | +| [JUnit Jupiter Params][12] | [Eclipse Public License v2.0][13] | +| [Hamcrest][14] | [BSD-3-Clause][15] | +| [mockito-junit-jupiter][16] | [MIT][17] | +| [Maven Project Version Getter][18] | [MIT License][19] | +| [SLF4J JDK14 Provider][20] | [MIT][21] | +| [JaCoCo :: Agent][22] | [EPL-2.0][23] | ## Plugin Dependencies | Dependency | License | | ------------------------------------------------------- | ------------------------------------------- | -| [SonarQube Scanner for Maven][25] | [GNU LGPL 3][26] | -| [Apache Maven Toolchains Plugin][27] | [Apache-2.0][28] | -| [Apache Maven Compiler Plugin][29] | [Apache-2.0][28] | -| [Apache Maven Enforcer Plugin][30] | [Apache-2.0][28] | -| [Maven Flatten Plugin][31] | [Apache Software License][28] | -| [org.sonatype.ossindex.maven:ossindex-maven-plugin][32] | [ASL2][33] | -| [Maven Surefire Plugin][34] | [Apache-2.0][28] | -| [Versions Maven Plugin][35] | [Apache License, Version 2.0][28] | -| [duplicate-finder-maven-plugin Maven Mojo][36] | [Apache License 2.0][37] | -| [Apache Maven Artifact Plugin][38] | [Apache-2.0][28] | -| [Apache Maven Deploy Plugin][39] | [Apache-2.0][28] | -| [Apache Maven GPG Plugin][40] | [Apache-2.0][28] | -| [Apache Maven Source Plugin][41] | [Apache-2.0][28] | -| [Apache Maven Javadoc Plugin][42] | [Apache-2.0][28] | -| [Central Publishing Maven Plugin][43] | [The Apache License, Version 2.0][28] | -| [Apache Maven Dependency Plugin][44] | [Apache-2.0][28] | -| [Maven Failsafe Plugin][45] | [Apache-2.0][28] | -| [JaCoCo :: Maven Plugin][46] | [EPL-2.0][24] | -| [Quality Summarizer Maven Plugin][47] | [MIT License][48] | -| [error-code-crawler-maven-plugin][49] | [MIT License][50] | -| [Git Commit Id Maven Plugin][51] | [GNU Lesser General Public License 3.0][52] | -| [Project Keeper Maven plugin][53] | [The MIT License][54] | -| [Apache Maven JAR Plugin][55] | [Apache-2.0][28] | -| [Apache Maven Clean Plugin][56] | [Apache-2.0][28] | -| [Apache Maven Resources Plugin][57] | [Apache-2.0][28] | -| [Apache Maven Install Plugin][58] | [Apache-2.0][28] | -| [Apache Maven Site Plugin][59] | [Apache-2.0][28] | +| [SonarQube Scanner for Maven][24] | [GNU LGPL 3][25] | +| [Apache Maven Toolchains Plugin][26] | [Apache-2.0][27] | +| [Apache Maven Compiler Plugin][28] | [Apache-2.0][27] | +| [Apache Maven Enforcer Plugin][29] | [Apache-2.0][27] | +| [Maven Flatten Plugin][30] | [Apache Software License][27] | +| [org.sonatype.ossindex.maven:ossindex-maven-plugin][31] | [ASL2][32] | +| [Maven Surefire Plugin][33] | [Apache-2.0][27] | +| [Versions Maven Plugin][34] | [Apache License, Version 2.0][27] | +| [duplicate-finder-maven-plugin Maven Mojo][35] | [Apache License 2.0][36] | +| [Apache Maven Artifact Plugin][37] | [Apache-2.0][27] | +| [Apache Maven Deploy Plugin][38] | [Apache-2.0][27] | +| [Apache Maven GPG Plugin][39] | [Apache-2.0][27] | +| [Apache Maven Source Plugin][40] | [Apache-2.0][27] | +| [Apache Maven Javadoc Plugin][41] | [Apache-2.0][27] | +| [Central Publishing Maven Plugin][42] | [The Apache License, Version 2.0][27] | +| [Apache Maven Dependency Plugin][43] | [Apache-2.0][27] | +| [Maven Failsafe Plugin][44] | [Apache-2.0][27] | +| [JaCoCo :: Maven Plugin][45] | [EPL-2.0][23] | +| [Quality Summarizer Maven Plugin][46] | [MIT License][47] | +| [error-code-crawler-maven-plugin][48] | [MIT License][49] | +| [Git Commit Id Maven Plugin][50] | [GNU Lesser General Public License 3.0][51] | +| [Project Keeper Maven plugin][52] | [The MIT License][53] | +| [Apache Maven JAR Plugin][54] | [Apache-2.0][27] | +| [Apache Maven Clean Plugin][55] | [Apache-2.0][27] | +| [Apache Maven Resources Plugin][56] | [Apache-2.0][27] | +| [Apache Maven Install Plugin][57] | [Apache-2.0][27] | +| [Apache Maven Site Plugin][58] | [Apache-2.0][27] | -[0]: https://github.com/gturri/aXMLRPC -[1]: https://github.com/exasol/exasol-test-setup-abstraction-java/ -[2]: https://github.com/exasol/exasol-test-setup-abstraction-java/blob/main/LICENSE -[3]: https://github.com/exasol/udf-debugging-java/ -[4]: https://github.com/exasol/udf-debugging-java/blob/main/LICENSE -[5]: https://github.com/exasol/exasol-testcontainers/ -[6]: https://github.com/exasol/exasol-testcontainers/blob/main/LICENSE -[7]: https://java.testcontainers.org -[8]: http://opensource.org/licenses/MIT -[9]: https://github.com/exasol/test-db-builder-java/ -[10]: https://github.com/exasol/test-db-builder-java/blob/main/LICENSE -[11]: https://github.com/exasol/hamcrest-resultset-matcher/ -[12]: https://github.com/exasol/hamcrest-resultset-matcher/blob/main/LICENSE -[13]: https://junit.org/ -[14]: https://www.eclipse.org/legal/epl-v20.html -[15]: http://hamcrest.org/JavaHamcrest/ -[16]: https://raw.githubusercontent.com/hamcrest/JavaHamcrest/master/LICENSE -[17]: https://github.com/mockito/mockito -[18]: https://opensource.org/licenses/MIT -[19]: https://github.com/exasol/maven-project-version-getter/ -[20]: https://github.com/exasol/maven-project-version-getter/blob/main/LICENSE -[21]: http://www.slf4j.org -[22]: https://opensource.org/license/mit -[23]: https://www.eclemma.org/jacoco/index.html -[24]: https://www.eclipse.org/legal/epl-2.0/ -[25]: https://docs.sonarsource.com/sonarqube-server/latest/extension-guide/developing-a-plugin/plugin-basics/sonar-scanner-maven/sonar-maven-plugin/ -[26]: http://www.gnu.org/licenses/lgpl.txt -[27]: https://maven.apache.org/plugins/maven-toolchains-plugin/ -[28]: https://www.apache.org/licenses/LICENSE-2.0.txt -[29]: https://maven.apache.org/plugins/maven-compiler-plugin/ -[30]: https://maven.apache.org/enforcer/maven-enforcer-plugin/ -[31]: https://www.mojohaus.org/flatten-maven-plugin/ -[32]: https://sonatype.github.io/ossindex-maven/maven-plugin/ -[33]: http://www.apache.org/licenses/LICENSE-2.0.txt -[34]: https://maven.apache.org/surefire/maven-surefire-plugin/ -[35]: https://www.mojohaus.org/versions/versions-maven-plugin/ -[36]: https://basepom.github.io/duplicate-finder-maven-plugin -[37]: http://www.apache.org/licenses/LICENSE-2.0.html -[38]: https://maven.apache.org/plugins/maven-artifact-plugin/ -[39]: https://maven.apache.org/plugins/maven-deploy-plugin/ -[40]: https://maven.apache.org/plugins/maven-gpg-plugin/ -[41]: https://maven.apache.org/plugins/maven-source-plugin/ -[42]: https://maven.apache.org/plugins/maven-javadoc-plugin/ -[43]: https://central.sonatype.org -[44]: https://maven.apache.org/plugins/maven-dependency-plugin/ -[45]: https://maven.apache.org/surefire/maven-failsafe-plugin/ -[46]: https://www.jacoco.org/jacoco/trunk/doc/maven.html -[47]: https://github.com/exasol/quality-summarizer-maven-plugin/ -[48]: https://github.com/exasol/quality-summarizer-maven-plugin/blob/main/LICENSE -[49]: https://github.com/exasol/error-code-crawler-maven-plugin/ -[50]: https://github.com/exasol/error-code-crawler-maven-plugin/blob/main/LICENSE -[51]: https://github.com/git-commit-id/git-commit-id-maven-plugin -[52]: http://www.gnu.org/licenses/lgpl-3.0.txt -[53]: https://github.com/exasol/project-keeper/ -[54]: https://github.com/exasol/project-keeper/blob/main/LICENSE -[55]: https://maven.apache.org/plugins/maven-jar-plugin/ -[56]: https://maven.apache.org/plugins/maven-clean-plugin/ -[57]: https://maven.apache.org/plugins/maven-resources-plugin/ -[58]: https://maven.apache.org/plugins/maven-install-plugin/ -[59]: https://maven.apache.org/plugins/maven-site-plugin/ +[0]: https://github.com/exasol/exasol-test-setup-abstraction-java/ +[1]: https://github.com/exasol/exasol-test-setup-abstraction-java/blob/main/LICENSE +[2]: https://github.com/exasol/udf-debugging-java/ +[3]: https://github.com/exasol/udf-debugging-java/blob/main/LICENSE +[4]: https://github.com/exasol/exasol-testcontainers/ +[5]: https://github.com/exasol/exasol-testcontainers/blob/main/LICENSE +[6]: https://java.testcontainers.org +[7]: http://opensource.org/licenses/MIT +[8]: https://github.com/exasol/test-db-builder-java/ +[9]: https://github.com/exasol/test-db-builder-java/blob/main/LICENSE +[10]: https://github.com/exasol/hamcrest-resultset-matcher/ +[11]: https://github.com/exasol/hamcrest-resultset-matcher/blob/main/LICENSE +[12]: https://junit.org/ +[13]: https://www.eclipse.org/legal/epl-v20.html +[14]: http://hamcrest.org/JavaHamcrest/ +[15]: https://raw.githubusercontent.com/hamcrest/JavaHamcrest/master/LICENSE +[16]: https://github.com/mockito/mockito +[17]: https://opensource.org/licenses/MIT +[18]: https://github.com/exasol/maven-project-version-getter/ +[19]: https://github.com/exasol/maven-project-version-getter/blob/main/LICENSE +[20]: http://www.slf4j.org +[21]: https://opensource.org/license/mit +[22]: https://www.eclemma.org/jacoco/index.html +[23]: https://www.eclipse.org/legal/epl-2.0/ +[24]: https://docs.sonarsource.com/sonarqube-server/latest/extension-guide/developing-a-plugin/plugin-basics/sonar-scanner-maven/sonar-maven-plugin/ +[25]: http://www.gnu.org/licenses/lgpl.txt +[26]: https://maven.apache.org/plugins/maven-toolchains-plugin/ +[27]: https://www.apache.org/licenses/LICENSE-2.0.txt +[28]: https://maven.apache.org/plugins/maven-compiler-plugin/ +[29]: https://maven.apache.org/enforcer/maven-enforcer-plugin/ +[30]: https://www.mojohaus.org/flatten-maven-plugin/ +[31]: https://sonatype.github.io/ossindex-maven/maven-plugin/ +[32]: http://www.apache.org/licenses/LICENSE-2.0.txt +[33]: https://maven.apache.org/surefire/maven-surefire-plugin/ +[34]: https://www.mojohaus.org/versions/versions-maven-plugin/ +[35]: https://basepom.github.io/duplicate-finder-maven-plugin +[36]: http://www.apache.org/licenses/LICENSE-2.0.html +[37]: https://maven.apache.org/plugins/maven-artifact-plugin/ +[38]: https://maven.apache.org/plugins/maven-deploy-plugin/ +[39]: https://maven.apache.org/plugins/maven-gpg-plugin/ +[40]: https://maven.apache.org/plugins/maven-source-plugin/ +[41]: https://maven.apache.org/plugins/maven-javadoc-plugin/ +[42]: https://central.sonatype.org +[43]: https://maven.apache.org/plugins/maven-dependency-plugin/ +[44]: https://maven.apache.org/surefire/maven-failsafe-plugin/ +[45]: https://www.jacoco.org/jacoco/trunk/doc/maven.html +[46]: https://github.com/exasol/quality-summarizer-maven-plugin/ +[47]: https://github.com/exasol/quality-summarizer-maven-plugin/blob/main/LICENSE +[48]: https://github.com/exasol/error-code-crawler-maven-plugin/ +[49]: https://github.com/exasol/error-code-crawler-maven-plugin/blob/main/LICENSE +[50]: https://github.com/git-commit-id/git-commit-id-maven-plugin +[51]: http://www.gnu.org/licenses/lgpl-3.0.txt +[52]: https://github.com/exasol/project-keeper/ +[53]: https://github.com/exasol/project-keeper/blob/main/LICENSE +[54]: https://maven.apache.org/plugins/maven-jar-plugin/ +[55]: https://maven.apache.org/plugins/maven-clean-plugin/ +[56]: https://maven.apache.org/plugins/maven-resources-plugin/ +[57]: https://maven.apache.org/plugins/maven-install-plugin/ +[58]: https://maven.apache.org/plugins/maven-site-plugin/ diff --git a/doc/changes/changes_2.0.0.md b/doc/changes/changes_2.0.0.md index 5a3b0ea..cc3106c 100644 --- a/doc/changes/changes_2.0.0.md +++ b/doc/changes/changes_2.0.0.md @@ -18,10 +18,6 @@ In the course of the Java 17 switch, we also upgraded from JUnit 5 to 6 and adde ## Dependency Updates -### Compile Dependency Updates - -* Added `fr.turri:aXMLRPC:1.17.0` - ### Test Dependency Updates * Added `com.exasol:exasol-test-setup-abstraction-java:2.1.11` diff --git a/pom.xml b/pom.xml index 7d9a65c..20564a1 100644 --- a/pom.xml +++ b/pom.xml @@ -8,6 +8,8 @@ https://github.com/exasol/udf-api-java/ 17 + + true @@ -15,6 +17,13 @@ exasol-test-setup-abstraction-java 2.1.11 test + + + + fr.turri + aXMLRPC + + com.exasol @@ -22,18 +31,6 @@ 0.6.18 test - - fr.turri - aXMLRPC - 1.17.0 - - - - xerces - xercesImpl - - - com.exasol exasol-testcontainers From f4210fcabcb53f49d300ea43c6972cebf4422725 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Mon, 15 Jun 2026 13:29:12 +0200 Subject: [PATCH 12/19] #40: Ported back to Java 11. --- .github/workflows/ci-build.yml | 41 ++++++++++++----------- .github/workflows/dependencies_check.yml | 15 +++++---- .github/workflows/dependencies_update.yml | 9 ++--- .github/workflows/release.yml | 26 +++++++------- .settings/org.eclipse.jdt.core.prefs | 6 ++-- doc/changes/changelog.md | 2 +- doc/changes/changes_1.0.10.md | 27 +++++++++++++++ doc/changes/changes_2.0.0.md | 33 ------------------ pk_generated_parent.pom | 2 +- pom.xml | 6 ++-- 10 files changed, 84 insertions(+), 83 deletions(-) create mode 100644 doc/changes/changes_1.0.10.md delete mode 100644 doc/changes/changes_2.0.0.md diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 46a1829..148f280 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -56,11 +56,12 @@ jobs: - name: Set up JDKs id: setup-java uses: actions/setup-java@v5 - with: { - distribution: temurin, - java-version: '17', + with: + distribution: temurin + java-version: |- + 11 + 17 cache: maven - } - name: Cache SonarCloud packages id: cache-sonar uses: actions/cache@v5 @@ -155,18 +156,18 @@ jobs: fetch-depth: 0, persist-credentials: false } - - name: Set up JDK 21 + - name: Set up JDK 17 id: setup-java uses: actions/setup-java@v5 with: { distribution: temurin, - java-version: '21', + java-version: '17', cache: maven } - - name: Run tests and build with Maven 21 + - name: Run tests and build with Maven 17 id: build-next-java run: | - mvn --batch-mode clean package -DtrimStackTrace=false -Djava.version=21 \ + mvn --batch-mode clean package -DtrimStackTrace=false -Djava.version=17 \ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ -DossindexSkip=true ossindex: @@ -192,14 +193,15 @@ jobs: - name: Set up JDKs id: setup-java uses: actions/setup-java@v5 - with: { - distribution: temurin, - java-version: '17', - cache: maven, - server-id: ossindex, - server-username: OSSINDEX_USERNAME, + with: + distribution: temurin + java-version: |- + 11 + 17 + cache: maven + server-id: ossindex + server-username: OSSINDEX_USERNAME server-password: OSSINDEX_API_TOKEN - } - name: Run Ossindex id: ossindex run: | @@ -269,11 +271,12 @@ jobs: - name: Set up JDKs id: setup-java uses: actions/setup-java@v5 - with: { - distribution: temurin, - java-version: '17', + with: + distribution: temurin + java-version: |- + 11 + 17 cache: maven - } - name: Check if release is needed id: check-release if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') }} diff --git a/.github/workflows/dependencies_check.yml b/.github/workflows/dependencies_check.yml index b813250..c7220ca 100644 --- a/.github/workflows/dependencies_check.yml +++ b/.github/workflows/dependencies_check.yml @@ -34,14 +34,15 @@ jobs: - name: Set up JDKs id: setup-jdks uses: actions/setup-java@v5 - with: { - distribution: temurin, - java-version: '17', - cache: maven, - server-id: ossindex, - server-username: OSSINDEX_USERNAME, + with: + distribution: temurin + java-version: |- + 11 + 17 + cache: maven + server-id: ossindex + server-username: OSSINDEX_USERNAME server-password: OSSINDEX_API_TOKEN - } - name: Generate ossindex report id: ossindex-report run: | diff --git a/.github/workflows/dependencies_update.yml b/.github/workflows/dependencies_update.yml index 511f3a2..73478fe 100644 --- a/.github/workflows/dependencies_update.yml +++ b/.github/workflows/dependencies_update.yml @@ -43,11 +43,12 @@ jobs: - name: Set up JDKs id: setup-jdks uses: actions/setup-java@v5 - with: { - distribution: temurin, - java-version: '17', + with: + distribution: temurin + java-version: |- + 11 + 17 cache: maven - } - name: Print issues id: debug-print-issues run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3058c70..6ca8846 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -84,24 +84,26 @@ jobs: id: configure-maven-central-credentials if: ${{ true }} uses: actions/setup-java@v5 - with: { - distribution: temurin, - java-version: '17', - server-id: maven-central-portal, - server-username: MAVEN_USERNAME, - server-password: MAVEN_PASSWORD, - gpg-private-key: '${{ secrets.OSSRH_GPG_SECRET_KEY }}', + with: + distribution: temurin + java-version: |- + 11 + 17 + server-id: maven-central-portal + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE - } - name: Set up JDKs id: setup-jdks if: ${{ ! true }} uses: actions/setup-java@v5 - with: { - distribution: temurin, - java-version: '17', + with: + distribution: temurin + java-version: |- + 11 + 17 cache: maven - } - name: Fail if not running on main or release branch id: check-main-or-release-branch if: ${{ github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/heads/release/') }} diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index ef2bcae..f5f6a72 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -14,9 +14,9 @@ org.eclipse.jdt.core.compiler.annotation.owning=org.eclipse.jdt.annotation.Ownin org.eclipse.jdt.core.compiler.annotation.resourceanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.compliance=11 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -121,7 +121,7 @@ org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.processAnnotations=disabled org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.formatter.align_arrows_in_switch_on_columns=false org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md index fc1ef2b..fbf6452 100644 --- a/doc/changes/changelog.md +++ b/doc/changes/changelog.md @@ -1,6 +1,6 @@ # Changes -* [2.0.0](changes_2.0.0.md) +* [1.0.10](changes_1.0.10.md) * [1.0.9](changes_1.0.9.md) * [1.0.8](changes_1.0.8.md) * [1.0.7](changes_1.0.7.md) diff --git a/doc/changes/changes_1.0.10.md b/doc/changes/changes_1.0.10.md new file mode 100644 index 0000000..df959fd --- /dev/null +++ b/doc/changes/changes_1.0.10.md @@ -0,0 +1,27 @@ +# Exasol UDF API for Java 1.0.10, released 2026-06-15 + +Code name: UDF Code Coverage + +## Summary + +In this release we inject the JaCoCo code coverage agent into the UDF when running the integration test, so that we can measure the test coverage. + +## Bugfixes + +* #40: Report integration test coverage + +## Dependency Updates + +### Test Dependency Updates + +* Added `com.exasol:exasol-test-setup-abstraction-java:2.1.11` +* Updated `com.exasol:exasol-testcontainers:7.2.3` to `7.3.0` +* Added `com.exasol:udf-debugging-java:0.6.18` +* Added `org.jacoco:org.jacoco.agent:0.8.14` +* Updated `org.junit.jupiter:junit-jupiter-params:5.14.4` to `6.1.0` +* Updated `org.slf4j:slf4j-jdk14:2.0.17` to `2.0.18` + +### Plugin Dependency Updates + +* Updated `com.exasol:project-keeper-maven-plugin:5.6.1` to `5.6.2` +* Added `org.apache.maven.plugins:maven-dependency-plugin:3.10.0` diff --git a/doc/changes/changes_2.0.0.md b/doc/changes/changes_2.0.0.md deleted file mode 100644 index cc3106c..0000000 --- a/doc/changes/changes_2.0.0.md +++ /dev/null @@ -1,33 +0,0 @@ -# Exasol UDF API for Java 2.0.0, released 2026-06-11 - -Code name: Java 17 - -## Summary - -The Exasol UDF API is now built with Java 17. Java 11 is no longer supported. - -**This is a breaking change for [Exasol 7.1](https://docs.exasol.com/db/latest/planning/life_cycle/life_cycle_policy.htm#Exasol)** (which reaches end-of-life end of June 2026). - -If you still have UDF that require Java 11, please use release 1.0.9 of the API. Content-wise nothing changed except the JRE compatibility. - -In the course of the Java 17 switch, we also upgraded from JUnit 5 to 6 and added the missing JaCoCo agent injection to the integration test, so that now the code coverage is reported properly. - -## Bugfixes - -* #40: Report integration test coverage - -## Dependency Updates - -### Test Dependency Updates - -* Added `com.exasol:exasol-test-setup-abstraction-java:2.1.11` -* Updated `com.exasol:exasol-testcontainers:7.2.3` to `7.3.0` -* Added `com.exasol:udf-debugging-java:0.6.18` -* Added `org.jacoco:org.jacoco.agent:0.8.14` -* Updated `org.junit.jupiter:junit-jupiter-params:5.14.4` to `6.1.0` -* Updated `org.slf4j:slf4j-jdk14:2.0.17` to `2.0.18` - -### Plugin Dependency Updates - -* Updated `com.exasol:project-keeper-maven-plugin:5.6.1` to `5.6.2` -* Added `org.apache.maven.plugins:maven-dependency-plugin:3.10.0` diff --git a/pk_generated_parent.pom b/pk_generated_parent.pom index 1f2e099..5852c10 100644 --- a/pk_generated_parent.pom +++ b/pk_generated_parent.pom @@ -3,7 +3,7 @@ 4.0.0 com.exasol udf-api-java-generated-parent - 2.0.0 + 1.0.10 pom UTF-8 diff --git a/pom.xml b/pom.xml index 20564a1..bcd4ba0 100644 --- a/pom.xml +++ b/pom.xml @@ -2,12 +2,12 @@ 4.0.0 udf-api-java - 2.0.0 + 1.0.10 Exasol UDF API for Java Interface between User Defined Functions (UDFs) written in Java and the Exasol database. https://github.com/exasol/udf-api-java/ - 17 + 11 true @@ -137,7 +137,7 @@ udf-api-java-generated-parent com.exasol - 2.0.0 + 1.0.10 pk_generated_parent.pom From 4916d7aefc36eeb30f3d2e4ad60d69d7ea86200c Mon Sep 17 00:00:00 2001 From: redcatbear Date: Mon, 15 Jun 2026 13:31:32 +0200 Subject: [PATCH 13/19] #40: Switched back to JUnit 5 to support Java 11. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bcd4ba0..46d858d 100644 --- a/pom.xml +++ b/pom.xml @@ -58,7 +58,7 @@ org.junit.jupiter junit-jupiter-params - 6.1.0 + 5.14.4 test From a2a1b8b6dc6bbfde3b3b1819c39926faec5f664e Mon Sep 17 00:00:00 2001 From: redcatbear Date: Mon, 15 Jun 2026 13:32:33 +0200 Subject: [PATCH 14/19] #40: Switched back to JUnit 5 to support Java 11. --- doc/changes/changes_1.0.10.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/changes/changes_1.0.10.md b/doc/changes/changes_1.0.10.md index df959fd..a2c4e24 100644 --- a/doc/changes/changes_1.0.10.md +++ b/doc/changes/changes_1.0.10.md @@ -18,7 +18,6 @@ In this release we inject the JaCoCo code coverage agent into the UDF when runni * Updated `com.exasol:exasol-testcontainers:7.2.3` to `7.3.0` * Added `com.exasol:udf-debugging-java:0.6.18` * Added `org.jacoco:org.jacoco.agent:0.8.14` -* Updated `org.junit.jupiter:junit-jupiter-params:5.14.4` to `6.1.0` * Updated `org.slf4j:slf4j-jdk14:2.0.17` to `2.0.18` ### Plugin Dependency Updates From 8890e94f4a8571180cc86404922e7539116ee89e Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Mon, 15 Jun 2026 13:58:41 +0200 Subject: [PATCH 15/19] Fix dependencies --- doc/changes/changes_2.0.0.md | 2 +- pom.xml | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/changes/changes_2.0.0.md b/doc/changes/changes_2.0.0.md index 5a3b0ea..c492107 100644 --- a/doc/changes/changes_2.0.0.md +++ b/doc/changes/changes_2.0.0.md @@ -26,9 +26,9 @@ In the course of the Java 17 switch, we also upgraded from JUnit 5 to 6 and adde * Added `com.exasol:exasol-test-setup-abstraction-java:2.1.11` * Updated `com.exasol:exasol-testcontainers:7.2.3` to `7.3.0` +* Updated `com.exasol:test-db-builder-java:4.0.0` to `4.0.1` * Added `com.exasol:udf-debugging-java:0.6.18` * Added `org.jacoco:org.jacoco.agent:0.8.14` -* Updated `org.junit.jupiter:junit-jupiter-params:5.14.4` to `6.1.0` * Updated `org.slf4j:slf4j-jdk14:2.0.17` to `2.0.18` ### Plugin Dependency Updates diff --git a/pom.xml b/pom.xml index 7d9a65c..e8e8bc5 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ com.exasol test-db-builder-java - 4.0.0 + 4.0.1 test @@ -61,7 +61,7 @@ org.junit.jupiter junit-jupiter-params - 6.1.0 + 5.14.4 test @@ -99,7 +99,8 @@ ${java.version} true - -Xlint:path + -Xlint:all,-path + -Werror From eb9b26377bc5e81bd2f1237488edfc96d0ced5e7 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Tue, 16 Jun 2026 09:12:54 +0200 Subject: [PATCH 16/19] #40: Removed attempt to get code coverage. Added test strategy. --- README.md | 3 +- dependencies.md | 194 +++++++++---------- doc/changes/changes_1.0.10.md | 10 +- doc/test_strategy.md | 65 +++++++ pom.xml | 19 -- src/test/java/com/exasol/test/JavaUdfIT.java | 34 ++-- 6 files changed, 184 insertions(+), 141 deletions(-) create mode 100644 doc/test_strategy.md diff --git a/README.md b/README.md index 4082aff..4968b2e 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,5 @@ User Defined Functions extend Exasol with functions and scripts that can be call ## Additional Information * [Changelog](doc/changes/changelog.md) -* [Dependencies](dependencies.md) \ No newline at end of file +* [Dependencies](dependencies.md) +* [Test strategy](doc/test_strategy.md) diff --git a/dependencies.md b/dependencies.md index 6abeff8..5f54ffa 100644 --- a/dependencies.md +++ b/dependencies.md @@ -3,109 +3,103 @@ ## Test Dependencies -| Dependency | License | -| ---------------------------------------------- | --------------------------------- | -| [exasol-test-setup-abstraction-java][0] | [MIT License][1] | -| [udf-debugging-java][2] | [MIT License][3] | -| [Test containers for Exasol on Docker][4] | [MIT License][5] | -| [Testcontainers :: JUnit Jupiter Extension][6] | [MIT][7] | -| [Test Database Builder for Java][8] | [MIT License][9] | -| [Matcher for SQL Result Sets][10] | [MIT License][11] | -| [JUnit Jupiter Params][12] | [Eclipse Public License v2.0][13] | -| [Hamcrest][14] | [BSD-3-Clause][15] | -| [mockito-junit-jupiter][16] | [MIT][17] | -| [Maven Project Version Getter][18] | [MIT License][19] | -| [SLF4J JDK14 Provider][20] | [MIT][21] | -| [JaCoCo :: Agent][22] | [EPL-2.0][23] | +| Dependency | License | +| ---------------------------------------------- | -------------------------------- | +| [Test containers for Exasol on Docker][0] | [MIT License][1] | +| [Testcontainers :: JUnit Jupiter Extension][2] | [MIT][3] | +| [Test Database Builder for Java][4] | [MIT License][5] | +| [Matcher for SQL Result Sets][6] | [MIT License][7] | +| [JUnit Jupiter Params][8] | [Eclipse Public License v2.0][9] | +| [Hamcrest][10] | [BSD-3-Clause][11] | +| [mockito-junit-jupiter][12] | [MIT][13] | +| [Maven Project Version Getter][14] | [MIT License][15] | +| [SLF4J JDK14 Provider][16] | [MIT][17] | +| [JaCoCo :: Agent][18] | [EPL-2.0][19] | ## Plugin Dependencies | Dependency | License | | ------------------------------------------------------- | ------------------------------------------- | -| [SonarQube Scanner for Maven][24] | [GNU LGPL 3][25] | -| [Apache Maven Toolchains Plugin][26] | [Apache-2.0][27] | -| [Apache Maven Compiler Plugin][28] | [Apache-2.0][27] | -| [Apache Maven Enforcer Plugin][29] | [Apache-2.0][27] | -| [Maven Flatten Plugin][30] | [Apache Software License][27] | -| [org.sonatype.ossindex.maven:ossindex-maven-plugin][31] | [ASL2][32] | -| [Maven Surefire Plugin][33] | [Apache-2.0][27] | -| [Versions Maven Plugin][34] | [Apache License, Version 2.0][27] | -| [duplicate-finder-maven-plugin Maven Mojo][35] | [Apache License 2.0][36] | -| [Apache Maven Artifact Plugin][37] | [Apache-2.0][27] | -| [Apache Maven Deploy Plugin][38] | [Apache-2.0][27] | -| [Apache Maven GPG Plugin][39] | [Apache-2.0][27] | -| [Apache Maven Source Plugin][40] | [Apache-2.0][27] | -| [Apache Maven Javadoc Plugin][41] | [Apache-2.0][27] | -| [Central Publishing Maven Plugin][42] | [The Apache License, Version 2.0][27] | -| [Apache Maven Dependency Plugin][43] | [Apache-2.0][27] | -| [Maven Failsafe Plugin][44] | [Apache-2.0][27] | -| [JaCoCo :: Maven Plugin][45] | [EPL-2.0][23] | -| [Quality Summarizer Maven Plugin][46] | [MIT License][47] | -| [error-code-crawler-maven-plugin][48] | [MIT License][49] | -| [Git Commit Id Maven Plugin][50] | [GNU Lesser General Public License 3.0][51] | -| [Project Keeper Maven plugin][52] | [The MIT License][53] | -| [Apache Maven JAR Plugin][54] | [Apache-2.0][27] | -| [Apache Maven Clean Plugin][55] | [Apache-2.0][27] | -| [Apache Maven Resources Plugin][56] | [Apache-2.0][27] | -| [Apache Maven Install Plugin][57] | [Apache-2.0][27] | -| [Apache Maven Site Plugin][58] | [Apache-2.0][27] | +| [SonarQube Scanner for Maven][20] | [GNU LGPL 3][21] | +| [Apache Maven Toolchains Plugin][22] | [Apache-2.0][23] | +| [Apache Maven Compiler Plugin][24] | [Apache-2.0][23] | +| [Apache Maven Enforcer Plugin][25] | [Apache-2.0][23] | +| [Maven Flatten Plugin][26] | [Apache Software License][23] | +| [org.sonatype.ossindex.maven:ossindex-maven-plugin][27] | [ASL2][28] | +| [Maven Surefire Plugin][29] | [Apache-2.0][23] | +| [Versions Maven Plugin][30] | [Apache License, Version 2.0][23] | +| [duplicate-finder-maven-plugin Maven Mojo][31] | [Apache License 2.0][32] | +| [Apache Maven Artifact Plugin][33] | [Apache-2.0][23] | +| [Apache Maven Deploy Plugin][34] | [Apache-2.0][23] | +| [Apache Maven GPG Plugin][35] | [Apache-2.0][23] | +| [Apache Maven Source Plugin][36] | [Apache-2.0][23] | +| [Apache Maven Javadoc Plugin][37] | [Apache-2.0][23] | +| [Central Publishing Maven Plugin][38] | [The Apache License, Version 2.0][23] | +| [Apache Maven Dependency Plugin][39] | [Apache-2.0][23] | +| [Maven Failsafe Plugin][40] | [Apache-2.0][23] | +| [JaCoCo :: Maven Plugin][41] | [EPL-2.0][19] | +| [Quality Summarizer Maven Plugin][42] | [MIT License][43] | +| [error-code-crawler-maven-plugin][44] | [MIT License][45] | +| [Git Commit Id Maven Plugin][46] | [GNU Lesser General Public License 3.0][47] | +| [Project Keeper Maven plugin][48] | [The MIT License][49] | +| [Apache Maven JAR Plugin][50] | [Apache-2.0][23] | +| [Apache Maven Clean Plugin][51] | [Apache-2.0][23] | +| [Apache Maven Resources Plugin][52] | [Apache-2.0][23] | +| [Apache Maven Install Plugin][53] | [Apache-2.0][23] | +| [Apache Maven Site Plugin][54] | [Apache-2.0][23] | -[0]: https://github.com/exasol/exasol-test-setup-abstraction-java/ -[1]: https://github.com/exasol/exasol-test-setup-abstraction-java/blob/main/LICENSE -[2]: https://github.com/exasol/udf-debugging-java/ -[3]: https://github.com/exasol/udf-debugging-java/blob/main/LICENSE -[4]: https://github.com/exasol/exasol-testcontainers/ -[5]: https://github.com/exasol/exasol-testcontainers/blob/main/LICENSE -[6]: https://java.testcontainers.org -[7]: http://opensource.org/licenses/MIT -[8]: https://github.com/exasol/test-db-builder-java/ -[9]: https://github.com/exasol/test-db-builder-java/blob/main/LICENSE -[10]: https://github.com/exasol/hamcrest-resultset-matcher/ -[11]: https://github.com/exasol/hamcrest-resultset-matcher/blob/main/LICENSE -[12]: https://junit.org/ -[13]: https://www.eclipse.org/legal/epl-v20.html -[14]: http://hamcrest.org/JavaHamcrest/ -[15]: https://raw.githubusercontent.com/hamcrest/JavaHamcrest/master/LICENSE -[16]: https://github.com/mockito/mockito -[17]: https://opensource.org/licenses/MIT -[18]: https://github.com/exasol/maven-project-version-getter/ -[19]: https://github.com/exasol/maven-project-version-getter/blob/main/LICENSE -[20]: http://www.slf4j.org -[21]: https://opensource.org/license/mit -[22]: https://www.eclemma.org/jacoco/index.html -[23]: https://www.eclipse.org/legal/epl-2.0/ -[24]: https://docs.sonarsource.com/sonarqube-server/latest/extension-guide/developing-a-plugin/plugin-basics/sonar-scanner-maven/sonar-maven-plugin/ -[25]: http://www.gnu.org/licenses/lgpl.txt -[26]: https://maven.apache.org/plugins/maven-toolchains-plugin/ -[27]: https://www.apache.org/licenses/LICENSE-2.0.txt -[28]: https://maven.apache.org/plugins/maven-compiler-plugin/ -[29]: https://maven.apache.org/enforcer/maven-enforcer-plugin/ -[30]: https://www.mojohaus.org/flatten-maven-plugin/ -[31]: https://sonatype.github.io/ossindex-maven/maven-plugin/ -[32]: http://www.apache.org/licenses/LICENSE-2.0.txt -[33]: https://maven.apache.org/surefire/maven-surefire-plugin/ -[34]: https://www.mojohaus.org/versions/versions-maven-plugin/ -[35]: https://basepom.github.io/duplicate-finder-maven-plugin -[36]: http://www.apache.org/licenses/LICENSE-2.0.html -[37]: https://maven.apache.org/plugins/maven-artifact-plugin/ -[38]: https://maven.apache.org/plugins/maven-deploy-plugin/ -[39]: https://maven.apache.org/plugins/maven-gpg-plugin/ -[40]: https://maven.apache.org/plugins/maven-source-plugin/ -[41]: https://maven.apache.org/plugins/maven-javadoc-plugin/ -[42]: https://central.sonatype.org -[43]: https://maven.apache.org/plugins/maven-dependency-plugin/ -[44]: https://maven.apache.org/surefire/maven-failsafe-plugin/ -[45]: https://www.jacoco.org/jacoco/trunk/doc/maven.html -[46]: https://github.com/exasol/quality-summarizer-maven-plugin/ -[47]: https://github.com/exasol/quality-summarizer-maven-plugin/blob/main/LICENSE -[48]: https://github.com/exasol/error-code-crawler-maven-plugin/ -[49]: https://github.com/exasol/error-code-crawler-maven-plugin/blob/main/LICENSE -[50]: https://github.com/git-commit-id/git-commit-id-maven-plugin -[51]: http://www.gnu.org/licenses/lgpl-3.0.txt -[52]: https://github.com/exasol/project-keeper/ -[53]: https://github.com/exasol/project-keeper/blob/main/LICENSE -[54]: https://maven.apache.org/plugins/maven-jar-plugin/ -[55]: https://maven.apache.org/plugins/maven-clean-plugin/ -[56]: https://maven.apache.org/plugins/maven-resources-plugin/ -[57]: https://maven.apache.org/plugins/maven-install-plugin/ -[58]: https://maven.apache.org/plugins/maven-site-plugin/ +[0]: https://github.com/exasol/exasol-testcontainers/ +[1]: https://github.com/exasol/exasol-testcontainers/blob/main/LICENSE +[2]: https://java.testcontainers.org +[3]: http://opensource.org/licenses/MIT +[4]: https://github.com/exasol/test-db-builder-java/ +[5]: https://github.com/exasol/test-db-builder-java/blob/main/LICENSE +[6]: https://github.com/exasol/hamcrest-resultset-matcher/ +[7]: https://github.com/exasol/hamcrest-resultset-matcher/blob/main/LICENSE +[8]: https://junit.org/ +[9]: https://www.eclipse.org/legal/epl-v20.html +[10]: http://hamcrest.org/JavaHamcrest/ +[11]: https://raw.githubusercontent.com/hamcrest/JavaHamcrest/master/LICENSE +[12]: https://github.com/mockito/mockito +[13]: https://opensource.org/licenses/MIT +[14]: https://github.com/exasol/maven-project-version-getter/ +[15]: https://github.com/exasol/maven-project-version-getter/blob/main/LICENSE +[16]: http://www.slf4j.org +[17]: https://opensource.org/license/mit +[18]: https://www.eclemma.org/jacoco/index.html +[19]: https://www.eclipse.org/legal/epl-2.0/ +[20]: https://docs.sonarsource.com/sonarqube-server/latest/extension-guide/developing-a-plugin/plugin-basics/sonar-scanner-maven/sonar-maven-plugin/ +[21]: http://www.gnu.org/licenses/lgpl.txt +[22]: https://maven.apache.org/plugins/maven-toolchains-plugin/ +[23]: https://www.apache.org/licenses/LICENSE-2.0.txt +[24]: https://maven.apache.org/plugins/maven-compiler-plugin/ +[25]: https://maven.apache.org/enforcer/maven-enforcer-plugin/ +[26]: https://www.mojohaus.org/flatten-maven-plugin/ +[27]: https://sonatype.github.io/ossindex-maven/maven-plugin/ +[28]: http://www.apache.org/licenses/LICENSE-2.0.txt +[29]: https://maven.apache.org/surefire/maven-surefire-plugin/ +[30]: https://www.mojohaus.org/versions/versions-maven-plugin/ +[31]: https://basepom.github.io/duplicate-finder-maven-plugin +[32]: http://www.apache.org/licenses/LICENSE-2.0.html +[33]: https://maven.apache.org/plugins/maven-artifact-plugin/ +[34]: https://maven.apache.org/plugins/maven-deploy-plugin/ +[35]: https://maven.apache.org/plugins/maven-gpg-plugin/ +[36]: https://maven.apache.org/plugins/maven-source-plugin/ +[37]: https://maven.apache.org/plugins/maven-javadoc-plugin/ +[38]: https://central.sonatype.org +[39]: https://maven.apache.org/plugins/maven-dependency-plugin/ +[40]: https://maven.apache.org/surefire/maven-failsafe-plugin/ +[41]: https://www.jacoco.org/jacoco/trunk/doc/maven.html +[42]: https://github.com/exasol/quality-summarizer-maven-plugin/ +[43]: https://github.com/exasol/quality-summarizer-maven-plugin/blob/main/LICENSE +[44]: https://github.com/exasol/error-code-crawler-maven-plugin/ +[45]: https://github.com/exasol/error-code-crawler-maven-plugin/blob/main/LICENSE +[46]: https://github.com/git-commit-id/git-commit-id-maven-plugin +[47]: http://www.gnu.org/licenses/lgpl-3.0.txt +[48]: https://github.com/exasol/project-keeper/ +[49]: https://github.com/exasol/project-keeper/blob/main/LICENSE +[50]: https://maven.apache.org/plugins/maven-jar-plugin/ +[51]: https://maven.apache.org/plugins/maven-clean-plugin/ +[52]: https://maven.apache.org/plugins/maven-resources-plugin/ +[53]: https://maven.apache.org/plugins/maven-install-plugin/ +[54]: https://maven.apache.org/plugins/maven-site-plugin/ diff --git a/doc/changes/changes_1.0.10.md b/doc/changes/changes_1.0.10.md index c57b33b..f4add38 100644 --- a/doc/changes/changes_1.0.10.md +++ b/doc/changes/changes_1.0.10.md @@ -1,10 +1,14 @@ # Exasol UDF API for Java 1.0.10, released 2026-06-15 -Code name: UDF Code Coverage +Code name: Test Strategy Revisited ## Summary -In this release we inject the JaCoCo code coverage agent into the UDF when running the integration test, so that we can measure the test coverage. +In this release we experimented with inject the JaCoCo code coverage agent into the UDF when running the integration test, so that we can measure the test coverage. + +In the end we decided against the approach, because however we turned it, the coverage we would measure would not represent the actual API coverage. But the good news is that our attempts resulted in cleaner test code. If you want to learn more, check out the [test strategy](../test_strategy.md). + +We also updated a number of dependencies. ## Bugfixes @@ -14,10 +18,8 @@ In this release we inject the JaCoCo code coverage agent into the UDF when runni ### Test Dependency Updates -* Added `com.exasol:exasol-test-setup-abstraction-java:2.1.11` * Updated `com.exasol:exasol-testcontainers:7.2.3` to `7.3.0` * Updated `com.exasol:test-db-builder-java:4.0.0` to `4.0.1` -* Added `com.exasol:udf-debugging-java:0.6.18` * Added `org.jacoco:org.jacoco.agent:0.8.14` * Updated `org.slf4j:slf4j-jdk14:2.0.17` to `2.0.18` diff --git a/doc/test_strategy.md b/doc/test_strategy.md new file mode 100644 index 0000000..1208a65 --- /dev/null +++ b/doc/test_strategy.md @@ -0,0 +1,65 @@ +# Test Strategy + +This document explains the test setup of the [Exasol UDF API for Java](../README.md), the options considered for +measuring integration test coverage, and the decision to not use code coverage as a quality metric for this project. + +## Project Setup + +This project publishes the Java API that UDF authors compile against when writing Java user defined functions for the Exasol database. In production, the UDF API JAR is provided by the Exasol installation and loaded by the script language container. UDF authors compile against this artifact, but they do not include it in their own UDF JARs. + +The integration tests therefore deliberately mirror this deployment model: + +* The Maven build creates a test JAR containing probe UDF classes from `src/test/java`. +* The test JAR is uploaded to BucketFS in an Exasol test container. +* The integration tests create Java UDF scripts that load this test JAR with a `%jar` directive. +* The probe UDF classes were compiled against this project, but at runtime they interact with the API classes and + implementation provided by Exasol. + +This setup is primarily a compatibility test. It verifies that code compiled against this project can run in Exasol and call the relevant UDF API methods. + +## Coverage Problem + +The project is not a typical Java library with executable production logic. Most of the public surface is made of interfaces such as `ExaIterator` and `ExaMetadata`. Interface method declarations do not contain executable instructions that JaCoCo can cover. The executable classes in this repository are mostly exception classes and a small enum. + +When the JaCoCo agent is injected into the UDF JVM, it can observe code executed inside the Exasol script language container. However, the code executed there is not this project's API artifact. It is Exasol's provided runtime API and implementation plus the test probe classes. A local JaCoCo report such as `target/site/jacoco/index.html` can therefore show execution data from the UDF JVM while still reporting no meaningful coverage for this project. + +## Options Considered + +### Inject JaCoCo Into the UDF JVM + +This was implemented and verified to collect execution data from the UDF-side JVM. + +Rejected as a coverage metric for this project because the executed API implementation belongs to the Exasol runtime, not to this repository. The report does not answer the question "Which code in this project was covered by the integration tests?" + +### Include This Project's API JAR in the UDF + +This would make JaCoCo observe this repository's classes in the UDF runtime. + +Rejected because it would no longer test the real deployment model. The Exasol installation provides the UDF API at runtime, and forcing this project's API JAR into the UDF could hide incompatibilities with the database-provided API. + +The resulting coverage would be easier to measure but less relevant. + +### Generate Proxy or Wrapper Code Around the API + +A proxy could wrap `ExaIterator`, `ExaMetadata`, and related interfaces, record which methods were called, and delegate +to Exasol's runtime objects. + +Rejected as code coverage because it would measure the proxy and the probe UDFs, not this project's API. Such a proxy could be useful as an API exercise matrix, but it would be a custom compatibility metric rather than JaCoCo coverage. + +It would also add test-only code that has to mirror the whole API surface. + +### Add Unit Tests for the Executable Classes + +Unit tests could cover exception constructors, message formatting, and enum initialization. + +Rejected as a substitute for integration coverage because this would only cover incidental executable bytecode. It would not validate the important compatibility property: UDF code compiled against this API must run against Exasol's provided runtime API. + +## Decision + +We do not attempt to measure meaningful code coverage for this project with integration tests. + +The integration tests remain valuable and should be kept as compatibility and smoke tests. They check the behavior that matters for this artifact: Java UDF code compiled against this project can be loaded and executed by Exasol. + +Coverage reports for this project should not be used as a release quality gate. If a build or quality system requires a coverage value, this repository should be excluded from that requirement or the exception should point to this document. + +If more insight is needed in the future, the preferred direction is an explicit API exercise matrix that reports which UDF API methods are invoked by smoke tests. That metric must be documented as compatibility coverage, not as JaCoCo code coverage. diff --git a/pom.xml b/pom.xml index 15e5533..26ed262 100644 --- a/pom.xml +++ b/pom.xml @@ -12,25 +12,6 @@ true - - com.exasol - exasol-test-setup-abstraction-java - 2.1.11 - test - - - - fr.turri - aXMLRPC - - - - - com.exasol - udf-debugging-java - 0.6.18 - test - com.exasol exasol-testcontainers diff --git a/src/test/java/com/exasol/test/JavaUdfIT.java b/src/test/java/com/exasol/test/JavaUdfIT.java index 7aadc3f..c6a5841 100644 --- a/src/test/java/com/exasol/test/JavaUdfIT.java +++ b/src/test/java/com/exasol/test/JavaUdfIT.java @@ -11,15 +11,17 @@ import java.util.concurrent.TimeoutException; import java.util.logging.Logger; +import com.exasol.containers.ExasolContainer; import com.exasol.dbbuilder.dialects.exasol.ExasolObjectConfiguration; import com.exasol.dbbuilder.dialects.exasol.ExasolSchema; import com.exasol.dbbuilder.dialects.exasol.udf.UdfScript; -import com.exasol.exasoltestsetup.ExasolTestSetup; -import com.exasol.exasoltestsetup.ExasolTestSetupFactory; -import com.exasol.udfdebugging.UdfTestSetup; +import com.exasol.test.testobject.GetSizeUdf; +import com.exasol.test.testobject.GetTimestampUdf; +import com.exasol.test.testobject.MetadataMethodExerciser; import org.junit.jupiter.api.*; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; +import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import com.exasol.bucketfs.Bucket; @@ -45,23 +47,24 @@ */ @Testcontainers class JavaUdfIT { - private static final ExasolTestSetup EXASOL = new ExasolTestSetupFactory().getTestSetup(); + @Container + @SuppressWarnings("resource") // Will be closed by @Container annotation + private static final ExasolContainer> EXASOL = new ExasolContainer<>() + .withReuse(true); private static final Logger LOGGER = Logger.getLogger(JavaUdfIT.class.getName()); private static final String PROJECT_VERSION = MavenProjectVersionGetter.getCurrentProjectVersion(); private static final String UDF_UNDER_TEST_JAR = "udf-api-java-" + PROJECT_VERSION + "-tests.jar"; private static final Path UDF_UNDER_TEST_JAR_PATH = Path.of("target", UDF_UNDER_TEST_JAR); - private static final String JAR_INCLUDE_DIRECTIVE = "%jar /buckets/bfsdefault/default/" + UDF_UNDER_TEST_JAR; + private static final String UDF_BUCKETFS_PATH = " /buckets/bfsdefault/default/" + UDF_UNDER_TEST_JAR; private static Connection connection; - private static UdfTestSetup udfTestSetup; private static ExasolSchema schema; @BeforeAll - static void beforeAll() throws BucketAccessException, FileNotFoundException, SQLException { + static void beforeAll() throws BucketAccessException, FileNotFoundException { connection = EXASOL.createConnection(); - udfTestSetup=new UdfTestSetup(EXASOL, connection); final ExasolObjectFactory factory = new ExasolObjectFactory(connection, - ExasolObjectConfiguration.builder().withJvmOptions(udfTestSetup.getJvmOptions()).build()); + ExasolObjectConfiguration.builder().build()); schema = factory.createSchema("CONTEXT_SCHEMA"); copyUdfUnderTestToDefaultBucket(); } @@ -83,9 +86,6 @@ static void afterAll() throws SQLException { if ((connection != null) && !connection.isClosed()) { connection.close(); } - if (udfTestSetup != null) { - udfTestSetup.close(); - } } @CsvSource({ @@ -94,7 +94,7 @@ static void afterAll() throws SQLException { "getNodeCount, 1", "getOutputType, RETURN", "getScopeUser, SYS", - "getScriptCode, %jvmoption(?:\\R|.)*%jar(?:\\R|.)*class(?:\\R|.)*", + "getScriptCode, %scriptclass(?:\\R|.)*%jar(?:\\R|.)*", "getScriptSchema, CONTEXT_SCHEMA", "getScriptName, CONTEXT_METHOD_GETSCRIPTNAME", "getScriptLanguage, Java \\d+\\.\\d+.\\d+" }) @@ -112,7 +112,7 @@ private UdfScript createContextMethodTestScript(final String methodName) { .parameter("method_name", "VARCHAR(100)") .inputType(UdfScript.InputType.SCALAR) .language(UdfScript.Language.JAVA) - .content(JAR_INCLUDE_DIRECTIVE + ";\n%scriptclass com.exasol.test.testobject.MetadataMethodExerciser;") + .bucketFsContent(MetadataMethodExerciser.class.getName(), UDF_BUCKETFS_PATH) .returns("VARCHAR(2000)") .build(); } @@ -136,7 +136,7 @@ void testGetTimestampFromSetScript() { .parameter("V", "TIMESTAMP") .language(UdfScript.Language.JAVA) .inputType(UdfScript.InputType.SET) - .content(JAR_INCLUDE_DIRECTIVE +";\n%scriptclass com.exasol.test.testobject.GetTimestampUdf;") + .bucketFsContent(GetTimestampUdf.class.getName(), UDF_BUCKETFS_PATH) .returns("VARCHAR(2000)") .build()) { assertQueryResult("SELECT " + script.getFullyQualifiedName() + "(T.V)" + @@ -159,7 +159,7 @@ void testGetSizeFromScalarScript() { try(final UdfScript script = schema.createUdfBuilder("SIZE_IN_SCALAR_CONTEXT") .language(UdfScript.Language.JAVA) .inputType(UdfScript.InputType.SCALAR) - .content(JAR_INCLUDE_DIRECTIVE + ";\n%scriptclass com.exasol.test.testobject.GetSizeUdf;") + .bucketFsContent(GetSizeUdf.class.getName(), UDF_BUCKETFS_PATH) .returns("INTEGER") .build()) { assertQueryResult("SELECT " + script.getFullyQualifiedName() + "()", table().row(1L)); @@ -173,7 +173,7 @@ void testGetSizeFromSetScript() { .parameter("COL", "CHAR(1)") .language(UdfScript.Language.JAVA) .inputType(UdfScript.InputType.SET) - .content(JAR_INCLUDE_DIRECTIVE + ";\n%scriptclass com.exasol.test.testobject.GetSizeUdf;") + .bucketFsContent(GetSizeUdf.class.getName(), UDF_BUCKETFS_PATH) .returns("INTEGER") .build() ) { From f81392ff10cf95abc146dafec41aeb03567a4c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=A4r?= Date: Tue, 16 Jun 2026 09:37:58 +0200 Subject: [PATCH 17/19] Update doc/changes/changes_1.0.10.md Fixed typo Co-authored-by: Christoph Pirkl <4711730+kaklakariada@users.noreply.github.com> --- doc/changes/changes_1.0.10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changes/changes_1.0.10.md b/doc/changes/changes_1.0.10.md index f4add38..ccd8405 100644 --- a/doc/changes/changes_1.0.10.md +++ b/doc/changes/changes_1.0.10.md @@ -4,7 +4,7 @@ Code name: Test Strategy Revisited ## Summary -In this release we experimented with inject the JaCoCo code coverage agent into the UDF when running the integration test, so that we can measure the test coverage. +In this release we experimented with injecting the JaCoCo code coverage agent into the UDF when running the integration test, so that we can measure the test coverage. In the end we decided against the approach, because however we turned it, the coverage we would measure would not represent the actual API coverage. But the good news is that our attempts resulted in cleaner test code. If you want to learn more, check out the [test strategy](../test_strategy.md). From 8100e8a0183cd76269a3091095a81b697f673b50 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Tue, 16 Jun 2026 11:21:22 +0200 Subject: [PATCH 18/19] #40: Added an explanation of the module include scope in the Readme. --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 4968b2e..f14372f 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,35 @@ This project contains the API required to build [User Defined Functions](https:/ User Defined Functions extend Exasol with functions and scripts that can be called from within SQL statements. + + ## Information for API Users +### Dependency + +This library is already included in the Exasol database. Therefore, you should include it with the scope `provided` in Maven or `compileOnly` in Gradle. This ensures that the library is available during compilation but is not bundled with your UDF jar, avoiding conflicts with the version pre-installed in the database. + +Replace the version numbers below with the latest version. + +#### Maven + +```xml + + com.exasol + udf-api-java + 1.0.10 + provided + +``` + +#### Gradle + +```groovy +dependencies { + compileOnly 'com.exasol:udf-api-java:1.0.10' +} +``` + * [API documentation as JavaDoc](https://exasol.github.io/udf-api-java) * [Java tutorials](https://github.com/exasol/exasol-java-tutorial) with examples of how to build, test and run Java UDFs From 3731278c60ae8fdb4465df2b73f7692905624f03 Mon Sep 17 00:00:00 2001 From: Christoph Pirkl <4711730+kaklakariada@users.noreply.github.com> Date: Tue, 16 Jun 2026 11:25:24 +0200 Subject: [PATCH 19/19] Update doc/changes/changes_1.0.10.md --- doc/changes/changes_1.0.10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changes/changes_1.0.10.md b/doc/changes/changes_1.0.10.md index ccd8405..da0568c 100644 --- a/doc/changes/changes_1.0.10.md +++ b/doc/changes/changes_1.0.10.md @@ -1,4 +1,4 @@ -# Exasol UDF API for Java 1.0.10, released 2026-06-15 +# Exasol UDF API for Java 1.0.10, released 2026-06-16 Code name: Test Strategy Revisited