Merge "Fetching data node by xpath - persistence layer"
diff --git a/cps-application/pom.xml b/cps-application/pom.xml
new file mode 100644
index 0000000..744efb2
--- /dev/null
+++ b/cps-application/pom.xml
@@ -0,0 +1,131 @@
+<?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>
+
+    <parent>
+        <groupId>org.onap.cps</groupId>
+        <artifactId>cps-parent</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+        <relativePath>../cps-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>cps-application</artifactId>
+
+    <properties>
+        <minimum-coverage>0.0</minimum-coverage>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-sleuth</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>com.google.cloud.tools</groupId>
+                    <artifactId>jib-maven-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <phase>package</phase>
+                            <id>build</id>
+                            <goals>
+                                <goal>dockerBuild</goal>
+                            </goals>
+                        </execution>
+                        <execution>
+                            <phase>deploy</phase>
+                            <id>buildAndPush</id>
+                            <goals>
+                                <goal>build</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>com.google.cloud.tools</groupId>
+                <artifactId>jib-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+    <profiles>
+        <profile>
+            <id>cps-docker</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>${project.groupId}</groupId>
+                    <artifactId>cps-rest</artifactId>
+                </dependency>
+            </dependencies>
+        </profile>
+        <profile>
+            <id>xnf-docker</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+            </activation>
+
+            <properties>
+                <app>org.onap.cps.Application</app>
+                <repository.name>nexus3.onap.org:10001/onap/cps-nf-proxy</repository.name>
+            </properties>
+
+            <dependencies>
+                <dependency>
+                    <groupId>${project.groupId}</groupId>
+                    <artifactId>cps-nf-proxy-rest</artifactId>
+                </dependency>
+            </dependencies>
+        </profile>
+        <profile>
+            <id>cps-xnf-docker</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+            </activation>
+
+            <properties>
+                <app>org.onap.cps.Application</app>
+                <repository.name>nexus3.onap.org:10001/onap/cps-and-nf-proxy</repository.name><!-- better naming? -->
+            </properties>
+
+            <dependencies>
+                <dependency>
+                    <groupId>${project.groupId}</groupId>
+                    <artifactId>cps-rest</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>${project.groupId}</groupId>
+                    <artifactId>cps-nf-proxy-rest</artifactId>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
+</project>
\ No newline at end of file
diff --git a/cps-rest/src/main/java/org/onap/cps/Application.java b/cps-application/src/main/java/org/onap/cps/Application.java
similarity index 100%
rename from cps-rest/src/main/java/org/onap/cps/Application.java
rename to cps-application/src/main/java/org/onap/cps/Application.java
diff --git a/cps-bom/pom.xml b/cps-bom/pom.xml
index cc89de7..3d43f6c 100644
--- a/cps-bom/pom.xml
+++ b/cps-bom/pom.xml
@@ -33,32 +33,37 @@
     <dependencyManagement>
         <dependencies>
             <dependency>
-                <groupId>org.onap.cps</groupId>
+                <groupId>${project.groupId}</groupId>
                 <artifactId>cps-service</artifactId>
                 <version>${project.version}</version>
             </dependency>
             <dependency>
-                <groupId>org.onap.cps</groupId>
+                <groupId>${project.groupId}</groupId>
                 <artifactId>cps-rest</artifactId>
                 <version>${project.version}</version>
             </dependency>
             <dependency>
-                <groupId>org.onap.cps</groupId>
+                <groupId>${project.groupId}</groupId>
                 <artifactId>cps-nf-proxy-rest</artifactId>
                 <version>${project.version}</version>
             </dependency>
             <dependency>
-                <groupId>org.onap.cps</groupId>
+                <groupId>${project.groupId}</groupId>
                 <artifactId>cps-ri</artifactId>
                 <version>${project.version}</version>
             </dependency>
             <dependency>
