Referencing information in pom.xml for the list of tested databases
Closes: #21349
This commit is contained in:
parent
a230a4588a
commit
3f1553c6cb
4 changed files with 24 additions and 14 deletions
|
@ -15,13 +15,13 @@ This {section} explains how to configure the Keycloak server to store data in a
|
|||
The server has built-in support for different databases. You can query the available databases by viewing the expected values for the `db` configuration option. The following table lists the supported databases and their tested versions.
|
||||
|
||||
|===
|
||||
|Database | Tested Version
|
||||
|Database | Option value | Tested Version
|
||||
|
||||
|mariadb| 10
|
||||
|mssql| 2016
|
||||
|mysql| 8
|
||||
|oracle| 12c
|
||||
|postgres| 15
|
||||
|MariaDB Server | `mariadb` | ${properties["mariadb.version"]}
|
||||
|Microsoft SQL Server | `mssql` | ${properties["mssql.version"]?replace("-latest","")}
|
||||
|MySQL | `mysql` | ${properties["mysql.version"]}
|
||||
|Oracle Database | `oracle` | ${properties["oracledb.version"]}
|
||||
|PostgreSQL | `postgres` | ${properties["postgresql.version"]}
|
||||
|===
|
||||
|
||||
By default, the server uses the `dev-file` database. This is the default database that the server will use to persist data and
|
||||
|
@ -131,16 +131,18 @@ Unicode is supported for a PostgreSQL database when the database character set i
|
|||
|
||||
. Check the default character set for a PostgreSQL cluster by entering the following SQL command.
|
||||
+
|
||||
```
|
||||
[source]
|
||||
----
|
||||
show server_encoding;
|
||||
```
|
||||
----
|
||||
|
||||
. If the default character set is not UTF 8, create the database with the UTF8 as the default character set using a command such as:
|
||||
|
||||
+
|
||||
```
|
||||
[source]
|
||||
----
|
||||
create database keycloak with encoding 'UTF8';
|
||||
```
|
||||
----
|
||||
|
||||
== Changing database locking timeout in a cluster configuration
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package org.keycloak.guides.maven;
|
|||
|
||||
import freemarker.template.TemplateException;
|
||||
import org.apache.maven.plugin.logging.Log;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.keycloak.common.Version;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -16,7 +17,7 @@ public class GuideBuilder {
|
|||
private final File targetDir;
|
||||
private final Log log;
|
||||
|
||||
public GuideBuilder(File srcDir, File targetDir, Log log) throws IOException {
|
||||
public GuideBuilder(File srcDir, File targetDir, Log log, MavenProject project) throws IOException {
|
||||
this.srcDir = srcDir;
|
||||
this.targetDir = targetDir;
|
||||
this.log = log;
|
||||
|
@ -24,13 +25,16 @@ public class GuideBuilder {
|
|||
Map<String, Object> globalAttributes = new HashMap<>();
|
||||
globalAttributes.put("ctx", new Context(srcDir));
|
||||
globalAttributes.put("version", Version.VERSION);
|
||||
globalAttributes.put("properties", project.getProperties());
|
||||
|
||||
this.freeMarker = new FreeMarker(srcDir.getParentFile(), globalAttributes);
|
||||
}
|
||||
|
||||
public void build() throws TemplateException, IOException {
|
||||
if (!srcDir.isDirectory()) {
|
||||
srcDir.mkdir();
|
||||
if (!srcDir.mkdir()) {
|
||||
throw new RuntimeException("Can't create folder " + srcDir);
|
||||
}
|
||||
}
|
||||
|
||||
for (String t : srcDir.list((dir, name) -> name.endsWith(".adoc"))) {
|
||||
|
|
|
@ -6,6 +6,7 @@ import org.apache.maven.plugin.logging.Log;
|
|||
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||
import org.apache.maven.plugins.annotations.Mojo;
|
||||
import org.apache.maven.plugins.annotations.Parameter;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.codehaus.plexus.util.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -19,6 +20,9 @@ public class GuideMojo extends AbstractMojo {
|
|||
@Parameter(property = "project.build.directory")
|
||||
private String targetDir;
|
||||
|
||||
@Parameter(defaultValue = "${project}", readonly = true, required = true)
|
||||
private MavenProject project;
|
||||
|
||||
@Override
|
||||
public void execute() throws MojoFailureException {
|
||||
try {
|
||||
|
@ -42,7 +46,7 @@ public class GuideMojo extends AbstractMojo {
|
|||
log.info("Guide dir: " + srcDir.getAbsolutePath());
|
||||
log.info("Target dir: " + targetDir.getAbsolutePath());
|
||||
|
||||
GuideBuilder g = new GuideBuilder(srcDir, targetDir, log);
|
||||
GuideBuilder g = new GuideBuilder(srcDir, targetDir, log, project);
|
||||
g.build();
|
||||
}
|
||||
}
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -157,7 +157,7 @@
|
|||
<twitter4j.version>4.1.2</twitter4j.version>
|
||||
<jna.version>4.5.1</jna.version>
|
||||
|
||||
<!-- Databases -->
|
||||
<!-- Databases - also published to db.adoc as "Tested Version" -->
|
||||
<mysql.version>8.0</mysql.version>
|
||||
<mysql-jdbc.version>8.0.30</mysql-jdbc.version>
|
||||
<postgresql.version>15</postgresql.version>
|
||||
|
|
Loading…
Reference in a new issue