The latest version of ETC uses a temp directory to store SSH credentials. It uses target as default but this can be overwritten by calling .withTemporaryCredentialsDirectory().
This behavior is fine for Maven projects but requires additional configuration for Gradle projects. Especially developers of Gradle projects who are not familiar with ETC will wonder why .withTemporaryCredentialsDirectory(Path.of("build/")) is necessary.
Proposed solution
Detect directory
If a dir was explicitly specified with withTemporaryCredentialsDirectory() use this one
If target exists, use it
If build exists, use it
Else use target
Check if the directory exists and create it if necessary (this doesn't work currently).
This is related to https://github.com/exasol/exasol-testcontainers/issues/202 and https://github.com/exasol/exasol-testcontainers/issues/206.
Context
The latest version of ETC uses a temp directory to store SSH credentials. It uses
target
as default but this can be overwritten by calling.withTemporaryCredentialsDirectory()
.This behavior is fine for Maven projects but requires additional configuration for Gradle projects. Especially developers of Gradle projects who are not familiar with ETC will wonder why
.withTemporaryCredentialsDirectory(Path.of("build/"))
is necessary.Proposed solution
withTemporaryCredentialsDirectory()
use this onetarget
exists, use itbuild
exists, use ittarget