-                <groupId>org.onap.cps</groupId>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>cps-application</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
                 <artifactId>checkstyle</artifactId>
                 <version>${project.version}</version>
             </dependency>
             <dependency>
-                <groupId>org.onap.cps</groupId>
+                <groupId>${project.groupId}</groupId>
                 <artifactId>spotbugs</artifactId>
                 <version>${project.version}</version>
             </dependency>
diff --git a/cps-dependencies/pom.xml b/cps-dependencies/pom.xml
index 23683f6..1beee11 100755
--- a/cps-dependencies/pom.xml
+++ b/cps-dependencies/pom.xml
@@ -26,6 +26,7 @@
         <spock-spring.version>1.3-groovy-2.5</spock-spring.version>
         <spotbugs.version>4.2.0</spotbugs.version>
         <springboot.version>2.3.8.RELEASE</springboot.version>
+        <springboot.cloud.version>Hoxton.SR9</springboot.cloud.version>
         <springfox.version>3.0.0</springfox.version>
         <swagger.version>2.1.4</swagger.version>
         <testcontainers.version>1.15.1</testcontainers.version>
@@ -55,6 +56,13 @@
                 <scope>import</scope>
             </dependency>
             <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <version>${springboot.cloud.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yangtools-artifacts</artifactId>
                 <version>${yangtools.version}</version>
@@ -66,6 +74,12 @@
                 <artifactId>swagger-annotations</artifactId>
                 <version>${swagger.version}</version>
             </dependency>
+            <!---To be removed once swagger-codegen-maven-plugin is upgraded-->
+            <dependency>
+                <groupId>io.swagger</groupId>
+                <artifactId>swagger-annotations</artifactId>
+                <version>1.6.2</version>
+            </dependency>
             <dependency>
                 <groupId>io.springfox</groupId>
                 <artifactId>springfox-boot-starter</artifactId>
diff --git a/cps-nf-proxy-rest/pom.xml b/cps-nf-proxy-rest/pom.xml
index 7b56014..ca2cf83 100755
--- a/cps-nf-proxy-rest/pom.xml
+++ b/cps-nf-proxy-rest/pom.xml
@@ -12,9 +12,7 @@
     <artifactId>cps-nf-proxy-rest</artifactId>
 
     <properties>
-        <app>org.onap.cps.nfproxy.Application</app>
-        <repository.name>nexus3.onap.org:10001/onap/cps-nf-proxy</repository.name>
-        <minimum-coverage>0.44</minimum-coverage>
+        <minimum-coverage>0.0</minimum-coverage>
     </properties>
 
     <dependencies>
@@ -53,6 +51,10 @@
             <artifactId>springfox-boot-starter</artifactId>
         </dependency>
         <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-annotations</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
         </dependency>
@@ -92,10 +94,6 @@
 
     <build>
         <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-            </plugin>
             <!-- Swagger code generation. -->
             <plugin>
                 <groupId>io.swagger.codegen.v3</groupId>
@@ -112,44 +110,16 @@
                             <apiPackage>org.onap.cps.nfproxy.rest.api</apiPackage>
                             <language>spring</language>
                             <generateSupportingFiles>false</generateSupportingFiles>
+                            <configOptions>
+                                <sourceFolder>src/gen/java</sourceFolder>
+                                <dateLibrary>java11</dateLibrary>
+                                <interfaceOnly>true</interfaceOnly>
+                                <useTags>true</useTags>
+                            </configOptions>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
         </plugins>
     </build>
-
-    <profiles>
-        <profile>
-            <id>docker</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>com.google.cloud.tools</groupId>
-                        <artifactId>jib-maven-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <phase>package</phase>
-                                <id>build</id>
-                                <goals>
-                                    <goal>dockerBuild</goal>
-                                </goals>
-                            </execution>
-                            <execution>
-                                <phase>deploy</phase>
-                                <id>buildAndPush</id>
-                                <goals>
-                                    <goal>build</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-
 </project>
diff --git a/cps-nf-proxy-rest/src/main/java/org/onap/cps/nfproxy/Application.java b/cps-nf-proxy-rest/src/main/java/org/onap/cps/nfproxy/Application.java
deleted file mode 100644
index abad806..0000000
--- a/cps-nf-proxy-rest/src/main/java/org/onap/cps/nfproxy/Application.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *  ============LICENSE_START=======================================================
- *  Copyright (C) 2021 Pantheon.tech
- *  ================================================================================
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *  SPDX-License-Identifier: Apache-2.0
- *  ============LICENSE_END=========================================================
- */
-
-package org.onap.cps.nfproxy;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class Application {
-    public static void main(final String[] args) {
-        SpringApplication.run(Application.class, args);
-    }
-}
diff --git a/cps-nf-proxy-rest/src/main/java/org/onap/cps/nfproxy/config/NfProxyConfig.java b/cps-nf-proxy-rest/src/main/java/org/onap/cps/nfproxy/config/NfProxyConfig.java
old mode 100755
new mode 100644
index 3bdedc3..defe0f1
--- a/cps-nf-proxy-rest/src/main/java/org/onap/cps/nfproxy/config/NfProxyConfig.java
+++ b/cps-nf-proxy-rest/src/main/java/org/onap/cps/nfproxy/config/NfProxyConfig.java
@@ -33,9 +33,11 @@
     /**
      * Swagger-ui configuration.
      */
-    @Bean
+    @Bean("nf-proxy-docket")
     public Docket api() {
-        return new Docket(DocumentationType.OAS_30).select()
+        return new Docket(DocumentationType.OAS_30)
+            .groupName("nf-proxy-docket")
+            .select()
             .apis(RequestHandlerSelectors.any())
             .paths(PathSelectors.any())
             .build();
diff --git a/cps-nf-proxy-rest/src/main/java/org/onap/cps/nfproxy/rest/controller/NfProxyController.java b/cps-nf-proxy-rest/src/main/java/org/onap/cps/nfproxy/rest/controller/NfProxyController.java
index 8125c5a..99451e6 100644
--- a/cps-nf-proxy-rest/src/main/java/org/onap/cps/nfproxy/rest/controller/NfProxyController.java
+++ b/cps-nf-proxy-rest/src/main/java/org/onap/cps/nfproxy/rest/controller/NfProxyController.java
@@ -27,7 +27,7 @@
 import org.springframework.web.bind.annotation.RestController;
 
 @RestController
-@RequestMapping("${rest.api.base-path}")
+@RequestMapping("${rest.api.xnf-base-path}")
 public class NfProxyController implements NfProxyApi {
 
     @Override
diff --git a/cps-nf-proxy-rest/src/main/resources/application.yml b/cps-nf-proxy-rest/src/main/resources/application.yml
deleted file mode 100644
index 06c0fd1..0000000
--- a/cps-nf-proxy-rest/src/main/resources/application.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-server:
-    port: 8080
-
-rest:
-    api:
-        base-path: /cps-nf-proxy/api
-
-spring:
-    main:
-        banner-mode: "off"
-# for POC only, later this should move to cpi-ri module
-    jpa:
-        ddl-auto: create
-        open-in-view: false
-        properties:
-            hibernate:
-                enable_lazy_load_no_trans: true
-                dialect: org.hibernate.dialect.PostgreSQLDialect
-
-    datasource:
-        url: jdbc:postgresql://${DB_HOST}:5432/cpsdb
-        username: ${DB_USERNAME}
-        password: ${DB_PASSWORD}
-        driverClassName: org.postgresql.Driver
-        initialization-mode: always
-
-# Actuator
-management:
-    endpoints:
-        web:
-            base-path: /manage
-        exposure:
-            include: info,health,loggers
-    endpoint:
-        health:
-            show-details: always
-            # kubernetes probes: liveness and readiness
-            probes:
-                enabled: true
-        loggers:
-            enabled: true
-
-logging:
-    level:
-        org:
-            springframework: INFO
diff --git a/cps-nf-proxy-rest/src/test/groovy/org/onap/cps/nfproxy/config/NfProxyConfigSpec.groovy b/cps-nf-proxy-rest/src/test/groovy/org/onap/cps/nfproxy/config/NfProxyConfigSpec.groovy
deleted file mode 100644
index 3eb42d7..0000000
--- a/cps-nf-proxy-rest/src/test/groovy/org/onap/cps/nfproxy/config/NfProxyConfigSpec.groovy
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2021 Pantheon.tech
- *  ================================================================================
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *  SPDX-License-Identifier: Apache-2.0
- *  ============LICENSE_END=========================================================
- */
-package org.onap.cps.nfproxy.config
-
-
-import spock.lang.Specification
-import springfox.documentation.spring.web.plugins.Docket
-
-class NfProxyConfigSpec extends Specification {
-    def objectUnderTest = new NfProxyConfig()
-
-    def 'xNF Proxy configuration has a Docket API'() {
-        expect: 'the CPS configuration has a Docket API'
-            objectUnderTest.api() instanceof Docket
-    }
-}
diff --git a/cps-nf-proxy-rest/src/test/groovy/org/onap/cps/nfproxy/rest/controller/NfProxyControllerSpec.groovy b/cps-nf-proxy-rest/src/test/groovy/org/onap/cps/nfproxy/rest/controller/NfProxyControllerSpec.groovy
index d1c3b16..874a1b0 100644
--- a/cps-nf-proxy-rest/src/test/groovy/org/onap/cps/nfproxy/rest/controller/NfProxyControllerSpec.groovy
+++ b/cps-nf-proxy-rest/src/test/groovy/org/onap/cps/nfproxy/rest/controller/NfProxyControllerSpec.groovy
@@ -33,7 +33,7 @@
     @Autowired
     MockMvc mvc
 
-    @Value('${rest.api.base-path}')
+    @Value('${rest.api.xnf-base-path}')
     def basePath
 
     def 'Hello world method invocation.'(){
diff --git a/cps-parent/pom.xml b/cps-parent/pom.xml
index b8f8975..36abc90 100755
--- a/cps-parent/pom.xml
+++ b/cps-parent/pom.xml
@@ -33,7 +33,7 @@
         <spotbugs.version>4.2.0</spotbugs.version>
         <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
         <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
-        <tag.version>${project.version}</tag.version>
+        <image.version>${project.version}</image.version>
 
         <jacoco.reportDirectory.aggregate>${project.reporting.outputDirectory}/jacoco-aggregate</jacoco.reportDirectory.aggregate>
         <sonar.coverage.jacoco.xmlReportPaths>
@@ -45,6 +45,8 @@
             ../cps-rest/target/site/jacoco-aggregate/jacoco.xml,
             ../cps-nf-proxy-rest/target/site/jacoco-ut/jacoco.xml,
             ../cps-nf-proxy-rest/target/site/jacoco-aggregate/jacoco.xml,
+            ../cps-application/target/site/jacoco-ut/jacoco.xml,
+            ../cps-application/target/site/jacoco-aggregate/jacoco.xml
         </sonar.coverage.jacoco.xmlReportPaths>
     </properties>
 
@@ -120,27 +122,6 @@
                     <groupId>io.swagger.codegen.v3</groupId>
                     <artifactId>swagger-codegen-maven-plugin</artifactId>
                     <version>${swagger-codegen-maven-plugin.version}</version>
-                    <executions>
-                        <execution>
-                            <goals>
-                                <goal>generate</goal>
-                            </goals>
-                            <configuration>
-                                <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec>
-                                <invokerPackage>org.onap.cps.rest.controller</invokerPackage>
-                                <modelPackage>org.onap.cps.rest.model</modelPackage>
-                                <apiPackage>org.onap.cps.rest.api</apiPackage>
-                                <language>spring</language>
-                                <generateSupportingFiles>false</generateSupportingFiles>
-                                <configOptions>
-                                    <sourceFolder>src/gen/java</sourceFolder>
-                                    <dateLibrary>java11</dateLibrary>
-                                    <interfaceOnly>true</interfaceOnly>
-                                    <useTags>true</useTags>
-                                </configOptions>
-                            </configuration>
-                        </execution>
-                    </executions>
                 </plugin>
                 <plugin>
                     <groupId>com.google.cloud.tools</groupId>
@@ -155,10 +136,7 @@
                             <image>${base.image}</image>
                         </from>
                         <to>
-                            <image>${repository.name}</image>
-                            <tags>
-                                <tag>${tag.version}</tag>
-                            </tags>
+                            <image>${repository.name}:${image.version}</image>
                         </to>
                     </configuration>
                 </plugin>
diff --git a/cps-rest/pom.xml b/cps-rest/pom.xml
index 49c3267..5bd223d 100755
--- a/cps-rest/pom.xml
+++ b/cps-rest/pom.xml
@@ -12,7 +12,7 @@
     <artifactId>cps-rest</artifactId>

 

     <properties>

-        <minimum-coverage>0.88</minimum-coverage>

+        <minimum-coverage>0.51</minimum-coverage>

     </properties>

 

     <dependencies>

@@ -51,6 +51,10 @@
             <artifactId>springfox-boot-starter</artifactId>

         </dependency>

         <dependency>

+            <groupId>io.swagger</groupId>

+            <artifactId>swagger-annotations</artifactId>

+        </dependency>

+        <dependency>

             <groupId>org.apache.commons</groupId>

             <artifactId>commons-lang3</artifactId>

         </dependency>

@@ -94,48 +98,32 @@
 

     <build>

         <plugins>

-            <plugin>

-                <groupId>org.springframework.boot</groupId>

-                <artifactId>spring-boot-maven-plugin</artifactId>

-            </plugin>

             <!-- Swagger code generation. -->

             <plugin>

                 <groupId>io.swagger.codegen.v3</groupId>

                 <artifactId>swagger-codegen-maven-plugin</artifactId>

+                <executions>

+                    <execution>

+                        <goals>

+                            <goal>generate</goal>

+                        </goals>

+                        <configuration>

+                            <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec>

+                            <invokerPackage>org.onap.cps.rest.controller</invokerPackage>

+                            <modelPackage>org.onap.cps.rest.model</modelPackage>

+                            <apiPackage>org.onap.cps.rest.api</apiPackage>

+                            <language>spring</language>

+                            <generateSupportingFiles>false</generateSupportingFiles>

+                            <configOptions>

+                                <sourceFolder>src/gen/java</sourceFolder>

+                                <dateLibrary>java11</dateLibrary>

+                                <interfaceOnly>true</interfaceOnly>

+                                <useTags>true</useTags>

+                            </configOptions>

+                        </configuration>

+                    </execution>

+                </executions>

             </plugin>

         </plugins>

     </build>

-

-    <profiles>

-        <profile>

-            <id>docker</id>

-            <activation>

-                <activeByDefault>false</activeByDefault>

-            </activation>

-            <build>

-                <plugins>

-                    <plugin>

-                        <groupId>com.google.cloud.tools</groupId>

-                        <artifactId>jib-maven-plugin</artifactId>

-                        <executions>

-                            <execution>

-                                <phase>package</phase>

-                                <id>build</id>

-                                <goals>

-                                    <goal>dockerBuild</goal>

-                                </goals>

-                            </execution>

-                            <execution>

-                                <phase>deploy</phase>

-                                <id>buildAndPush</id>

-                                <goals>

-                                    <goal>build</goal>

-                                </goals>

-                            </execution>

-                        </executions>

-                    </plugin>

-                </plugins>

-            </build>

-        </profile>

-    </profiles>

 </project>

diff --git a/cps-rest/src/main/java/org/onap/cps/config/CpsConfig.java b/cps-rest/src/main/java/org/onap/cps/config/CpsConfig.java
index cca5fe7..419a218 100755
--- a/cps-rest/src/main/java/org/onap/cps/config/CpsConfig.java
+++ b/cps-rest/src/main/java/org/onap/cps/config/CpsConfig.java
@@ -34,9 +34,12 @@
     /**

      * Swagger configuration.

      */

-    @Bean

+    @Bean("cps-docket")

     public Docket api() {

-        return new Docket(DocumentationType.OAS_30).select().apis(RequestHandlerSelectors.any())

+        return new Docket(DocumentationType.OAS_30)

+            .groupName("cps-docket")

+            .select()

+            .apis(RequestHandlerSelectors.any())

             .paths(PathSelectors.any()).build();

     }

 

diff --git a/cps-rest/src/main/java/org/onap/cps/rest/controller/AdminRestController.java b/cps-rest/src/main/java/org/onap/cps/rest/controller/AdminRestController.java
index 0f8e041..d74e9b1 100755
--- a/cps-rest/src/main/java/org/onap/cps/rest/controller/AdminRestController.java
+++ b/cps-rest/src/main/java/org/onap/cps/rest/controller/AdminRestController.java
@@ -38,7 +38,7 @@
 import org.springframework.web.multipart.MultipartFile;
 
 @RestController
-@RequestMapping("${rest.api.base-path}")
+@RequestMapping("${rest.api.cps-base-path}")
 public class AdminRestController implements CpsAdminApi {
 
     @Autowired
diff --git a/cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java b/cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java
index 07f5553..9b31df5 100644
--- a/cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java
+++ b/cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java
@@ -30,7 +30,7 @@
 import org.springframework.web.bind.annotation.RestController;
 
 @RestController
-@RequestMapping("${rest.api.base-path}")
+@RequestMapping("${rest.api.cps-base-path}")
 public class DataRestController implements CpsDataApi {
 
     @Autowired
diff --git a/cps-rest/src/test/groovy/org/onap/cps/rest/controller/AdminRestControllerSpec.groovy b/cps-rest/src/test/groovy/org/onap/cps/rest/controller/AdminRestControllerSpec.groovy
index e0db106..926021e 100755
--- a/cps-rest/src/test/groovy/org/onap/cps/rest/controller/AdminRestControllerSpec.groovy
+++ b/cps-rest/src/test/groovy/org/onap/cps/rest/controller/AdminRestControllerSpec.groovy
@@ -65,7 +65,7 @@
     @Autowired
     MockMvc mvc
 
-    @Value('${rest.api.base-path}')
+    @Value('${rest.api.cps-base-path}')
     def basePath
 
     def dataspaceName = 'my_dataspace'
diff --git a/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy b/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy
index 7dbf6bc..8b02d73 100644
--- a/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy
+++ b/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy
@@ -65,7 +65,7 @@
     @Autowired
     MockMvc mvc
 
-    @Value('${rest.api.base-path}')
+    @Value('${rest.api.cps-base-path}')
     def basePath
 
     @Shared
diff --git a/docker-compose/README.md b/docker-compose/README.md
index 619b0d4..3d68c3f 100644
--- a/docker-compose/README.md
+++ b/docker-compose/README.md
@@ -1,7 +1,34 @@
-# Docker Compose
+# Docker Compose deployment example for local enviroments, CPS deployment is done via OOM
 
 To run the application locally using `docker-compose`, execute following command from this `docker-compose` folder:
 
+Compile without generating the docker images
+
 ```bash
-VERSION=0.0.1-SNAPSHOT DB_HOST=dbpostgresql DB_USERNAME=cps DB_PASSWORD=cps docker-compose up
-```
\ No newline at end of file
+mvn clean install -Pcps-docker -Pxnf-docker -Pcps-xnf-docker -Djib.skip
+```
+
+Generate the docker images
+
+```bash
+mvn clean install -Pcps-docker -Pxnf-docker -Pcps-xnf-docker
+```
+
+for generate a specific type of docker images
+
+```bash
+mvn clean install -Pcps-docker
+```
+
+Run the containers
+
+```bash
+VERSION=0.0.1-SNAPSHOT DB_HOST=dbpostgresql DB_USERNAME=cps DB_PASSWORD=cps docker-compose up -d
+```
+
+Run application from Intellj IDE
+
+you need first to enable the maven profile desired under tab Maven
+then go to Run -> Edit configurations
+ 1- Working directory -> select docker-compose folder e.g.  ~/workspace/onap/cps/docker-compose/
+ 2- Enviroment variables -> add variables configuration e.g. DB_HOST=127.0.0.1;DB_USERNAME=cps;DB_PASSWORD=cps
\ No newline at end of file
diff --git a/cps-rest/src/main/resources/application.yml b/docker-compose/application.yml
similarity index 86%
rename from cps-rest/src/main/resources/application.yml
rename to docker-compose/application.yml
index 22948c3..c3ceecd 100644
--- a/cps-rest/src/main/resources/application.yml
+++ b/docker-compose/application.yml
@@ -3,12 +3,12 @@
 

 rest:

     api:

-        base-path: /cps/api

+        cps-base-path: /cps/api

+        xnf-base-path: /cps-nf-proxy/api

 

 spring:

     main:

         banner-mode: "off"

-# for POC only, later this should move to cpi-ri module

     jpa:

         ddl-auto: create

         open-in-view: false

@@ -34,8 +34,8 @@
     endpoints:

         web:

             base-path: /manage

-            exposure:

-                include: health,info,loggers

+        exposure:

+            include: info,health,loggers

     endpoint:

         health:

             show-details: always

diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml
index 391d911..beae091 100644
--- a/docker-compose/docker-compose.yml
+++ b/docker-compose/docker-compose.yml
@@ -4,8 +4,10 @@
   cps:
     container_name: cps-service
     image: nexus3.onap.org:10001/onap/cps-service:${VERSION}
+    volumes:
+      - "./application.yml:/app/application.yml"
     ports:
-      - "8080:8080"
+      - "8881:8080"
     environment:
       DB_HOST: ${DB_HOST}
       DB_USERNAME: ${DB_USERNAME}
@@ -17,8 +19,25 @@
   cps-nf-proxy:
     container_name: cps-nf-proxy
     image: nexus3.onap.org:10001/onap/cps-nf-proxy:${VERSION}
+    volumes:
+      - "./application.yml:/app/application.yml"
     ports:
-      - "8081:8080"
+      - "8882:8080"
+    environment:
+      DB_HOST: ${DB_HOST}
+      DB_USERNAME: ${DB_USERNAME}
+      DB_PASSWORD: ${DB_PASSWORD}
+    restart: unless-stopped
+    depends_on:
+      - dbpostgresql
+
+  cps-and-nf-proxy:
+    container_name: cps-and-nf-proxy
+    image: nexus3.onap.org:10001/onap/cps-and-nf-proxy:${VERSION}
+    volumes:
+      - "./application.yml:/app/application.yml"
+    ports:
+      - "8883:8080"
     environment:
       DB_HOST: ${DB_HOST}
       DB_USERNAME: ${DB_USERNAME}
diff --git a/pom.xml b/pom.xml
index eaa388c..ab0a459 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,5 +36,6 @@
         <module>cps-ri</module>

         <module>checkstyle</module>

         <module>spotbugs</module>

+        <module>cps-application</module>

     </modules>

 </project>