Refactoring springboot related template and pom-generation

Issue-ID: CCSDK-3629
Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
Change-Id: I0d0bb47e55a1f27131795e609e38c0952e763856
diff --git a/springboot/pom.xml b/springboot/pom.xml
index 26a51ef..7a9817d 100755
--- a/springboot/pom.xml
+++ b/springboot/pom.xml
@@ -18,7 +18,7 @@
     <modules>
         <module>spring-boot-setup</module>
         <module>springboot1</module>
-        <module>springboot2</module>
+        <module>springboot23</module>
         <module>springboot25</module>
         <module>springboot26</module>
     </modules>
diff --git a/springboot/spring-boot-setup/pom.xml b/springboot/spring-boot-setup/pom.xml
index 0ddf28d..6f18810 100644
--- a/springboot/spring-boot-setup/pom.xml
+++ b/springboot/spring-boot-setup/pom.xml
@@ -35,7 +35,7 @@
                                 <resource>
                                     <directory>src/main/resources</directory>
                                     <includes>
-                                        <include>pom-template.xml</include>
+                                        <include>pom-template-jdk8.xml</include>
                                     </includes>
                                     <filtering>true</filtering>
                                 </resource>
@@ -48,25 +48,73 @@
                         </configuration>
                     </execution>
                     <execution>
-                        <id>create-springboot2-parent-pom</id>
+                        <id>create-springboot23-parent-pom</id>
                         <goals>
                             <goal>copy-resources</goal>
                         </goals><!-- here the phase you need -->
                         <phase>validate</phase>
                         <configuration>
-                            <outputDirectory>../springboot2</outputDirectory>
+                            <outputDirectory>../springboot23</outputDirectory>
                             <resources>
                                 <resource>
                                     <directory>src/main/resources</directory>
                                     <includes>
-                                        <include>pom-template.xml</include>
+                                        <include>pom-template-jdk8.xml</include>
                                     </includes>
                                     <filtering>true</filtering>
                                 </resource>
                             </resources>
                             <escapeString>\</escapeString>
                             <filters>
-                                <filter>${basedir}/src/main/properties/springboot2.properties</filter>
+                                <filter>${basedir}/src/main/properties/springboot23.properties</filter>
+                            </filters>
+                            <encoding>UTF-8</encoding>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>create-springboot25-parent-pom</id>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals><!-- here the phase you need -->
+                        <phase>validate</phase>
+                        <configuration>
+                            <outputDirectory>../springboot25</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/resources</directory>
+                                    <includes>
+                                        <include>pom-template-jdk11.xml</include>
+                                    </includes>
+                                    <filtering>true</filtering>
+                                </resource>
+                            </resources>
+                            <escapeString>\</escapeString>
+                            <filters>
+                                <filter>${basedir}/src/main/properties/springboot25.properties</filter>
+                            </filters>
+                            <encoding>UTF-8</encoding>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>create-springboot26-parent-pom</id>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals><!-- here the phase you need -->
+                        <phase>validate</phase>
+                        <configuration>
+                            <outputDirectory>../springboot26</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/resources</directory>
+                                    <includes>
+                                        <include>pom-template-jdk11.xml</include>
+                                    </includes>
+                                    <filtering>true</filtering>
+                                </resource>
+                            </resources>
+                            <escapeString>\</escapeString>
+                            <filters>
+                                <filter>${basedir}/src/main/properties/springboot26.properties</filter>
                             </filters>
                             <encoding>UTF-8</encoding>
                         </configuration>
@@ -85,19 +133,41 @@
                             <goal>rename</goal>
                         </goals>
                         <configuration>
-                            <sourceFile>../springboot1/pom-template.xml</sourceFile>
+                            <sourceFile>../springboot1/pom-template-jdk8.xml</sourceFile>
                             <destinationFile>../springboot1/pom.xml</destinationFile>
                         </configuration>
                     </execution>
                     <execution>
-                        <id>rename-springboot2-parent-pom</id>
+                        <id>rename-springboot23-parent-pom</id>
                         <phase>validate</phase>
                         <goals>
                             <goal>rename</goal>
                         </goals>
                         <configuration>
