Change mysql to mariadb connector

Replace the mysql connector used by Spring to mariadb
+ remove the Mysql connector from the clamp.jar

Change-Id: If7241e111d07ad98eba3b0fcb612b0f4711d683d
Issue-Id: CLAMP-52
Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
diff --git a/extra/docker/clamp/clamp.env b/extra/docker/clamp/clamp.env
index bac8fd3..d9ced6f 100644
--- a/extra/docker/clamp/clamp.env
+++ b/extra/docker/clamp/clamp.env
@@ -1 +1 @@
-SPRING_APPLICATION_JSON={"spring.datasource.camunda.url":"jdbc:mysql://db:3306/camundabpm?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&maxReconnects=100","spring.datasource.cldsdb.url":"jdbc:mysql://db:3306/cldsdb4?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&maxReconnects=100"}
\ No newline at end of file
+SPRING_APPLICATION_JSON={"spring.datasource.camunda.url":"jdbc:mariadb://db:3306/camundabpm?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&maxReconnects=100","spring.datasource.cldsdb.url":"jdbc:mariadb://db:3306/cldsdb4?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&maxReconnects=100"}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 23a2614..2c5290c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -316,6 +316,12 @@
 			<groupId>com.att.ajsc</groupId>
 			<artifactId>sdk-java-camunda-core</artifactId>
 			<version>${sdk.camunda.core}</version>
+			<exclusions>
+				<exclusion>
+					<groupId>mysql</groupId>
+					<artifactId>mysql-connector-java</artifactId>
+				</exclusion>
+			</exclusions>
 		</dependency>
 		<!-- Spring Mail -->
 		<dependency>
@@ -360,6 +366,10 @@
 					<artifactId>jackson-databind</artifactId>
 					<groupId>com.fasterxml.jackson.core</groupId>
 				</exclusion>
+				<exclusion>
+					<groupId>mysql</groupId>
+					<artifactId>mysql-connector-java</artifactId>
+				</exclusion>
 			</exclusions>
 		</dependency>
 		<dependency>
@@ -431,6 +441,12 @@
 			<version>2.1.7</version>
 		</dependency>
 
+		<!-- Remove the MYSQL connector and replace it by Mariadb -->
+		<dependency>
+			 <groupId>org.mariadb.jdbc</groupId>
+			 <artifactId>mariadb-java-client</artifactId>
+			 <version>2.1.1</version>
+		</dependency>
 	</dependencies>
 
 	<build>
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index d10b4f4..a665578 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -95,10 +95,10 @@
 #server.port=0

 

 #Camunda Process Engine DataSource connection Details

-spring.datasource.camunda.url=jdbc:mysql://localhost:${docker.mariadb.port.host}/camundabpm?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&maxReconnects=100

+spring.datasource.camunda.driverClassName=org.mariadb.jdbc.Driver

+spring.datasource.camunda.url=jdbc:mariadb://localhost:${docker.mariadb.port.host}/camundabpm?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&maxReconnects=100

 spring.datasource.camunda.username=camunda

 spring.datasource.camunda.password=ndMSpw4CAM

-spring.datasource.camunda.driverClassName=com.mysql.jdbc.Driver

 spring.datasource.camunda.validationQuery=SELECT 1

 spring.datasource.camunda.validationQueryTimeout=20000

 spring.datasource.camunda.validationInterval=60000

@@ -111,11 +111,10 @@
 camunda.bpm.history-level=auto

 

 #clds datasource connection details

-spring.datasource.cldsdb.driver-class-name=com.mysql.jdbc.Driver

-spring.datasource.cldsdb.url=jdbc:mysql://localhost:${docker.mariadb.port.host}/cldsdb4?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&maxReconnects=100

+spring.datasource.camunda.driverClassName=org.mariadb.jdbc.Driver

+spring.datasource.cldsdb.url=jdbc:mariadb://localhost:${docker.mariadb.port.host}/cldsdb4?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&maxReconnects=100

 spring.datasource.cldsdb.username=clds

 spring.datasource.cldsdb.password=sidnnd83K

-spring.datasource.cldsdb.driverClassName=com.mysql.jdbc.Driver

 spring.datasource.cldsdb.validationQuery=SELECT 1

 spring.datasource.cldsdb.validationQueryTimeout=20000

 spring.datasource.cldsdb.validationInterval=60000