summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRishi Chail <rishi.chail@est.tech>2020-09-21 11:27:32 +0100
committerRishi Chail <rishi.chail@est.tech>2020-09-21 11:49:59 +0100
commitb08767ed33915b9199f07cc9bca94b346e752196 (patch)
tree16544837569d29d44e02176406f7f57b4ad402e4
parentb220d74e147ebdb86c5416432968bef6de22ca77 (diff)
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>
-rw-r--r--cps/.gitignore2
-rw-r--r--cps/cps-rest/pom.xml6
-rw-r--r--cps/cps-rest/src/main/java/org/onap/cps/Application.java (renamed from cps/cps-rest/src/main/java/org/onap/cps/rest/Application.java)2
-rw-r--r--cps/cps-rest/src/main/resources/application.yml9
-rw-r--r--cps/cps-rest/src/main/resources/logback-spring.xml2
-rw-r--r--cps/cps-ri/pom.xml12
-rw-r--r--cps/cps-ri/src/main/resources/application.yml8
-rw-r--r--cps/cps-ri/src/main/resources/logback-spring.xml2
-rw-r--r--cps/cps-service/src/main/resources/logback-spring.xml2
9 files changed, 27 insertions, 18 deletions
diff --git a/cps/.gitignore b/cps/.gitignore
index ba64fc2fdf..624c9b63b9 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 41b5c42f32..0e8317b622 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
index 3183efc653..9f6c2edce9 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 ab19fe9aba..bc726694c7 100644
--- a/cps/cps-rest/src/main/resources/application.yml
+++ b/cps/cps-rest/src/main/resources/application.yml
@@ -4,6 +4,15 @@ server:
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 fce0aca2c4..8a4ae07c5b 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 3d0ccf0af3..0d6dcace4a 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 fc6883346e..0000000000
--- 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 fce0aca2c4..8a4ae07c5b 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 fce0aca2c4..8a4ae07c5b 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>