-                            <sourceFile>../springboot2/pom-template.xml</sourceFile>
-                            <destinationFile>../springboot2/pom.xml</destinationFile>
+                            <sourceFile>../springboot23/pom-template-jdk8.xml</sourceFile>
+                            <destinationFile>../springboot23/pom.xml</destinationFile>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>rename-springboot25-parent-pom</id>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>rename</goal>
+                        </goals>
+                        <configuration>
+                            <sourceFile>../springboot25/pom-template-jdk11.xml</sourceFile>
+                            <destinationFile>../springboot25/pom.xml</destinationFile>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>rename-springboot26-parent-pom</id>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>rename</goal>
+                        </goals>
+                        <configuration>
+                            <sourceFile>../springboot26/pom-template-jdk11.xml</sourceFile>
+                            <destinationFile>../springboot26/pom.xml</destinationFile>
                         </configuration>
                     </execution>
                 </executions>
diff --git a/springboot/spring-boot-setup/src/main/properties/springboot2.properties b/springboot/spring-boot-setup/src/main/properties/springboot23.properties
similarity index 100%
rename from springboot/spring-boot-setup/src/main/properties/springboot2.properties
rename to springboot/spring-boot-setup/src/main/properties/springboot23.properties
diff --git a/springboot/spring-boot-setup/src/main/resources/pom-template.xml b/springboot/spring-boot-setup/src/main/resources/pom-template-jdk11.xml
similarity index 97%
copy from springboot/spring-boot-setup/src/main/resources/pom-template.xml
copy to springboot/spring-boot-setup/src/main/resources/pom-template-jdk11.xml
index 69fd35e..6718d61 100644
--- a/springboot/spring-boot-setup/src/main/resources/pom-template.xml
+++ b/springboot/spring-boot-setup/src/main/resources/pom-template-jdk11.xml
@@ -2,7 +2,7 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <!-- PLEASE READ !!!!! This file is generated from ccsdk/parent/springboot/spring-boot-setup/src/main/template/pom-template.xml
+    <!-- PLEASE READ !!!!! This file is generated from ccsdk/parent/springboot/spring-boot-setup/src/main/template/pom-template-jdk11.xml
         Any updates needed should be made to that template and not to the generated
         pom.xml file -->
     <parent>
@@ -54,8 +54,6 @@
         <jacoco.version>0.8.5</jacoco.version>
         <!-- properties from oparent -->
 
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
         <!-- sitePath may be overridden in the inheriting POM if desired -->
@@ -79,10 +77,9 @@
         <onap.nexus.staging.server-id>ecomp-staging</onap.nexus.staging.server-id>
         <onap.nexus.staging.profile-id>176c31dfe190a</onap.nexus.staging.profile-id>
 
-        <java.version.source>1.8</java.version.source>
-        <java.version.target>1.8</java.version.target>
+        <java.version>11</java.version>
         <bundle.plugin.version>2.5.0</bundle.plugin.version>
-        <maven.compile.plugin.version>2.5.1</maven.compile.plugin.version>
+        <maven.compile.plugin.version>3.8.1</maven.compile.plugin.version>
         <features.file>features.xml</features.file>
         <jmxGeneratorPath>src/main/yang-gen-config</jmxGeneratorPath>
         <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
@@ -132,7 +129,7 @@
         <jettison.version>1.3.8</jettison.version>
         <log4j.version>2.17.1</log4j.version>
         <log4j2.version>2.17.1</log4j2.version>
-        <logback.version>1.2.3</logback.version>
+        <logback.version>${springboot.logback.version}</logback.version>
         <mariadb.connector.version>2.7.3</mariadb.connector.version>
         <mariadb4j.version>2.4.0</mariadb4j.version>
         <slf4j.version>${springboot.slf4j.version}</slf4j.version>
@@ -202,16 +199,6 @@
                 <groupId>org.liquibase</groupId>
                 <artifactId>liquibase-core</artifactId>
                 <version>4.4.2-nordix</version>
