How to use mariadb and liquibase together with maven on jboss

First you must define the needed dependency in your pom file. <profile> <id>mariadb</id> <activation> <proper...


First you must define the needed dependency in your pom file.
<profile>
<id>mariadb</id>
<activation>
<property>
<name>env</name>
<value>mariadb</value>
</property>
</activation>
<properties>
<db.driver>org.mariadb.jdbc.Driver</db.driver>
<db.url>jdbc:mariadb://localhost:3306/mariadb</db.url>
<db.username>mariadb</db.username>
<db.password>mariadb</db.password>
</properties>
<dependencies>
<!-- Dependency for liquibase plugin -->
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>1.5.4</version>
</dependency>
</dependencies>
</profile>
Then we need to configure jboss datasource
<datasource jta="true"
jndi-name="java:jboss/datasources/MariaDBAdminDatasource" pool-name="MariaDBMariadb"
enabled="true" use-java-context="true" use-ccm="false">
<connection-url>jdbc:mariadb://127.0.0.1:3306/MariaDB</connection-url>
<driver-class>org.mariadb.jdbc.Driver</driver-class>
<driver>mariadb-driver</driver>
<pool>
<min-pool-size>2</min-pool-size>
<max-pool-size>20</max-pool-size>
</pool>
<security>
<user-name>MariaDB</user-name>
<password>MariaDB</password>
</security>
<validation>
<validate-on-match>true</validate-on-match>
<background-validation>true</background-validation>
<check-valid-connection-sql>select 1</check-valid-connection-sql>
</validation>
<statement>
<prepared-statement-cache-size>10</prepared-statement-cache-size>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>

<drivers>
<driver name="mariadb-driver" module="org.mariadb">
<xa-datasource-class>org.mariadb.jdbc.MySQLDataSource</xa-datasource-class>
</driver>
</drivers>
And finally inside jboss modules folder we need to create a new folder: org\mariadb\main with mariadb-java-client-1.5.4.jar and module.xml. Content of module.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="org.mariadb">
<resources>
<resource-root path="mariadb-java-client-1.5.4.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>

COMMENTS

mas template
Name

amazon,1,angular,8,bigdata,2,business,1,course-spring,27,courses,6,database,4,docker,3,java,50,kafka,1,keycloak,4,microservices,5,mysql,1,neworking,1,nosql,2,php,1,pinned,2,react,3,server management,7,shared drive,1,spring,7,synology,1,troubleshooting,2,web,1,wordpress,1,
ltr
item
toztech: How to use mariadb and liquibase together with maven on jboss
How to use mariadb and liquibase together with maven on jboss
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZalAfvQAYmicolu_KtV_9T7C8kzEsWQzNo_4JoWaqTa19nyY-4QSoDj8fu5l_Z3_5CEZ90d5d1qghj2F7_956Mm8tcLE9AAkxjtkxQXNvrlQuTlGKCNuMm_avsUc2JQTyXQycrHgcE1g/s320/liquibase.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZalAfvQAYmicolu_KtV_9T7C8kzEsWQzNo_4JoWaqTa19nyY-4QSoDj8fu5l_Z3_5CEZ90d5d1qghj2F7_956Mm8tcLE9AAkxjtkxQXNvrlQuTlGKCNuMm_avsUc2JQTyXQycrHgcE1g/s72-c/liquibase.png
toztech
https://toztech.blogspot.com/2017/02/how-to-use-mariadb-and-liquibase.html
https://toztech.blogspot.com/
https://toztech.blogspot.com/
https://toztech.blogspot.com/2017/02/how-to-use-mariadb-and-liquibase.html
true
2554149350007112447
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content