Quarkus IT that use Oracle DB don't work with -Dproduct (#23084)

Fixes #23058
This commit is contained in:
Martin Bartoš 2023-09-08 17:51:22 +02:00 committed by GitHub
parent 93a80e9278
commit a6ae1b9db7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 1 deletions

View file

@ -71,11 +71,23 @@
<artifactId>bctls-fips</artifactId>
<scope>test</scope>
</dependency>
<!-- JDBC Drivers -->
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.oracle.database.nls</groupId>
<artifactId>orai18n</artifactId>
<scope>test</scope>
</dependency>
<!-- Minimal test dependencies to *-deployment artifacts for consistent build order -->
<dependency>

View file

@ -92,10 +92,21 @@
<groupId>org.testcontainers</groupId>
<artifactId>mssqlserver</artifactId>
</dependency>
<!-- JDBC Drivers -->
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.nls</groupId>
<artifactId>orai18n</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http-shared</artifactId>

View file

@ -389,9 +389,12 @@ public final class RawKeycloakDistribution implements KeycloakDistribution {
if (!inited || (reCreate || !dPath.toFile().exists())) {
FileUtil.deleteDirectory(dPath);
ZipUtils.unzip(distFile.toPath(), distRootPath);
if (System.getProperty("product") != null) {
// MS SQL Server driver might be excluded if running as a product build
// JDBC drivers might be excluded if running as a product build
copyProvider(dPath, "com.microsoft.sqlserver", "mssql-jdbc");
copyProvider(dPath, "com.oracle.database.jdbc", "ojdbc11");
copyProvider(dPath, "com.oracle.database.nls", "orai18n");
}
}