-            </dependency>   
-            <dependency>
-                <groupId>org.apache.logging.log4j</groupId>
-                <artifactId>log4j-api</artifactId>
-                <version>${log4j2.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.logging.log4j</groupId>
-                <artifactId>log4j-core</artifactId>
-                <version>${log4j2.version}</version>
             </dependency>
         </dependencies>
     </dependencyManagement>
@@ -452,8 +439,10 @@
                     <artifactId>maven-compiler-plugin</artifactId>
                     <version>\${maven.compile.plugin.version}</version>
                     <configuration>
-                        <source>\${java.version.source}</source>
-                        <target>\${java.version.target}</target>
+                        <release>\${java.version}</release>
+                        <!--explicitly remove source and target-->
+                        <source combine.self="override"/>
+                        <target combine.self="override"/>
                     </configuration>
                 </plugin>
                 <plugin>
diff --git a/springboot/spring-boot-setup/src/main/resources/pom-template.xml b/springboot/spring-boot-setup/src/main/resources/pom-template-jdk8.xml
similarity index 99%
rename from springboot/spring-boot-setup/src/main/resources/pom-template.xml
rename to springboot/spring-boot-setup/src/main/resources/pom-template-jdk8.xml
index 69fd35e..af90750 100644
--- a/springboot/spring-boot-setup/src/main/resources/pom-template.xml
+++ b/springboot/spring-boot-setup/src/main/resources/pom-template-jdk8.xml
@@ -2,7 +2,7 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <!-- PLEASE READ !!!!! This file is generated from ccsdk/parent/springboot/spring-boot-setup/src/main/template/pom-template.xml
+    <!-- PLEASE READ !!!!! This file is generated from ccsdk/parent/springboot/spring-boot-setup/src/main/template/pom-template-jdk8.xml
         Any updates needed should be made to that template and not to the generated
         pom.xml file -->
     <parent>
@@ -132,7 +132,7 @@
         <jettison.version>1.3.8</jettison.version>
         <log4j.version>2.17.1</log4j.version>
         <log4j2.version>2.17.1</log4j2.version>
-        <logback.version>1.2.3</logback.version>
+        <logback.version>${springboot.logback.version}</logback.version>
         <mariadb.connector.version>2.7.3</mariadb.connector.version>
         <mariadb4j.version>2.4.0</mariadb4j.version>
         <slf4j.version>${springboot.slf4j.version}</slf4j.version>
@@ -202,7 +202,7 @@
                 <groupId>org.liquibase</groupId>
                 <artifactId>liquibase-core</artifactId>
                 <version>4.4.2-nordix</version>
-            </dependency>   
+            </dependency>
             <dependency>
                 <groupId>org.apache.logging.log4j</groupId>
                 <artifactId>log4j-api</artifactId>
diff --git a/springboot/springboot1/pom.xml b/springboot/springboot1/pom.xml
index e693ea7..4d0946d 100644
--- a/springboot/springboot1/pom.xml
+++ b/springboot/springboot1/pom.xml
@@ -2,7 +2,7 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <!-- PLEASE READ !!!!! This file is generated from ccsdk/parent/springboot/spring-boot-setup/src/main/template/pom-template.xml
+    <!-- PLEASE READ !!!!! This file is generated from ccsdk/parent/springboot/spring-boot-setup/src/main/template/pom-template-jdk8.xml
         Any updates needed should be made to that template and not to the generated
         pom.xml file -->
     <parent>
@@ -202,7 +202,7 @@
                 <groupId>org.liquibase</groupId>
                 <artifactId>liquibase-core</artifactId>
                 <version>4.4.2-nordix</version>
-            </dependency>   
+            </dependency>
             <dependency>
                 <groupId>org.apache.logging.log4j</groupId>
                 <artifactId>log4j-api</artifactId>
diff --git a/springboot/springboot2/pom.xml b/springboot/springboot23/pom.xml
similarity index 99%
rename from springboot/springboot2/pom.xml
rename to springboot/springboot23/pom.xml
index f93a9b3..d432323 100644
--- a/springboot/springboot2/pom.xml
+++ b/springboot/springboot23/pom.xml
@@ -2,7 +2,7 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <!-- PLEASE READ !!!!! This file is generated from ccsdk/parent/springboot/spring-boot-setup/src/main/template/pom-template.xml
+    <!-- PLEASE READ !!!!! This file is generated from ccsdk/parent/springboot/spring-boot-setup/src/main/template/pom-template-jdk8.xml
         Any updates needed should be made to that template and not to the generated
         pom.xml file -->
     <parent>
@@ -202,7 +202,7 @@
                 <groupId>org.liquibase</groupId>
                 <artifactId>liquibase-core</artifactId>
                 <version>4.4.2-nordix</version>
-            </dependency>   
+            </dependency>
             <dependency>
                 <groupId>org.apache.logging.log4j</groupId>
                 <artifactId>log4j-api</artifactId>
diff --git a/springboot/springboot25/pom.xml b/springboot/springboot25/pom.xml
index d7e828d..c946d46 100644
--- a/springboot/springboot25/pom.xml
+++ b/springboot/springboot25/pom.xml
@@ -2,7 +2,9 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <!-- PLEASE READ !!!!! This file was originally generated from ccsdk/parent/springboot/spring-boot-setup/src/main/template/pom-template.xml -->
+    <!-- PLEASE READ !!!!! This file is generated from ccsdk/parent/springboot/spring-boot-setup/src/main/template/pom-template-jdk11.xml
+        Any updates needed should be made to that template and not to the generated
+        pom.xml file -->
     <parent>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
@@ -16,7 +18,7 @@
     <packaging>pom</packaging>
 
     <name>ONAP :: ${project.groupId} :: ${project.artifactId}</name>
-    <description>Root POM to be used in place of spring-boot parent for CCSDK based projects (Spring-boot 2.5)</description>
+    <description>Root POM to be used in place of spring-boot parent for CCSDK based projects</description>
     <url>http://wiki.onap.org</url>
     <organization>
         <name>ONAP</name>
@@ -77,7 +79,7 @@
 
         <java.version>11</java.version>
         <bundle.plugin.version>2.5.0</bundle.plugin.version>
-        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
+        <maven.compile.plugin.version>3.8.1</maven.compile.plugin.version>
         <features.file>features.xml</features.file>
         <jmxGeneratorPath>src/main/yang-gen-config</jmxGeneratorPath>
         <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
@@ -87,10 +89,10 @@
         <logging-analytics.version>1.6.9</logging-analytics.version>
 
         <!-- CCSDK component versions -->
-        <ccsdk.cds.version>(1.1.99999,1.2.99999-SNAPSHOT)</ccsdk.cds.version>
-        <ccsdk.features.version>(1.1.99999, 1.2.99999-SNAPSHOT)</ccsdk.features.version>
-        <ccsdk.distribution.version>(1.1.99999, 1.2.99999-SNAPSHOT)</ccsdk.distribution.version>
-        <ccsdk.sli.version>1.3.1</ccsdk.sli.version>
+        <ccsdk.cds.version>(1.3.99999,1.4.99999-SNAPSHOT]</ccsdk.cds.version>
+        <ccsdk.features.version>(1.3.99999, 1.4.99999-SNAPSHOT]</ccsdk.features.version>
+        <ccsdk.distribution.version>(1.3.99999, 1.4.99999-SNAPSHOT]</ccsdk.distribution.version>
+        <ccsdk.sli.version>(1.4.99999, 1.5.99999-SNAPSHOT]</ccsdk.sli.version>
         <ccsdk.sli.core.version>${ccsdk.sli.version}</ccsdk.sli.core.version>
         <ccsdk.sli.adaptors.version>${ccsdk.sli.version}</ccsdk.sli.adaptors.version>
         <ccsdk.sli.northbound.version>${ccsdk.sli.version}</ccsdk.sli.northbound.version>
@@ -197,7 +199,7 @@
                 <groupId>org.liquibase</groupId>
                 <artifactId>liquibase-core</artifactId>
                 <version>4.4.2-nordix</version>
-            </dependency>   
+            </dependency>
         </dependencies>
     </dependencyManagement>
 
@@ -435,7 +437,7 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-compiler-plugin</artifactId>
-                    <version>${maven-compiler-plugin.version}</version>
+                    <version>${maven.compile.plugin.version}</version>
                     <configuration>
                         <release>${java.version}</release>
                         <!--explicitly remove source and target-->
@@ -1085,4 +1087,4 @@
         </profile>
         <!-- End of profiles from ONAP oparent -->
     </profiles>
-</project>
\ No newline at end of file
+</project>
diff --git a/springboot/springboot26/pom.xml b/springboot/springboot26/pom.xml
index d23cf3a..532b17e 100644
--- a/springboot/springboot26/pom.xml
+++ b/springboot/springboot26/pom.xml
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
-    <!-- PLEASE READ !!!!! This file is generated from ccsdk/parent/springboot/spring-boot-setup/src/main/template/pom-template.xml
+
+    <!-- PLEASE READ !!!!! This file is generated from ccsdk/parent/springboot/spring-boot-setup/src/main/template/pom-template-jdk11.xml
         Any updates needed should be made to that template and not to the generated
         pom.xml file -->
     <parent>
@@ -17,7 +18,7 @@
     <packaging>pom</packaging>
 
     <name>ONAP :: ${project.groupId} :: ${project.artifactId}</name>
-    <description>Root POM to be used in place of spring-boot parent for CCSDK based projects (Spring-boot 2.6)</description>
+    <description>Root POM to be used in place of spring-boot parent for CCSDK based projects</description>
     <url>http://wiki.onap.org</url>
     <organization>
         <name>ONAP</name>
@@ -78,7 +79,7 @@
 
         <java.version>11</java.version>
         <bundle.plugin.version>2.5.0</bundle.plugin.version>
-        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
+        <maven.compile.plugin.version>3.8.1</maven.compile.plugin.version>
         <features.file>features.xml</features.file>
         <jmxGeneratorPath>src/main/yang-gen-config</jmxGeneratorPath>
         <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
@@ -88,10 +89,10 @@
         <logging-analytics.version>1.6.9</logging-analytics.version>
 
         <!-- CCSDK component versions -->
-        <ccsdk.cds.version>(1.1.99999,1.2.99999-SNAPSHOT)</ccsdk.cds.version>
-        <ccsdk.features.version>(1.1.99999, 1.2.99999-SNAPSHOT)</ccsdk.features.version>
-        <ccsdk.distribution.version>(1.1.99999, 1.2.99999-SNAPSHOT)</ccsdk.distribution.version>
-        <ccsdk.sli.version>1.3.1</ccsdk.sli.version>
+        <ccsdk.cds.version>(1.3.99999,1.4.99999-SNAPSHOT]</ccsdk.cds.version>
+        <ccsdk.features.version>(1.3.99999, 1.4.99999-SNAPSHOT]</ccsdk.features.version>
+        <ccsdk.distribution.version>(1.3.99999, 1.4.99999-SNAPSHOT]</ccsdk.distribution.version>
+        <ccsdk.sli.version>(1.4.99999, 1.5.99999-SNAPSHOT]</ccsdk.sli.version>
         <ccsdk.sli.core.version>${ccsdk.sli.version}</ccsdk.sli.core.version>
         <ccsdk.sli.adaptors.version>${ccsdk.sli.version}</ccsdk.sli.adaptors.version>
         <ccsdk.sli.northbound.version>${ccsdk.sli.version}</ccsdk.sli.northbound.version>
@@ -99,6 +100,7 @@
 
         <!-- Spring versions -->
         <spring.boot.version>2.6.6</spring.boot.version>
+        <spring.version>5.3.18</spring.version>
 
         <!-- Kotlin versions -->
         <kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
@@ -197,7 +199,7 @@
                 <groupId>org.liquibase</groupId>
                 <artifactId>liquibase-core</artifactId>
                 <version>4.4.2-nordix</version>
-            </dependency>   
+            </dependency>
         </dependencies>
     </dependencyManagement>
 
@@ -435,7 +437,7 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-compiler-plugin</artifactId>
-                    <version>${maven-compiler-plugin.version}</version>
+                    <version>${maven.compile.plugin.version}</version>
                     <configuration>
                         <release>${java.version}</release>
                         <!--explicitly remove source and target-->