DP: Project Structure and basic conf
Issue-ID: CCSDK-2749
https: //jira.onap.org/browse/CCSDK-2749
Signed-off-by: Rishi Chail <rishi.chail@est.tech>
Change-Id: Ib2139263be435414855e2f487e96c2122f21c978
Signed-off-by: Rishi Chail <rishi.chail@est.tech>
diff --git a/cps/.gitignore b/cps/.gitignore
index ba64fc2..624c9b6 100644
--- a/cps/.gitignore
+++ b/cps/.gitignore
@@ -1,6 +1,8 @@
*.class
*.jar
*.war
+*.zip
+*.log
target/
log/
diff --git a/cps/cps-rest/pom.xml b/cps/cps-rest/pom.xml
index 41b5c42..0e8317b 100644
--- a/cps/cps-rest/pom.xml
+++ b/cps/cps-rest/pom.xml
@@ -21,12 +21,6 @@
<groupId>org.onap.cps</groupId>
<artifactId>cps-ri</artifactId>
<version>${project.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-jpa</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
diff --git a/cps/cps-rest/src/main/java/org/onap/cps/rest/Application.java b/cps/cps-rest/src/main/java/org/onap/cps/Application.java
similarity index 97%
rename from cps/cps-rest/src/main/java/org/onap/cps/rest/Application.java
rename to cps/cps-rest/src/main/java/org/onap/cps/Application.java
index 3183efc..9f6c2ed 100644
--- a/cps/cps-rest/src/main/java/org/onap/cps/rest/Application.java
+++ b/cps/cps-rest/src/main/java/org/onap/cps/Application.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.cps.rest;
+package org.onap.cps;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/cps/cps-rest/src/main/resources/application.yml b/cps/cps-rest/src/main/resources/application.yml
index ab19fe9..bc72669 100644
--- a/cps/cps-rest/src/main/resources/application.yml
+++ b/cps/cps-rest/src/main/resources/application.yml
@@ -4,6 +4,15 @@
spring:
main:
banner-mode: "off"
+ # for POC only, later this should move to cpi-ri module
+ jpa:
+ hibernate:
+ ddl-auto: create
+ datasource:
+ url: jdbc:mariadb://${DB_HOST}:3306/${DB_NAME}
+ username: ${USERNAME}
+ password: ${PWD}
+ driverClassName: org.mariadb.jdbc.Driver
logging:
level:
diff --git a/cps/cps-rest/src/main/resources/logback-spring.xml b/cps/cps-rest/src/main/resources/logback-spring.xml
index fce0aca..8a4ae07 100644
--- a/cps/cps-rest/src/main/resources/logback-spring.xml
+++ b/cps/cps-rest/src/main/resources/logback-spring.xml
@@ -19,7 +19,7 @@
<file>../log/${logName}.log</file>
<rollingPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${debugLogName}.%d{yyyy-MM-dd}.%i.log.zip
+ <fileNamePattern>${logName}.%d{yyyy-MM-dd}.%i.log.zip
</fileNamePattern>
<maxFileSize>${maxFileSize}</maxFileSize>
<maxHistory>${maxHistory}</maxHistory>
diff --git a/cps/cps-ri/pom.xml b/cps/cps-ri/pom.xml
index 3d0ccf0..0d6dcac 100644
--- a/cps/cps-ri/pom.xml
+++ b/cps/cps-ri/pom.xml
@@ -12,6 +12,13 @@
<dependencies>
<dependency>
+ <groupId>org.onap.cps</groupId>
+ <artifactId>cps-service</artifactId>
+ <version>${project.version}</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
@@ -22,6 +29,11 @@
</dependency>
<dependency>
+ <groupId>org.mariadb.jdbc</groupId>
+ <artifactId>mariadb-java-client</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
diff --git a/cps/cps-ri/src/main/resources/application.yml b/cps/cps-ri/src/main/resources/application.yml
deleted file mode 100644
index fc68833..0000000
--- a/cps/cps-ri/src/main/resources/application.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-spring:
- jpa:
- hibernate:
- ddl-auto: create
- datasource:
- url: jdbc:mariadb://${DB_HOST}:3306/${DB_NAME}
- username: ${USERNAME}
- password: ${PWD}
\ No newline at end of file
diff --git a/cps/cps-ri/src/main/resources/logback-spring.xml b/cps/cps-ri/src/main/resources/logback-spring.xml
index fce0aca..8a4ae07 100644
--- a/cps/cps-ri/src/main/resources/logback-spring.xml
+++ b/cps/cps-ri/src/main/resources/logback-spring.xml
@@ -19,7 +19,7 @@
<file>../log/${logName}.log</file>
<rollingPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${debugLogName}.%d{yyyy-MM-dd}.%i.log.zip
+ <fileNamePattern>${logName}.%d{yyyy-MM-dd}.%i.log.zip
</fileNamePattern>
<maxFileSize>${maxFileSize}</maxFileSize>
<maxHistory>${maxHistory}</maxHistory>
diff --git a/cps/cps-service/src/main/resources/logback-spring.xml b/cps/cps-service/src/main/resources/logback-spring.xml
index fce0aca..8a4ae07 100644
--- a/cps/cps-service/src/main/resources/logback-spring.xml
+++ b/cps/cps-service/src/main/resources/logback-spring.xml
@@ -19,7 +19,7 @@
<file>../log/${logName}.log</file>
<rollingPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${debugLogName}.%d{yyyy-MM-dd}.%i.log.zip
+ <fileNamePattern>${logName}.%d{yyyy-MM-dd}.%i.log.zip
</fileNamePattern>
<maxFileSize>${maxFileSize}</maxFileSize>
<maxHistory>${maxHistory}</maxHistory>