ControllerBlueprint blueprintsProcessor container 89/76089/6
authorSteve Alphonse Siani <alphonse.steve.siani.djissitchi@ibm.com>
Mon, 21 Jan 2019 16:55:48 +0000 (11:55 -0500)
committerSteve Alphonse Siani <alphonse.steve.siani.djissitchi@ibm.com>
Wed, 23 Jan 2019 17:49:59 +0000 (17:49 +0000)
Change-Id: I77df77757c276fca705091c1566c386f842269c4
Issue-ID: CCSDK-949
Signed-off-by: Steve Alphonse Siani <alphonse.steve.siani.djissitchi@ibm.com>
42 files changed:
ms/blueprintsprocessor/application/etc/logback.xml [new file with mode: 0755]
ms/blueprintsprocessor/application/etc/run.source [new file with mode: 0755]
ms/blueprintsprocessor/application/opt/app/onap/config/application.properties [new file with mode: 0755]
ms/blueprintsprocessor/application/opt/app/onap/config/logback.xml [new file with mode: 0755]
ms/blueprintsprocessor/application/pom.xml [changed mode: 0644->0755]
ms/blueprintsprocessor/application/src/main/resources/application-dev.properties [new file with mode: 0755]
ms/blueprintsprocessor/application/src/main/resources/application.properties [changed mode: 0644->0755]
ms/blueprintsprocessor/application/src/test/resources/application.properties
ms/blueprintsprocessor/distribution/pom.xml [new file with mode: 0755]
ms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml [new file with mode: 0755]
ms/blueprintsprocessor/distribution/src/main/docker/Dockerfile [new file with mode: 0755]
ms/blueprintsprocessor/distribution/src/main/docker/distribution.xml [new file with mode: 0755]
ms/blueprintsprocessor/distribution/src/main/docker/startService.sh [new file with mode: 0755]
ms/blueprintsprocessor/functions/pom.xml [changed mode: 0644->0755]
ms/blueprintsprocessor/modules/commons/db-lib/pom.xml
ms/blueprintsprocessor/modules/commons/pom.xml [changed mode: 0644->0755]
ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml
ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml
ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml [changed mode: 0644->0755]
ms/blueprintsprocessor/modules/outbounds/pom.xml
ms/blueprintsprocessor/modules/services/execution-service/pom.xml
ms/blueprintsprocessor/modules/services/pom.xml [changed mode: 0644->0755]
ms/blueprintsprocessor/modules/services/workflow-service/pom.xml
ms/blueprintsprocessor/parent/pom.xml [changed mode: 0644->0755]
ms/blueprintsprocessor/pom.xml [changed mode: 0644->0755]
ms/controllerblueprints/application/etc/run.source [changed mode: 0644->0755]
ms/controllerblueprints/application/opt/app/onap/config/application-dev.properties
ms/controllerblueprints/application/opt/app/onap/config/application.properties
ms/controllerblueprints/application/opt/app/onap/config/logback.xml [new file with mode: 0755]
ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/apps/controllerblueprints/ApplicationConstants.java
ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBlueprintsApplication.java [moved from ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBluprintsApplication.java with 87% similarity]
ms/controllerblueprints/application/src/main/resources/application-dev.properties [new file with mode: 0755]
ms/controllerblueprints/application/src/main/resources/application.properties [new file with mode: 0755]
ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBlueprintsApplicationTest.java [moved from ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBluprintsApplicationTest.java with 95% similarity]
ms/controllerblueprints/application/src/test/resources/application.properties
ms/controllerblueprints/distribution/pom.xml [changed mode: 0644->0755]
ms/controllerblueprints/distribution/src/main/dc/docker-compose.yaml [changed mode: 0644->0755]
ms/controllerblueprints/distribution/src/main/docker/Dockerfile [changed mode: 0644->0755]
ms/controllerblueprints/distribution/src/main/docker/distribution.xml [changed mode: 0644->0755]
ms/controllerblueprints/distribution/src/main/docker/startService.sh [changed mode: 0644->0755]
ms/vlantag-api/pom.xml
pom.xml

diff --git a/ms/blueprintsprocessor/application/etc/logback.xml b/ms/blueprintsprocessor/application/etc/logback.xml
new file mode 100755 (executable)
index 0000000..a97bb8c
--- /dev/null
@@ -0,0 +1,36 @@
+<!--\r
+  ~  Copyright © 2017-2018 AT&T Intellectual Property.\r
+  ~\r
+  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
+  ~  you may not use this file except in compliance with the License.\r
+  ~  You may obtain a copy of the License at\r
+  ~\r
+  ~      http://www.apache.org/licenses/LICENSE-2.0\r
+  ~\r
+  ~  Unless required by applicable law or agreed to in writing, software\r
+  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+  ~  See the License for the specific language governing permissions and\r
+  ~  limitations under the License.\r
+  -->\r
+\r
+<configuration>\r
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">\r
+        <!-- encoders are assigned the type\r
+             ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->\r
+        <encoder>\r
+            <pattern>%d{HH:mm:ss.SSS} %-5level %logger{100} - %msg%n</pattern>\r
+        </encoder>\r
+    </appender>\r
+\r
+\r
+    <logger name="org.springframework" level="info"/>\r
+    <logger name="org.springframework.web" level="info"/>\r
+    <logger name="org.hibernate" level="error"/>\r
+    <logger name="org.onap.ccsdk.apps" level="info"/>\r
+\r
+    <root level="warn">\r
+        <appender-ref ref="STDOUT"/>\r
+    </root>\r
+\r
+</configuration>\r
diff --git a/ms/blueprintsprocessor/application/etc/run.source b/ms/blueprintsprocessor/application/etc/run.source
new file mode 100755 (executable)
index 0000000..7557ab1
--- /dev/null
@@ -0,0 +1,12 @@
+java -classpath "/etc:${APP_HOME}/lib/*:/lib/*:/src:/schema:/generated-sources:${APP_CONFIG_HOME}:${APP_HOME}" \
+-DappName=${APPLICATIONNAME} -DappVersion=${BUNDLEVERSION} \
+-DrouteOffer=${ROUTEOFFER} \
+-DVERSION_ROUTEOFFER_ENVCONTEXT=${BUNDLEVERSION}/${STICKYSELECTORKEY}/${ENVCONTEXT} \
+-DSecurityFilePath=/etc \
+-DREST_NAME_NORMALIZER_PATTERN_FILE=/etc/PatternInputs.txt \
+-Dms_name=org.onap.ccsdk.apps.blueprintsprocessor \
+-Dlogging.config=${APP_CONFIG_HOME}/logback.xml \
+-Djava.security.egd=file:/dev/./urandom \
+-DAPPNAME=${APP_NAME} -DAPPENV=${APP_ENV} -DAPPVERSION=${APP_VERSION} -DNAMESPACE=${NAMESPACE} \
+-Dspring.config.location=${APP_CONFIG_HOME}/ \
+org.onap.ccsdk.apps.blueprintsprocessor.BlueprintProcessorApplication
diff --git a/ms/blueprintsprocessor/application/opt/app/onap/config/application.properties b/ms/blueprintsprocessor/application/opt/app/onap/config/application.properties
new file mode 100755 (executable)
index 0000000..c4880b6
--- /dev/null
@@ -0,0 +1,36 @@
+#\r
+#  Copyright � 2017-2018 AT&T Intellectual Property.\r
+#  Modifications Copyright © 2019 Bell Canada.\r
+#\r
+#  Licensed under the Apache License, Version 2.0 (the "License");\r
+#  you may not use this file except in compliance with the License.\r
+#  You may obtain a copy of the License at\r
+#\r
+#      http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+#  Unless required by applicable law or agreed to in writing, software\r
+#  distributed under the License is distributed on an "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+#  See the License for the specific language governing permissions and\r
+#  limitations under the License.\r
+#\r
+#logging.level.web=DEBUG\r
+\r
+# Web server config\r
+server.port=8080\r
+\r
+blueprintsprocessor.grpcEnable=false\r
+blueprintsprocessor.httpPort=8080\r
+blueprintsprocessor.grpcPort=9111\r
+# Blueprint Processor File Execution and Handling Properties\r
+blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy\r
+blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive\r
+# Primary Database Configuration\r
+blueprintsprocessor.db.primary.url=jdbc:mysql://db:3306/sdnctl\r
+blueprintsprocessor.db.primary.username=sdnctl\r
+blueprintsprocessor.db.primary.password=sdnctl\r
+blueprintsprocessor.db.primary.driverClassName=org.mariadb.jdbc.Driver\r
+blueprintsprocessor.db.primary.hibernateHbm2ddlAuto=validate\r
+blueprintsprocessor.db.primary.hibernateDDLAuto=none\r
+blueprintsprocessor.db.primary.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy\r
+blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialect
\ No newline at end of file
diff --git a/ms/blueprintsprocessor/application/opt/app/onap/config/logback.xml b/ms/blueprintsprocessor/application/opt/app/onap/config/logback.xml
new file mode 100755 (executable)
index 0000000..a97bb8c
--- /dev/null
@@ -0,0 +1,36 @@
+<!--\r
+  ~  Copyright © 2017-2018 AT&T Intellectual Property.\r
+  ~\r
+  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
+  ~  you may not use this file except in compliance with the License.\r
+  ~  You may obtain a copy of the License at\r
+  ~\r
+  ~      http://www.apache.org/licenses/LICENSE-2.0\r
+  ~\r
+  ~  Unless required by applicable law or agreed to in writing, software\r
+  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+  ~  See the License for the specific language governing permissions and\r
+  ~  limitations under the License.\r
+  -->\r
+\r
+<configuration>\r
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">\r
+        <!-- encoders are assigned the type\r
+             ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->\r
+        <encoder>\r
+            <pattern>%d{HH:mm:ss.SSS} %-5level %logger{100} - %msg%n</pattern>\r
+        </encoder>\r
+    </appender>\r
+\r
+\r
+    <logger name="org.springframework" level="info"/>\r
+    <logger name="org.springframework.web" level="info"/>\r
+    <logger name="org.hibernate" level="error"/>\r
+    <logger name="org.onap.ccsdk.apps" level="info"/>\r
+\r
+    <root level="warn">\r
+        <appender-ref ref="STDOUT"/>\r
+    </root>\r
+\r
+</configuration>\r
old mode 100644 (file)
new mode 100755 (executable)
index 679a8b9..06752b7
@@ -3,6 +3,7 @@
   ~  Copyright © 2017-2018 AT&T Intellectual Property.
   ~
   ~  Modifications Copyright © 2018 IBM.
+  ~  Modifications Copyright © 2019 Bell Canada.
   ~
   ~  Licensed under the Apache License, Version 2.0 (the "License");
   ~  you may not use this file except in compliance with the License.
     <description>Blueprints Processor Application</description>
 
     <dependencies>
+        <dependency>
+            <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+            <artifactId>core</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-devtools</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
-
     <build>
+        <resources>
+            <resource>
+                <!--config and resource files -->
+                <directory>${basedir}/etc</directory>
+                <targetPath>${basedir}/target/etc</targetPath>
+                <filtering>true</filtering>
+                <includes>
+                    <include>**/*</include>
+                </includes>
+            </resource>
+            <resource>
+                <!--config and resource files -->
+                <directory>${basedir}/src/main/resources</directory>
+                <targetPath>${basedir}/target/src/main/resources</targetPath>
+                <filtering>true</filtering>
+                <includes>
+                    <include>**/*</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>src/main/resources</directory>
+                <includes>
+                    <include>**/*</include>
+                </includes>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
         <plugins>
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
             </plugin>
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>2.6</version>
+                <executions>
+                    <execution>
+                        <id>copy-dockerfile</id>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals><!-- here the phase you need -->
+                        <phase>validate</phase>
+                        <configuration>
+                            <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/docker</directory>
+                                    <includes>
+                                        <include>*</include>
+                                    </includes>
+                                    <filtering>true</filtering>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>ant-test</id>
+                        <phase>package</phase>
+                        <configuration>
+                            <tasks>
+                                <fixcrlf srcdir="${basedir}" eol="unix" includes="**/*.sh, **/*.source"/>
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.1</version>
+                <configuration>
+                    <!-- <skip>${skip.compile}</skip>-->
+                    <source>1.8</source>
+                    <target>1.8</target>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>
diff --git a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
new file mode 100755 (executable)
index 0000000..6bfa240
--- /dev/null
@@ -0,0 +1,36 @@
+#\r
+#  Copyright � 2017-2018 AT&T Intellectual Property.\r
+#  Modifications Copyright © 2019 IBM, Bell Canada.\r
+#\r
+#  Licensed under the Apache License, Version 2.0 (the "License");\r
+#  you may not use this file except in compliance with the License.\r
+#  You may obtain a copy of the License at\r
+#\r
+#      http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+#  Unless required by applicable law or agreed to in writing, software\r
+#  distributed under the License is distributed on an "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+#  See the License for the specific language governing permissions and\r
+#  limitations under the License.\r
+#\r
+#logging.level.web=DEBUG\r
+\r
+# Web server config\r
+server.port=8080\r
+\r
+blueprintsprocessor.grpcEnable=false\r
+blueprintsprocessor.httpPort=8080\r
+blueprintsprocessor.grpcPort=9111\r
+# Blueprint Processor File Execution and Handling Properties\r
+blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy\r
+blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive\r
+# Primary Database Configuration\r
+blueprintsprocessor.db.primary.url=jdbc:mysql://localhost:3306/sdnctl\r
+blueprintsprocessor.db.primary.username=sdnctl\r
+blueprintsprocessor.db.primary.password=sdnctl\r
+blueprintsprocessor.db.primary.driverClassName=org.mariadb.jdbc.Driver\r
+blueprintsprocessor.db.primary.hibernateHbm2ddlAuto=update\r
+blueprintsprocessor.db.primary.hibernateDDLAuto=none\r
+blueprintsprocessor.db.primary.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy\r
+blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialect
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index fa1a1e6..6269520
@@ -1,5 +1,6 @@
 #\r
 #  Copyright � 2017-2018 AT&T Intellectual Property.\r
+#  Modifications Copyright © 2019 IBM, Bell Canada.\r
 #\r
 #  Licensed under the Apache License, Version 2.0 (the "License");\r
 #  you may not use this file except in compliance with the License.\r
 #  limitations under the License.\r
 #\r
 #logging.level.web=DEBUG\r
+\r
+# Web server config\r
+server.port=8080\r
+\r
 blueprintsprocessor.grpcEnable=false\r
 blueprintsprocessor.httpPort=8080\r
 blueprintsprocessor.grpcPort=9111\r
@@ -21,7 +26,7 @@ blueprintsprocessor.grpcPort=9111
 blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy\r
 blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive\r
 # Primary Database Configuration\r
-blueprintsprocessor.db.primary.url=jdbc:mysql://localhost:3306/sdnctl\r
+blueprintsprocessor.db.primary.url=jdbc:mysql://db:3306/sdnctl\r
 blueprintsprocessor.db.primary.username=sdnctl\r
 blueprintsprocessor.db.primary.password=sdnctl\r
 blueprintsprocessor.db.primary.driverClassName=org.mariadb.jdbc.Driver\r
index f896ee0..d21264c 100644 (file)
@@ -13,6 +13,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+# Web server config
+server.port=8080
 # Blueprint Processor File Execution and Handling Properties
 blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy
 blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive
diff --git a/ms/blueprintsprocessor/distribution/pom.xml b/ms/blueprintsprocessor/distribution/pom.xml
new file mode 100755 (executable)
index 0000000..fb5e3c1
--- /dev/null
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  Copyright © 2019 IBM, Bell Canada.
+  ~
+  ~  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.
+  -->
+<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.ccsdk.apps.blueprintsprocessor</groupId>
+        <artifactId>parent</artifactId>
+        <version>0.4.1-SNAPSHOT</version>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <artifactId>distribution</artifactId>
+    <packaging>pom</packaging>
+    <name>Blueprints Processor Distribution</name>
+    <properties>
+        <assembly.id>maven</assembly.id>
+        <name.space>org.onap.ccsdk.apps</name.space>     <!-- <name.space>${namespace}</name.space> -->
+        <serviceArtifactName>blueprintsprocessor</serviceArtifactName>
+        <image.name>onap/ccsdk-blueprintsprocessor</image.name>
+        <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
+        <docker.push.phase>deploy</docker.push.phase>
+        <docker.verbose>true</docker.verbose>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+            <artifactId>application</artifactId>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>2.6</version>
+                <executions>
+                    <execution>
+                        <id>copy-dockerfile</id>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals><!-- here the phase you need -->
+                        <phase>validate</phase>
+                        <configuration>
+                            <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/docker</directory>
+                                    <includes>
+                                        <include>*</include>
+                                    </includes>
+                                    <filtering>true</filtering>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>ant-test</id>
+                        <phase>package</phase>
+                        <configuration>
+                            <tasks>
+                                <fixcrlf srcdir="${basedir}" eol="unix" includes="**/*.sh, **/*.source"/>
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <!--build the final artifact for docker deployment -->
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>3.1.0</version>
+                <configuration>
+                    <!-- <skipAssembly>${skip.assembly}</skipAssembly>-->
+                    <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+                    <descriptors>
+                        <descriptor>src/main/docker/distribution.xml</descriptor>
+                    </descriptors>
+                    <tarLongFileMode>posix</tarLongFileMode>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>${assembly.id}</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.groovy.maven</groupId>
+                <artifactId>gmaven-plugin</artifactId>
+                <version>1.0</version>
+                <executions>
+                    <execution>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>
+                            <source>
+                                println project.properties['ccsdk.project.version']
+                                def versionArray
+                                if (project.properties['ccsdk.project.version'] != null ) {
+                                    versionArray = project.properties['ccsdk.project.version'].split('\\.')
+                                }
+
+                                if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
+                                {
+                                    project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest"
+                                } else {
+                                    project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest"
+                                }
+
+                                println 'New Tag for docker:' + project.properties['project.docker.latesttag.version']
+                            </source>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <build>
+                   <plugins>
+                        <plugin>
+                            <groupId>io.fabric8</groupId>
+                            <artifactId>docker-maven-plugin</artifactId>
+                            <version>0.26.1</version>
+                            <inherited>false</inherited>
+                            <configuration>
+                                <images>
+                                    <image>
+                                        <name>${image.name}</name>
+                                        <build>
+                                             <cleanup>try</cleanup>
+                                             <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+                                             <tags>
+                                                <tag>${project.version}</tag>
+                                                <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
+                                                <tag>${project.docker.latesttag.version}</tag>
+                                             </tags>
+                                        </build>
+                                    </image>
+                                </images>
+                                <verbose>true</verbose>
+                            </configuration>
+                            <executions>
+                            <execution>
+                                <id>generate-images</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                </goals>
+                            </execution>
+                            <execution>
+                                <id>push-images</id>
+                                <phase>${docker.push.phase}</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                    <goal>push</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+    </profiles>
+</project>
\ No newline at end of file
diff --git a/ms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml b/ms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml
new file mode 100755 (executable)
index 0000000..c0eade5
--- /dev/null
@@ -0,0 +1,33 @@
+version: '3.3'\r
+\r
+services:\r
+  db:\r
+    image: mariadb:latest\r
+    container_name: ccsdk-mariadb\r
+    ports:\r
+    - "3306:3306"\r
+    volumes:\r
+    - ~/vm_mysql:/var/lib/mysql\r
+    restart: always\r
+    environment:\r
+      MYSQL_ROOT_PASSWORD: sdnctl\r
+      MYSQL_DATABASE: sdnctl\r
+      MYSQL_USER: sdnctl\r
+      MYSQL_PASSWORD: sdnctl\r
+  blueprints-processor:\r
+    depends_on:\r
+    - db\r
+    image: onap/ccsdk-blueprintsprocessor:latest\r
+    container_name: bp-rest\r
+    ports:\r
+    - "8000:8080"\r
+    restart: always\r
+    volumes:\r
+    - ~/share/vm_ms/blueprintsprocessor/config:/opt/app/onap/config\r
+    - ~/share/vm_ms/blueprintsprocessor/logs:/logs\r
+    environment:\r
+      APPLICATIONNAME: BlueprintsProcessor\r
+      BUNDLEVERSION: 1.0.0\r
+      APP_CONFIG_HOME: /opt/app/onap/config\r
+      STICKYSELECTORKEY:\r
+      ENVCONTEXT: dev
\ No newline at end of file
diff --git a/ms/blueprintsprocessor/distribution/src/main/docker/Dockerfile b/ms/blueprintsprocessor/distribution/src/main/docker/Dockerfile
new file mode 100755 (executable)
index 0000000..2136232
--- /dev/null
@@ -0,0 +1,20 @@
+FROM anapsix/alpine-java:8_jdk
+
+ENV HTTP_PROXY  ${HTTP_PROXY}
+ENV HTTPS_PROXY ${HTTPS_PROXY}
+
+RUN apk add --no-cache curl
+
+COPY startService.sh /startService.sh
+RUN chmod 777 /startService.sh && dos2unix /startService.sh
+
+COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz
+
+RUN (mkdir -p /source /opt/app/onap) && (tar -xzf /source.tar.gz -C /source) \
+&& (mv /source/@project.build.finalName@ /source/app) \
+&& (cp -rf /source/app/opt/app/onap/lib /opt/app/onap/) \
+&& (cp -rf /source/app/etc /) \
+&& (cp -rf /source/app/config /) \
+&& (rm -rf /source)
+
+ENTRYPOINT /startService.sh
\ No newline at end of file
diff --git a/ms/blueprintsprocessor/distribution/src/main/docker/distribution.xml b/ms/blueprintsprocessor/distribution/src/main/docker/distribution.xml
new file mode 100755 (executable)
index 0000000..b538b73
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright © 2018-2019 Bell Canada.
+  ~
+  ~ 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.
+  -->
+
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+    <!-- create a tar.gz file containing the projects dependencies -->
+    <id>${assembly.id}</id>
+    <formats>
+        <format>tar.gz</format>
+    </formats>
+    <dependencySets>
+        <dependencySet>
+            <outputDirectory>/opt/app/onap/lib</outputDirectory>
+            <outputFileNameMapping>${artifact.groupId}-${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+            <excludes>
+            </excludes>
+        </dependencySet>
+    </dependencySets>
+    <fileSets>
+        <fileSet>
+            <directory>${project.basedir}/../application/src/main/resources</directory>
+            <includes>
+                <include>application.properties</include>
+                <include>logback.xml</include>
+            </includes>
+            <outputDirectory>./</outputDirectory>
+            <useDefaultExcludes>true</useDefaultExcludes>
+        </fileSet>
+        <fileSet>
+            <directory>${project.basedir}/src/main/docker</directory>
+            <includes>
+                <include>Dockerfile</include>
+                <include>startService.sh</include>
+            </includes>
+            <outputDirectory>./</outputDirectory>
+            <useDefaultExcludes>true</useDefaultExcludes>
+        </fileSet>
+        <fileSet>
+            <directory>${project.basedir}/../application/src/main/resources</directory>
+            <outputDirectory>src/main/resources</outputDirectory>
+            <useDefaultExcludes>true</useDefaultExcludes>
+        </fileSet>
+        <fileSet>
+            <directory>${project.basedir}/../application/opt/app/onap/config</directory>
+            <outputDirectory>./config</outputDirectory>
+            <useDefaultExcludes>true</useDefaultExcludes>
+        </fileSet>
+        <fileSet>
+            <directory>${project.basedir}/../application/etc</directory>
+            <outputDirectory>./etc</outputDirectory>
+            <useDefaultExcludes>true</useDefaultExcludes>
+        </fileSet>
+    </fileSets>
+</assembly>
\ No newline at end of file
diff --git a/ms/blueprintsprocessor/distribution/src/main/docker/startService.sh b/ms/blueprintsprocessor/distribution/src/main/docker/startService.sh
new file mode 100755 (executable)
index 0000000..79bcbc0
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+nodeName=BlueprintsProcessor_1.0.0_$(cat /proc/self/cgroup | grep docker | sed s/\\//\\n/g | tail -1)
+
+echo "APP Config HOME : ${APP_CONFIG_HOME}"
+export APP_HOME=/opt/app/onap
+
+cp -rf /config /opt/app/onap/
+source /etc/run.source
old mode 100644 (file)
new mode 100755 (executable)
index 53c9b18..590c87f 100644 (file)
     <description>Blueprints Processor DB Lib</description>
 
     <dependencies>
+        <dependency>
+            <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+            <artifactId>core</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
             <artifactId>db-resources</artifactId>
old mode 100644 (file)
new mode 100755 (executable)
index 4df8985..8d900a8
@@ -2,6 +2,8 @@
 <!--
   ~  Copyright © 2017-2018 AT&T Intellectual Property.
   ~
+  ~  Modifications Copyright © 2019 Bell Canada.
+  ~
   ~  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
index 82e8cd7..773746b 100644 (file)
     <name>Blueprints Processor Rest Lib</name>
     <description>Blueprints Processor Rest Lib</description>
     <dependencies>
+        <dependency>
+            <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+            <artifactId>core</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
             <artifactId>core</artifactId>
index 6395963..dcf42c2 100644 (file)
   ~  limitations under the License.
   -->
 <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.ccsdk.apps.blueprintsprocessor</groupId>
-               <artifactId>inbounds</artifactId>
-               <version>0.4.1-SNAPSHOT</version>
-       </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+        <artifactId>inbounds</artifactId>
+        <version>0.4.1-SNAPSHOT</version>
+    </parent>
 
-       <artifactId>resource-api</artifactId>
-       <packaging>jar</packaging>
-       <name>Blueprints Processor Resource API</name>
-       <description>Blueprints Processor Resource API</description>
+    <artifactId>resource-api</artifactId>
+    <packaging>jar</packaging>
+    <name>Blueprints Processor Resource API</name>
+    <description>Blueprints Processor Resource API</description>
 
 </project>
old mode 100644 (file)
new mode 100755 (executable)
index c510734..a15632b
@@ -2,6 +2,8 @@
 <!--
   ~  Copyright © 2017-2018 AT&T Intellectual Property.
   ~
+  ~  Modifications Copyright © 2019 Bell Canada.
+  ~
   ~  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
             <artifactId>proto-definition</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+            <version>${project.version}</version>
+            <artifactId>core</artifactId>
+        </dependency>
         <dependency>
             <groupId>io.grpc</groupId>
             <artifactId>grpc-testing</artifactId>
index e957c88..b6c26e6 100644 (file)
   ~  limitations under the License.
   -->
 <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.ccsdk.apps.blueprintsprocessor</groupId>
-               <artifactId>modules</artifactId>
-               <version>0.4.1-SNAPSHOT</version>
-       </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+        <artifactId>modules</artifactId>
+        <version>0.4.1-SNAPSHOT</version>
+    </parent>
 
-       <artifactId>outbounds</artifactId>
-       <packaging>pom</packaging>
-       <name>Blueprints Processor Outbounds POM</name>
-       <description>Blueprints Processor Outbounds</description>
+    <artifactId>outbounds</artifactId>
+    <packaging>pom</packaging>
+    <name>Blueprints Processor Outbounds POM</name>
+    <description>Blueprints Processor Outbounds</description>
 
 </project>
index 035f14d..96bb09f 100644 (file)
     <description>Blueprints Processor Execution Service</description>
 
     <dependencies>
+        <dependency>
+            <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+            <artifactId>core</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
             <artifactId>core</artifactId>
old mode 100644 (file)
new mode 100755 (executable)
index 8cb3c6f..469899d
@@ -2,6 +2,8 @@
 <!--
   ~  Copyright © 2017-2018 AT&T Intellectual Property.
   ~
+  ~  Modifications Copyright © 2019 Bell Canada.
+  ~
   ~  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
index 6e3dade..cc2a0e6 100644 (file)
     <description>Blueprints Processor Workflow Service</description>
 
     <dependencies>
+        <dependency>
+            <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+            <artifactId>core</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
             <artifactId>execution-service</artifactId>
old mode 100644 (file)
new mode 100755 (executable)
index f694ac1..e8b8628
@@ -3,6 +3,7 @@
   ~  Copyright © 2017-2018 AT&T Intellectual Property.
   ~
   ~  Modifications Copyright © 2018 IBM.
+  ~  Modifications Copyright © 2019 Bell Canada.
   ~
   ~  Licensed under the Apache License, Version 2.0 (the "License");
   ~  you may not use this file except in compliance with the License.
 
 
             <!-- Application Module Dependencies -->
+            <dependency>
+                <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+                <artifactId>application</artifactId>
+                <version>${project.version}</version>
+            </dependency>
             <dependency>
                 <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
                 <artifactId>db-lib</artifactId>
                 <artifactId>resource-dict</artifactId>
                 <version>${project.version}</version>
             </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+                <artifactId>core</artifactId>
+                <version>${project.version}</version>
+            </dependency>
 
             <!-- Database -->
             <dependency>
old mode 100644 (file)
new mode 100755 (executable)
index df4932c..774e177
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ~  Copyright © 2017-2018 AT&T Intellectual Property.
+  ~  Modifications Copyright © 2019 Bell Canada.
   ~
   ~  Licensed under the Apache License, Version 2.0 (the "License");
   ~  you may not use this file except in compliance with the License.
   ~  limitations under the License.
   -->
 <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.ccsdk.apps</groupId>
-               <artifactId>ccsdk-apps-ms</artifactId>
-               <version>0.4.1-SNAPSHOT</version>
-       </parent>
-       <artifactId>blueprintsprocessor</artifactId>
-       <packaging>pom</packaging>
-       <name>Blueprints Processor Root</name>
-       <description>Blueprints Processor Root</description>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onap.ccsdk.apps</groupId>
+        <artifactId>ccsdk-apps-ms</artifactId>
+        <version>0.4.1-SNAPSHOT</version>
+    </parent>
+    <artifactId>blueprintsprocessor</artifactId>
+    <packaging>pom</packaging>
+    <name>Blueprints Processor Root</name>
+    <description>Blueprints Processor Root</description>
 
-       <properties>
-               <service.name>BlueprintsProcessor</service.name>
-               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-               <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-               <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
-               <build.number>${maven.build.timestamp}</build.number>
-               <java.version>1.8</java.version>
-               <maven.compiler.target>1.8</maven.compiler.target>
-               <maven.compiler.source>1.8</maven.compiler.source>
-               <ccsdk.project.version>${project.version}</ccsdk.project.version>
-       </properties>
+    <properties>
+        <service.name>BlueprintsProcessor</service.name>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
+        <build.number>${maven.build.timestamp}</build.number>
+        <java.version>1.8</java.version>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <ccsdk.project.version>${project.version}</ccsdk.project.version>
+    </properties>
 
-       <modules>
-               <module>parent</module>
-               <module>modules</module>
-               <module>functions</module>
-               <module>application</module>
-       </modules>
+    <modules>
+        <module>parent</module>
+        <module>modules</module>
+        <module>functions</module>
+        <module>application</module>
+        <module>distribution</module>
+    </modules>
 
 </project>
old mode 100644 (file)
new mode 100755 (executable)
index fc1b4e5..1d0ac07
@@ -9,8 +9,5 @@ java -classpath "/etc:${APP_HOME}/lib/*:/lib/*:/src:/schema:/generated-sources:$
 -Djava.security.egd=file:/dev/./urandom \
 -DAPPNAME=${APP_NAME} -DAPPENV=${APP_ENV} -DAPPVERSION=${APP_VERSION} -DNAMESPACE=${NAMESPACE} \
 -Dspring.config.location=${APP_CONFIG_HOME}/ \
--Dspring.datasource.url=${DB_URL} \
--Dspring.datasource.username=${DB_USER} \
--Dspring.datasource.password=${DB_PASSWORD} \
 -Dblueprints.load.initial-data=${INIT_DATA_LOAD} \
-org.onap.ccsdk.apps.controllerblueprints.ControllerBluprintsApplication
+org.onap.ccsdk.apps.controllerblueprints.ControllerBlueprintsApplication
index 1a90df2..81b3061 100755 (executable)
@@ -64,4 +64,7 @@ controllerblueprints.loadResourceDictionary=true
 controllerblueprints.loadResourceDictionaryPaths=./../../../components/model-catalog/resource-dictionary/starter-dictionary
 
 # CBA file extension
-controllerblueprints.loadCbaExtension=zip
\ No newline at end of file
+controllerblueprints.loadCbaExtension=zip
+
+# Web server config
+server.port=8080
\ No newline at end of file
index 8d4dd58..5b651e6 100755 (executable)
@@ -1,6 +1,7 @@
 #
 # Copyright © 2017-2018 AT&T Intellectual Property.
 # Modifications Copyright © 2018 IBM.
+# Modifications Copyright © 2019 Bell Canada.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -41,14 +42,14 @@ spring.jpa.properties.hibernate.use_sql_comments=true
 spring.jpa.properties.hibernate.format_sql=true
 
 # spring.datasource.url, spring.datasource.username,spring.datasource.password  may be overridden by ENV variables
-spring.datasource.url=jdbc:mysql://localhost:3306/sdnctl
+spring.datasource.url=jdbc:mysql://db:3306/sdnctl
 spring.datasource.username=sdnctl
 spring.datasource.password=sdnctl
 spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
-spring.jpa.show-sql = true
-spring.jpa.hibernate.ddl-auto = none
-spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
-spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
+spring.jpa.show-sql=true
+spring.jpa.hibernate.ddl-auto=none
+spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
+spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
 
 # Load Resource Source Mappings
 resourceSourceMappings=primary-db=source-primary-db,input=source-input,default=source-default,primary-config-data=source-rest,capability=source-capability
@@ -61,11 +62,14 @@ controllerblueprints.blueprintEnrichmentPath=/etc/blueprints/enrichment
 # blueprints.load.initial-data may be overridden by ENV variables
 controllerblueprints.loadInitialData=true
 controllerblueprints.loadBluePrint=false
-controllerblueprints.loadBluePrintPaths=model-catalog/blueprint-model/starter-blueprint
+controllerblueprints.loadBluePrintPaths=/model-catalog/blueprint-model/starter-blueprint
 controllerblueprints.loadModelType=true
-controllerblueprints.loadModeTypePaths=model-catalog/definition-type/starter-type
+controllerblueprints.loadModeTypePaths=/model-catalog/definition-type/starter-type
 controllerblueprints.loadResourceDictionary=true
-controllerblueprints.loadResourceDictionaryPaths=model-catalog/resource-dictionary/starter-dictionary
+controllerblueprints.loadResourceDictionaryPaths=/model-catalog/resource-dictionary/starter-dictionary
 
 # CBA file extension
-controllerblueprints.loadCbaExtension=zip
\ No newline at end of file
+controllerblueprints.loadCbaExtension=zip
+
+# Web server config
+server.port=8080
\ No newline at end of file
diff --git a/ms/controllerblueprints/application/opt/app/onap/config/logback.xml b/ms/controllerblueprints/application/opt/app/onap/config/logback.xml
new file mode 100755 (executable)
index 0000000..01ae4f6
--- /dev/null
@@ -0,0 +1,44 @@
+<!--\r
+  ~ Copyright © 2017-2018 AT&T Intellectual Property.\r
+  ~\r
+  ~ Licensed under the Apache License, Version 2.0 (the "License");\r
+  ~ you may not use this file except in compliance with the License.\r
+  ~ You may obtain a copy of the License at\r
+  ~\r
+  ~     http://www.apache.org/licenses/LICENSE-2.0\r
+  ~\r
+  ~ Unless required by applicable law or agreed to in writing, software\r
+  ~ distributed under the License is distributed on an "AS IS" BASIS,\r
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+  ~ See the License for the specific language governing permissions and\r
+  ~ limitations under the License.\r
+  -->\r
+\r
+<configuration>\r
+\r
+    <property name="localPattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{100} - %msg%n" />\r
+\r
+    <property name="defaultPattern" value="%date{ISO8601,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}| %msg%n" />\r
+\r
+    <property name="debugLoggerPattern" value="%date{ISO8601,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}|[%caller{3}]| %msg%n" />\r
+\r
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">\r
+        <!-- encoders are assigned the type\r
+             ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->\r
+        <encoder>\r
+            <pattern>${defaultPattern}</pattern>\r
+        </encoder>\r
+    </appender>\r
+\r
+\r
+    <logger name="org.springframework" level="info"/>\r
+    <logger name="org.springframework.web" level="info"/>\r
+    <logger name="org.springframework.security.web.authentication" level="warn"/>\r
+    <logger name="org.hibernate" level="error"/>\r
+    <logger name="org.onap.ccsdk.apps" level="info"/>\r
+\r
+    <root level="warn">\r
+        <appender-ref ref="STDOUT"/>\r
+    </root>\r
+\r
+</configuration>\r
index 2471bd5..c4759b5 100644 (file)
@@ -17,7 +17,7 @@
 package org.onap.ccsdk.apps.controllerblueprints;\r
 \r
 /**\r
- * ApplicationConstants.java Purpose: Provide ControllerBluprintsApplication Constant Information\r
+ * ApplicationConstants.java Purpose: Provide ControllerBlueprintsApplication Constant Information\r
  *\r
  * @author Brinda Santh\r
  * @version 1.0\r
@@ -31,12 +31,12 @@ import org.springframework.web.reactive.config.EnableWebFlux;
 @EnableWebFlux\r
 @ComponentScan(basePackages = {"org.onap.ccsdk.apps.controllerblueprints"})\r
 @EnableAutoConfiguration\r
-public class ControllerBluprintsApplication {\r
-    private static EELFLogger log = EELFManager.getInstance().getLogger(ControllerBluprintsApplication.class);\r
+public class ControllerBlueprintsApplication {\r
+    private static EELFLogger log = EELFManager.getInstance().getLogger(ControllerBlueprintsApplication.class);\r
 \r
     public static void main(String[] args) {\r
         log.info("****** Starting Controlled Blueprints Application ******");\r
-        SpringApplication.run(ControllerBluprintsApplication.class, args);\r
+        SpringApplication.run(ControllerBlueprintsApplication.class, args);\r
     }\r
 \r
 }
\ No newline at end of file
diff --git a/ms/controllerblueprints/application/src/main/resources/application-dev.properties b/ms/controllerblueprints/application/src/main/resources/application-dev.properties
new file mode 100755 (executable)
index 0000000..30b71fb
--- /dev/null
@@ -0,0 +1,70 @@
+#
+# Copyright © 2017-2018 AT&T Intellectual Property.
+#
+# 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.
+#
+appName=ControllerBluePrints
+ms_name=org.onap.ccsdk.apps.controllerblueprints
+appVersion=1.0.0
+
+# Basic Authentication
+basic-auth.user-name=ccsdkapps
+basic-auth.hashed-pwd={bcrypt}$2a$10$MJxhNiOAffxbyrV9.rrOUewP9Q/ASg5Nit2cmP.yBaXGsVXo8BW3y
+
+#logging.pattern.console=%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr($ threadId: {PID:- }){magenta} %clr(---){faint} %clr([ hostname: %X{hostname} serviceName: %X{serviceName} version: %X{version} transactionId: %X{transactionId} requestTimeStamp: %X{requestTimestamp}  responseTimeStamp: %X{responseTimestamp} duration: %X{duration}]){yellow} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wex
+
+logging.level.org.springframework.web=INFO
+logging.level.org.hibernate.SQL=warn
+logging.level.org.hibernate.type.descriptor.sql=debug
+
+#To Remove Null in JSON API Response
+spring.jackson.default-property-inclusion=non_null
+
+#Swagger Configuration
+swagger.contact.name=Brinda Santh Muthuramalingam
+swagger.contact.url=www.onap.com
+swagger.contact.email=brindasanth@onap.com
+
+spring.jpa.properties.hibernate.show_sql=true
+spring.jpa.properties.hibernate.use_sql_comments=true
+spring.jpa.properties.hibernate.format_sql=true
+
+# spring.datasource.url, spring.datasource.username,spring.datasource.password  may be overridden by ENV variables
+spring.datasource.url=jdbc:mysql://localhost:3306/sdnctl
+spring.datasource.username=sdnctl
+spring.datasource.password=sdnctl
+spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
+spring.jpa.show-sql=true
+spring.jpa.hibernate.ddl-auto=none
+spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
+spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
+# Load Resource Source Mappings
+resourceSourceMappings=db=source-db,input=source-input,default=source-default,mdsal=source-rest,capability=source-capability
+# Controller Blueprints Core Configuration
+controllerblueprints.blueprintDeployPath=/etc/blueprints/deploy
+controllerblueprints.blueprintArchivePath=/etc/blueprints/archive
+controllerblueprints.blueprintEnrichmentPath=/etc/blueprints/enrichment
+# Controller Blueprint Load Configurations
+controllerblueprints.loadInitialData=true
+controllerblueprints.loadBluePrint=false
+controllerblueprints.loadBluePrintPaths=./../../../components/model-catalog/blueprint-model/starter-blueprint
+controllerblueprints.loadModelType=true
+controllerblueprints.loadModeTypePaths=./../../../components/model-catalog/definition-type/starter-type
+controllerblueprints.loadResourceDictionary=true
+controllerblueprints.loadResourceDictionaryPaths=./../../../components/model-catalog/resource-dictionary/starter-dictionary
+
+# CBA file extension
+controllerblueprints.loadCbaExtension=zip
+
+# Web server config
+server.port=8080
\ No newline at end of file
diff --git a/ms/controllerblueprints/application/src/main/resources/application.properties b/ms/controllerblueprints/application/src/main/resources/application.properties
new file mode 100755 (executable)
index 0000000..b6d509c
--- /dev/null
@@ -0,0 +1,74 @@
+#
+# Copyright © 2017-2018 AT&T Intellectual Property.
+# Modifications Copyright © 2019 Bell Canada.
+#
+# 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.
+#
+appName=ControllerBluePrints
+ms_name=org.onap.ccsdk.apps.controllerblueprints
+appVersion=1.0.0
+
+# Basic Authentication
+basic-auth.user-name=ccsdkapps
+basic-auth.hashed-pwd={bcrypt}$2a$10$MJxhNiOAffxbyrV9.rrOUewP9Q/ASg5Nit2cmP.yBaXGsVXo8BW3y
+
+#logging.pattern.console=%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr($ threadId: {PID:- }){magenta} %clr(---){faint} %clr([ hostname: %X{hostname} serviceName: %X{serviceName} version: %X{version} transactionId: %X{transactionId} requestTimeStamp: %X{requestTimestamp}  responseTimeStamp: %X{responseTimestamp} duration: %X{duration}]){yellow} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wex
+
+logging.level.org.springframework.web=INFO
+logging.level.org.hibernate.SQL=warn
+logging.level.org.hibernate.type.descriptor.sql=debug
+
+#To Remove Null in JSON API Response
+spring.jackson.default-property-inclusion=non_null
+
+#Swagger Configuration
+swagger.contact.name=Brinda Santh Muthuramalingam
+swagger.contact.url=www.onap.com
+swagger.contact.email=brindasanth@onap.com
+
+spring.jpa.properties.hibernate.show_sql=true
+spring.jpa.properties.hibernate.use_sql_comments=true
+spring.jpa.properties.hibernate.format_sql=true
+
+# spring.datasource.url, spring.datasource.username,spring.datasource.password  may be overridden by ENV variables
+spring.datasource.url=jdbc:mysql://db:3306/sdnctl
+spring.datasource.username=sdnctl
+spring.datasource.password=sdnctl
+spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
+spring.jpa.show-sql=true
+spring.jpa.hibernate.ddl-auto=none
+spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
+spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
+
+# Load Resource Source Mappings
+resourceSourceMappings=db=source-db,input=source-input,default=source-default,mdsal=source-rest,capability=source-capability
+
+# Controller Blueprints Core Configuration
+controllerblueprints.blueprintDeployPath=/etc/blueprints/deploy
+controllerblueprints.blueprintArchivePath=/etc/blueprints/archive
+controllerblueprints.blueprintEnrichmentPath=/etc/blueprints/enrichment
+# Controller Blueprint Load Configurations
+# blueprints.load.initial-data may be overridden by ENV variables
+controllerblueprints.loadInitialData=true
+controllerblueprints.loadBluePrint=false
+controllerblueprints.loadBluePrintPaths=/model-catalog/blueprint-model/starter-blueprint
+controllerblueprints.loadModelType=true
+controllerblueprints.loadModeTypePaths=/model-catalog/definition-type/starter-type
+controllerblueprints.loadResourceDictionary=true
+controllerblueprints.loadResourceDictionaryPaths=/model-catalog/resource-dictionary/starter-dictionary
+
+# CBA file extension
+controllerblueprints.loadCbaExtension=zip
+
+# Web server config
+server.port=8080
\ No newline at end of file
index 13b2aa7..9aebd79 100755 (executable)
@@ -52,4 +52,7 @@ controllerblueprints.loadResourceDictionaryPaths=./../../../../components/model-
 controllerblueprints.loadCbaExtension=zip\r
 \r
 # CBA examples for tests cases\r
-controllerblueprints.loadBlueprintsExamplesPath=./../../../../components/model-catalog/blueprint-model/test-blueprints
\ No newline at end of file
+controllerblueprints.loadBlueprintsExamplesPath=./../../../../components/model-catalog/blueprint-model/test-blueprints\r
+\r
+# Web server config\r
+server.port=8080
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 3057129..91d4bbc
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ~  Copyright © 2017-2018 AT&T Intellectual Property.
+  ~  Modifications Copyright © 2019 Bell Canada.
   ~
   ~  Licensed under the Apache License, Version 2.0 (the "License");
   ~  you may not use this file except in compliance with the License.
         <name.space>org.onap.ccsdk.apps</name.space>     <!-- <name.space>${namespace}</name.space> -->
         <serviceArtifactName>controllerblueprints</serviceArtifactName>
         <image.name>onap/ccsdk-controllerblueprints</image.name>
-               <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
-               <docker.push.phase>deploy</docker.push.phase>
-               <docker.verbose>true</docker.verbose>
-       </properties>
+        <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
+        <docker.push.phase>deploy</docker.push.phase>
+        <docker.verbose>true</docker.verbose>
+    </properties>
 
     <dependencies>
         <dependency>
                         </goals>
                         <configuration>
                             <source>
-                                println project.properties['ccsdk.project.version'];
-                                def versionArray;
+                                println project.properties['ccsdk.project.version']
+                                def versionArray
                                 if (project.properties['ccsdk.project.version'] != null ) {
-                                    versionArray = project.properties['ccsdk.project.version'].split('\\.');
+                                    versionArray = project.properties['ccsdk.project.version'].split('\\.')
                                 }
 
                                 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
                                 {
-                                    project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
+                                    project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest"
                                 } else {
-                                    project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest";
+                                    project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest"
                                 }
 
-                                println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
+                                println 'New Tag for docker:' + project.properties['project.docker.latesttag.version']
                             </source>
                         </configuration>
                     </execution>
         </plugins>
     </build>
 
-       <profiles>
-               <profile>
-                       <id>docker</id>
-                       <build>
-                               <plugins>
-                                       <plugin>
-                                               <groupId>io.fabric8</groupId>
-                                               <artifactId>docker-maven-plugin</artifactId>
-                                               <version>0.26.1</version>
-                                               <inherited>false</inherited>
-                                               <configuration>
-                                                       <images>
-                                                               <image>
-                                                                       <name>${image.name}</name>
-                                                                       <build>
-                                                                               <cleanup>try</cleanup>
-                                                                               <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
-                                                                               <tags>
-                                                                                       <tag>${project.version}</tag>
-                                                                                       <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
-                                                                                       <tag>${project.docker.latesttag.version}</tag>
-                                                                               </tags>
-                                                                       </build>
-                                                               </image>
-                                                       </images>
-                                                       <verbose>true</verbose>
-                                               </configuration>
-                                               <executions>
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>io.fabric8</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                        <version>0.26.1</version>
+                        <inherited>false</inherited>
+                        <configuration>
+                            <images>
+                                <image>
+                                    <name>${image.name}</name>
+                                    <build>
+                                        <cleanup>try</cleanup>
+                                        <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+                                        <tags>
+                                            <tag>${project.version}</tag>
+                                            <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
+                                            <tag>${project.docker.latesttag.version}</tag>
+                                        </tags>
+                                    </build>
+                                </image>
+                            </images>
+                            <verbose>true</verbose>
+                        </configuration>
+                        <executions>
                             <execution>
                                 <id>generate-images</id>
                                 <phase>package</phase>
                                     <goal>push</goal>
                                 </goals>
                             </execution>
-                                               </executions>
-                                       </plugin>
-                               </plugins>
-                       </build>
-               </profile>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
 
-       </profiles>
+    </profiles>
 </project>
old mode 100644 (file)
new mode 100755 (executable)
index eae2470..232bfc0
@@ -1,37 +1,33 @@
-version: '3.3'
-
-services:
-   db:
-     image: mariadb:latest
-     container_name: cb-mariadb
-     ports:
-       - "3306:3306"
-     volumes:
-       - ~/vm_mysql:/var/lib/mysql
-     restart: always
-     environment:
-       MYSQL_ROOT_PASSWORD: sdnctl
-       MYSQL_DATABASE: sdnctl
-       MYSQL_USER: sdnctl
-       MYSQL_PASSWORD: sdnctl
-   controller-blueprints:
-     depends_on:
-       - db
-     image: onap/ccsdk-controllerblueprints:latest
-     container_name: cb-rest
-     ports:
-       - "8080:8080"
-     restart: always
-     volumes:
-       - ~/share/vm_ms/controllerblueprints/config:/opt/app/onap/config
-       - ~/share/vm_ms/controllerblueprints/logs:/logs
-     environment:
-       APPLICATIONNAME : ControllerBluePrints
-       BUNDLEVERSION: 1.0.0
-       APP_CONFIG_HOME: /opt/app/onap/config
-       DB_URL: jdbc:mysql://db:3306/sdnctl
-       DB_USER: sdnctl
-       DB_PASSWORD: sdnctl
-       INIT_DATA_LOAD: "true"
-       STICKYSELECTORKEY:
-       ENVCONTEXT: DEV
\ No newline at end of file
+version: '3.3'\r
+\r
+services:\r
+  db:\r
+    image: mariadb:latest\r
+    container_name: ccsdk-mariadb\r
+    ports:\r
+    - "3306:3306"\r
+    volumes:\r
+    - ~/vm_mysql:/var/lib/mysql\r
+    restart: always\r
+    environment:\r
+      MYSQL_ROOT_PASSWORD: sdnctl\r
+      MYSQL_DATABASE: sdnctl\r
+      MYSQL_USER: sdnctl\r
+      MYSQL_PASSWORD: sdnctl\r
+  controller-blueprints:\r
+    depends_on:\r
+    - db\r
+    image: onap/ccsdk-controllerblueprints:latest\r
+    container_name: cb-rest\r
+    ports:\r
+    - "8080:8080"\r
+    restart: always\r
+    volumes:\r
+    - ~/share/vm_ms/controllerblueprints/config:/opt/app/onap/config\r
+    - ~/share/vm_ms/controllerblueprints/logs:/logs\r
+    environment:\r
+      APPLICATIONNAME: ControllerBluePrints\r
+      BUNDLEVERSION: 1.0.0\r
+      APP_CONFIG_HOME: /opt/app/onap/config\r
+      STICKYSELECTORKEY:\r
+      ENVCONTEXT: dev
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 6de589d..88577f5
@@ -15,6 +15,7 @@ RUN (mkdir -p /source /opt/app/onap) && (tar -xzf /source.tar.gz -C /source) \
 && (cp -rf /source/app/opt/app/onap/lib /opt/app/onap/) \
 && (cp -rf /source/app/etc /) \
 && (cp -rf /source/app/model-catalog /) \
+&& (cp -rf /source/app/config /) \
 && (rm -rf /source)
 
-ENTRYPOINT /startService.sh
+ENTRYPOINT /startService.sh
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index c929f98..1555b43
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ~ Copyright © 2017-2018 AT&T Intellectual Property.
+  ~ Modifications Copyright © 2019 Bell Canada.
   ~
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
             <outputDirectory>./etc</outputDirectory>
             <useDefaultExcludes>true</useDefaultExcludes>
         </fileSet>
+        <fileSet>
+            <directory>${project.basedir}/../application/opt/app/onap/config</directory>
+            <outputDirectory>./config</outputDirectory>
+            <useDefaultExcludes>true</useDefaultExcludes>
+        </fileSet>
         <fileSet>
             <directory>${project.basedir}/../../../components/model-catalog</directory>
             <outputDirectory>./model-catalog</outputDirectory>
old mode 100644 (file)
new mode 100755 (executable)
index 7077c22..84b2e5a
@@ -5,4 +5,5 @@ nodeName=ControllerBlueprints_1.0.0_$(cat /proc/self/cgroup | grep docker | sed
 echo "APP Config HOME : ${APP_CONFIG_HOME}"
 export APP_HOME=/opt/app/onap
 
+cp -rf /config /opt/app/onap/
 source /etc/run.source
index f5da9a6..ea46105 100644 (file)
 <?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>
+    <modelVersion>4.0.0</modelVersion>
 
-       <groupId>org.onap.ccsdk.apps.ms.vlantagapi</groupId>
-       <artifactId>vlantag-api</artifactId>
-       <version>0.4.1-SNAPSHOT</version>
-       <packaging>jar</packaging>
+    <groupId>org.onap.ccsdk.apps.ms.vlantagapi</groupId>
+    <artifactId>vlantag-api</artifactId>
+    <version>0.4.1-SNAPSHOT</version>
+    <packaging>jar</packaging>
 
-       <name>Vlantag API</name>
-       <description>Vlantag Api Service for Vlantag management of VNFs</description>
+    <name>Vlantag API</name>
+    <description>Vlantag Api Service for Vlantag management of VNFs</description>
 
-       <properties>
-               <swagger.directory>${basedir}/target/main/resources/META-INF/resources/swagger-ui/dist</swagger.directory>
-               <swagger.annotations.version>1.5.8</swagger.annotations.version>
-               <java.version>1.8</java.version>
-               <springboot.version>2.0.4.RELEASE</springboot.version>
-               <mariadb.connector.version>2.1.1</mariadb.connector.version>
-               <docker.registry>TBD:5100</docker.registry>
-               <serviceArtifactName>vlantagapi</serviceArtifactName>
+    <properties>
+        <swagger.directory>${basedir}/target/main/resources/META-INF/resources/swagger-ui/dist</swagger.directory>
+        <swagger.annotations.version>1.5.8</swagger.annotations.version>
+        <java.version>1.8</java.version>
+        <springboot.version>2.0.4.RELEASE</springboot.version>
+        <mariadb.connector.version>2.1.1</mariadb.connector.version>
+        <docker.registry>TBD:5100</docker.registry>
+        <serviceArtifactName>vlantagapi</serviceArtifactName>
 
-               <!-- Sonar -->
-               <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
-               <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
-               <sonar.surefire.reportsPath>${basedir}/target/surefire-reports</sonar.surefire.reportsPath>
-               <sonar.failsafe.reportsPath>${basedir}/target/failsafe-reports</sonar.failsafe.reportsPath>
-               <jacoco.path>${basedir}/target/jacoco_report</jacoco.path>
-               <jacoco.itPath>${basedir}/target/jacoco_itReport</jacoco.itPath>
-               <sonar.jacoco.reportPath>${basedir}/target/jacoco-ut.exec</sonar.jacoco.reportPath>
-               <sonar.jacoco.itReportPath>${basedir}/target/jacoco-it.exec</sonar.jacoco.itReportPath>
-               <sonar.language>java</sonar.language>
-               <ilib.version>2.0.7</ilib.version>
-               <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
-               <docker.push.phase>deploy</docker.push.phase>
-               <docker.verbose>true</docker.verbose>
-               <ccsdk.project.version>${project.version}</ccsdk.project.version>
-       </properties>
+        <!-- Sonar -->
+        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
+        <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
+        <sonar.surefire.reportsPath>${basedir}/target/surefire-reports</sonar.surefire.reportsPath>
+        <sonar.failsafe.reportsPath>${basedir}/target/failsafe-reports</sonar.failsafe.reportsPath>
+        <jacoco.path>${basedir}/target/jacoco_report</jacoco.path>
+        <jacoco.itPath>${basedir}/target/jacoco_itReport</jacoco.itPath>
+        <sonar.jacoco.reportPath>${basedir}/target/jacoco-ut.exec</sonar.jacoco.reportPath>
+        <sonar.jacoco.itReportPath>${basedir}/target/jacoco-it.exec</sonar.jacoco.itReportPath>
+        <sonar.language>java</sonar.language>
+        <ilib.version>2.0.7</ilib.version>
+        <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
+        <docker.push.phase>deploy</docker.push.phase>
+        <docker.verbose>true</docker.verbose>
+        <ccsdk.project.version>${project.version}</ccsdk.project.version>
+    </properties>
 
-       <parent>
-               <groupId>org.onap.ccsdk.parent</groupId>
-               <artifactId>spring-boot-starter-parent</artifactId>
-               <version>1.2.1-SNAPSHOT</version>
-               <relativePath/>
-       </parent>
+    <parent>
+        <groupId>org.onap.ccsdk.parent</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
+    </parent>
 
 
-       <dependencies>
-               <dependency>
-                       <groupId>org.springframework.boot</groupId>
-                       <artifactId>spring-boot-starter-jersey</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.springframework.boot</groupId>
-                       <artifactId>spring-boot-starter-web</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.springframework.boot</groupId>
-                       <artifactId>spring-boot-starter-test</artifactId>
-                       <scope>test</scope>
-               </dependency>
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-jersey</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
 
-               <dependency>
-                       <groupId>org.springframework.boot</groupId>
-                       <artifactId>spring-boot-starter-actuator</artifactId>
-               </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
 
-               <dependency>
-                       <groupId>org.springframework.boot</groupId>
-                       <artifactId>spring-boot-starter-security</artifactId>
-                       <version>2.0.1.RELEASE</version>
-               </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-security</artifactId>
+            <version>2.0.1.RELEASE</version>
+        </dependency>
 
-               <dependency>
-                       <groupId>org.onap.ccsdk.sli.core</groupId>
-                       <artifactId>sli-common</artifactId>
-                       <version>${ccsdk.sli.core.version}</version>
-                       <scope>provided</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.onap.ccsdk.sli.adaptors</groupId>
-                       <artifactId>resource-assignment-provider</artifactId>
-                       <version>${ccsdk.sli.adaptors.version}</version>
-                       <exclusions>
-                               <exclusion>
-                                       <groupId>org.slf4j</groupId>
-                                       <artifactId>slf4j-simple</artifactId>
-                               </exclusion>
-                       </exclusions>
-               </dependency>
+        <dependency>
+            <groupId>org.onap.ccsdk.sli.core</groupId>
+            <artifactId>sli-common</artifactId>
+            <version>${ccsdk.sli.core.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+            <artifactId>resource-assignment-provider</artifactId>
+            <version>${ccsdk.sli.adaptors.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-simple</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
 
-               <dependency>
-                       <groupId>org.mariadb.jdbc</groupId>
-                       <artifactId>mariadb-java-client</artifactId>
-                       <version>${mariadb.connector.version}</version>
-               </dependency>
+        <dependency>
+            <groupId>org.mariadb.jdbc</groupId>
+            <artifactId>mariadb-java-client</artifactId>
+            <version>${mariadb.connector.version}</version>
+        </dependency>
 
-               <dependency>
-                       <groupId>io.swagger</groupId>
-                       <artifactId>swagger-annotations</artifactId>
-                       <version>1.5.8</version>
-               </dependency>
-       </dependencies>
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-annotations</artifactId>
+            <version>1.5.8</version>
+        </dependency>
+    </dependencies>
 
 
 
-       <build>
-               <plugins>
+    <build>
+        <plugins>
             <plugin>
                 <groupId>org.codehaus.groovy.maven</groupId>
                 <artifactId>gmaven-plugin</artifactId>
                     </execution>
                 </executions>
             </plugin>
-                   <plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
                     </excludes>
                 </configuration>
             </plugin>
-                       <plugin>
-                               <groupId>org.jacoco</groupId>
-                               <artifactId>jacoco-maven-plugin</artifactId>
-                               <version>0.7.5.201505241946</version>
-                               <executions>
-                                       <!-- Prepares the property pointing to the JaCoCo runtime agent which 
-                                               is passed as VM argument when Maven the Surefire plugin is executed. -->
-                                       <execution>
-                                               <id>pre-unit-test</id>
-                                               <goals>
-                                                       <goal>prepare-agent</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <!-- Sets the path to the file which contains the execution data. -->
-                                                       <destFile>${sonar.jacoco.reportPath}</destFile>
-                                                       <propertyName>surefireArgLine</propertyName>
-                                               </configuration>
-                                       </execution>
-                                       <!-- Ensures that the code coverage report for unit tests is created 
-                                               after unit tests have been run. -->
-                                       <execution>
-                                               <id>post-unit-test</id>
-                                               <phase>test</phase>
-                                               <goals>
-                                                       <goal>report</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <!-- Sets the path to the file which contains the execution data. -->
-                                                       <dataFile>${sonar.jacoco.reportPath}</dataFile>
-                                                       <!-- Sets the output directory for the code coverage report. -->
-                                                       <outputDirectory>${jacoco.path}</outputDirectory>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       <plugin>
-                               <groupId>com.github.kongchen</groupId>
-                               <artifactId>swagger-maven-plugin</artifactId>
-                               <version>3.1.7</version>
-                               <configuration>
-                                       <apiSources>
-                                               <apiSource>
-                                                       <schemes>
-                                                               <scheme>http</scheme>
-                                                               <scheme>https</scheme>
-                                                       </schemes>
-                                                       <host>localhost:9091</host>
-                                                       <locations>
-                                                               <location>org.onap.ccsdk.apps.ms.vlantagapi.core.service</location>
-                                                               <location>org.onap.ccsdk.apps.ms.vlantagapi.core.model</location>
-                                                       </locations>
-                                                       <!-- <locations>org.onap.ccsdk.apps.ms.vlantagapi.core.service</locations> -->
-                                                       <basePath>/vlantagapi</basePath>
-                                                       <info>
-                                                               <title>${project.artifactId} Service</title>
-                                                               <version>${project.version}</version>
-                                                       </info>
-                                                       <securityDefinitions>
-                                                               <securityDefinition>
-                                                                       <name>basicAuth</name>
-                                                                       <type>basic</type>
-                                                               </securityDefinition>
-                                                       </securityDefinitions>
-                                                       <swaggerDirectory>${swagger.directory}</swaggerDirectory>
-                                               </apiSource>
-                                       </apiSources>
-                               </configuration>
-                               <executions>
-                                       <execution>
-                                               <!-- <phase>compile</phase> -->
-                                               <phase>package</phase>
-                                               <goals>
-                                                       <goal>generate</goal>
-                                               </goals>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       <plugin>
-                               <groupId>com.spotify</groupId>
-                               <artifactId>docker-maven-plugin</artifactId>
-                               <version>0.4.11</version>
-                               <configuration>
-                                       <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
-                                       <dockerDirectory>src/main/docker</dockerDirectory>
-                                       <serverId>docker-hub</serverId>
-                                       <registryUrl>https://${docker.registry}</registryUrl>
-                                       <imageTags>
-                                               <imageTag>${project.version}</imageTag>
-                                               <imageTag>latest</imageTag>
-                                       </imageTags>
-                                       <forceTags>true</forceTags>
-                                       <resources>
-                                               <resource>
-                                                       <targetPath>/</targetPath>
-                                                       <directory>${project.build.directory}</directory>
-                                                       <include>${project.build.finalName}.jar</include>
-                                               </resource>
-                                       </resources>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.springframework.boot</groupId>
-                               <artifactId>spring-boot-maven-plugin</artifactId>
-                               <version>${springboot.version}</version>
-                               <executions>
-                                       <execution>
-                                               <goals>
-                                                       <goal>repackage</goal>
-                                               </goals>
-                                       </execution>
-                               </executions>
-                       </plugin>
-               </plugins>
-       </build>
+            <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <version>0.7.5.201505241946</version>
+                <executions>
+                    <!-- Prepares the property pointing to the JaCoCo runtime agent which
+                        is passed as VM argument when Maven the Surefire plugin is executed. -->
+                    <execution>
+                        <id>pre-unit-test</id>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                        <configuration>
+                            <!-- Sets the path to the file which contains the execution data. -->
+                            <destFile>${sonar.jacoco.reportPath}</destFile>
+                            <propertyName>surefireArgLine</propertyName>
+                        </configuration>
+                    </execution>
+                    <!-- Ensures that the code coverage report for unit tests is created
+                        after unit tests have been run. -->
+                    <execution>
+                        <id>post-unit-test</id>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                        <configuration>
+                            <!-- Sets the path to the file which contains the execution data. -->
+                            <dataFile>${sonar.jacoco.reportPath}</dataFile>
+                            <!-- Sets the output directory for the code coverage report. -->
+                            <outputDirectory>${jacoco.path}</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>com.github.kongchen</groupId>
+                <artifactId>swagger-maven-plugin</artifactId>
+                <version>3.1.7</version>
+                <configuration>
+                    <apiSources>
+                        <apiSource>
+                            <schemes>
+                                <scheme>http</scheme>
+                                <scheme>https</scheme>
+                            </schemes>
+                            <host>localhost:9091</host>
+                            <locations>
+                                <location>org.onap.ccsdk.apps.ms.vlantagapi.core.service</location>
+                                <location>org.onap.ccsdk.apps.ms.vlantagapi.core.model</location>
+                            </locations>
+                            <!-- <locations>org.onap.ccsdk.apps.ms.vlantagapi.core.service</locations> -->
+                            <basePath>/vlantagapi</basePath>
+                            <info>
+                                <title>${project.artifactId} Service</title>
+                                <version>${project.version}</version>
+                            </info>
+                            <securityDefinitions>
+                                <securityDefinition>
+                                    <name>basicAuth</name>
+                                    <type>basic</type>
+                                </securityDefinition>
+                            </securityDefinitions>
+                            <swaggerDirectory>${swagger.directory}</swaggerDirectory>
+                        </apiSource>
+                    </apiSources>
+                </configuration>
+                <executions>
+                    <execution>
+                        <!-- <phase>compile</phase> -->
+                        <phase>package</phase>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <version>0.4.11</version>
+                <configuration>
+                    <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
+                    <dockerDirectory>src/main/docker</dockerDirectory>
+                    <serverId>docker-hub</serverId>
+                    <registryUrl>https://${docker.registry}</registryUrl>
+                    <imageTags>
+                        <imageTag>${project.version}</imageTag>
+                        <imageTag>latest</imageTag>
+                    </imageTags>
+                    <forceTags>true</forceTags>
+                    <resources>
+                        <resource>
+                            <targetPath>/</targetPath>
+                            <directory>${project.build.directory}</directory>
+                            <include>${project.build.finalName}.jar</include>
+                        </resource>
+                    </resources>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>${springboot.version}</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 
-       <profiles>
-               <profile>
-                       <id>docker</id>
-                       <build>
-                               <plugins>
-                                       <plugin>
-                                               <groupId>com.spotify</groupId>
-                                               <artifactId>docker-maven-plugin</artifactId>
-                                               <version>0.4.11</version>
-                                               <configuration>
-                                                       <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
-                                                       <dockerDirectory>src/main/docker</dockerDirectory>
-                                                       <serverId>docker-hub</serverId>
-                                                       <registryUrl>https://${docker.registry}</registryUrl>
-                                                       <imageTags>
-                                                               <imageTag>${project.version}</imageTag>
-                                                               <imageTag>${project.version}-STAGING-${maven.build.timestamp}</imageTag>
-                                                           <imageTag>${project.docker.latesttag.version}</imageTag>
-                                                       </imageTags>
-                                                       <forceTags>true</forceTags>
-                                                       <resources>
-                                                               <resource>
-                                                                       <targetPath>/</targetPath>
-                                                                       <directory>${project.build.directory}</directory>
-                                                                       <include>${project.build.finalName}.jar</include>
-                                                               </resource>
-                                                       </resources>
-                                               </configuration>
-                                       </plugin>
-                               </plugins>
-                       </build>
-               </profile>
-       </profiles>
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.spotify</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                        <version>0.4.11</version>
+                        <configuration>
+                            <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
+                            <dockerDirectory>src/main/docker</dockerDirectory>
+                            <serverId>docker-hub</serverId>
+                            <registryUrl>https://${docker.registry}</registryUrl>
+                            <imageTags>
+                                <imageTag>${project.version}</imageTag>
+                                <imageTag>${project.version}-STAGING-${maven.build.timestamp}</imageTag>
+                                <imageTag>${project.docker.latesttag.version}</imageTag>
+                            </imageTags>
+                            <forceTags>true</forceTags>
+                            <resources>
+                                <resource>
+                                    <targetPath>/</targetPath>
+                                    <directory>${project.build.directory}</directory>
+                                    <include>${project.build.finalName}.jar</include>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 
 
 </project>
diff --git a/pom.xml b/pom.xml
index 54fd6f2..b1addce 100755 (executable)
--- a/pom.xml
+++ b/pom.xml
 <?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>
+    <modelVersion>4.0.0</modelVersion>
 
-       <parent>
-               <groupId>org.onap.ccsdk.parent</groupId>
-               <artifactId>odlparent-lite</artifactId>
-               <version>1.2.1-SNAPSHOT</version>
-               <relativePath/>
-       </parent>
+    <parent>
+        <groupId>org.onap.ccsdk.parent</groupId>
+        <artifactId>odlparent-lite</artifactId>
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
+    </parent>
 
-       <groupId>org.onap.ccsdk.apps</groupId>
-       <artifactId>ccsdk-apps</artifactId>
-       <version>0.4.1-SNAPSHOT</version>
-       <packaging>pom</packaging>
+    <groupId>org.onap.ccsdk.apps</groupId>
+    <artifactId>ccsdk-apps</artifactId>
+    <version>0.4.1-SNAPSHOT</version>
+    <packaging>pom</packaging>
 
-       <name>ccsdk-apps</name>
-       <description>CCSDK applications</description>
-       <url>https://wiki.onap.org</url>
-       <organization>
-               <name>ONAP</name>
-       </organization>
+    <name>ccsdk-apps</name>
+    <description>CCSDK applications</description>
+    <url>https://wiki.onap.org</url>
+    <organization>
+        <name>ONAP</name>
+    </organization>
 
-       <properties>
-               <!--Don't set any language to let sonar enable multi-language support-->
-               <sonar.language/>
-               <!--Provide src/main as source path so both src/main/java and src/main/kotlin are scanned-->
-               <sonar.sources>src/main</sonar.sources>
-               <!--Provide src/test as source path for test so both src/test/java and src/test/kotlin are scanned-->
-               <sonar.tests>src/test</sonar.tests>
-               <!--Only include java and kt files to the scan-->
-               <sonar.inclusions>**/*.java,**/*.kt</sonar.inclusions>
-               <!--Specify path to load jacoco XLM report, as Sonar can't load Kotlin coverage from binary report.
-               Note: coverage for now is invalid and is failing to load because of:
-               "Cannot import coverage information for file '{file}', coverage data is invalid."
-               see https://github.com/jacoco/jacoco/issues/763
-               That issue has been fixed in 0.8.3 but haven't yet been release. -->
-               <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
-       </properties>
+    <properties>
+        <!--Don't set any language to let sonar enable multi-language support-->
+        <sonar.language/>
+        <!--Provide src/main as source path so both src/main/java and src/main/kotlin are scanned-->
+        <sonar.sources>src/main</sonar.sources>
+        <!--Provide src/test as source path for test so both src/test/java and src/test/kotlin are scanned-->
+        <sonar.tests>src/test</sonar.tests>
+        <!--Only include java and kt files to the scan-->
+        <sonar.inclusions>**/*.java,**/*.kt</sonar.inclusions>
+        <!--Specify path to load jacoco XLM report, as Sonar can't load Kotlin coverage from binary report.
+        Note: coverage for now is invalid and is failing to load because of:
+        "Cannot import coverage information for file '{file}', coverage data is invalid."
+        see https://github.com/jacoco/jacoco/issues/763
+        That issue has been fixed in 0.8.3 but haven't yet been release. -->
+        <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
+    </properties>
 
-       <modules>
-               <module>components</module>
-               <module>ms</module>
-       </modules>
+    <modules>
+        <module>components</module>
+        <module>ms</module>
+    </modules>
 
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.jacoco</groupId>
-                               <artifactId>jacoco-maven-plugin</artifactId>
-                               <!--Change version to 0.8.3 when released-->
-                               <version>${jacoco.version}</version>
-                       </plugin>
-               </plugins>
-       </build>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <!--Change version to 0.8.3 when released-->
+                <version>${jacoco.version}</version>
+            </plugin>
+        </plugins>
+    </build>
 
-       <scm>
-               <connection>scm:git:ssh://git@${onap.git.host}/apps.git</connection>
-               <developerConnection>scm:git:ssh://${onap.git.host}:${onap.git.port}/${onap.git.project}/apps.git</developerConnection>
-               <url>${onap.git.protocol}://${onap.git.host}/projects/${onap.git.project}/repos/apps/browse</url>
-       </scm>
+    <scm>
+        <connection>scm:git:ssh://git@${onap.git.host}/apps.git</connection>
+        <developerConnection>scm:git:ssh://${onap.git.host}:${onap.git.port}/${onap.git.project}/apps.git</developerConnection>
+        <url>${onap.git.protocol}://${onap.git.host}/projects/${onap.git.project}/repos/apps/browse</url>
+    </scm>
 
-       <profiles>
-               <profile>
-                       <id>blackduck</id>
-                       <activation>
-                               <property>
-                                       <name>blackduck-scan</name>
-                               </property>
-                       </activation>
-                       <build>
-                                       <plugins>
-                                               <plugin>
-                                                       <groupId>com.blackducksoftware.integration</groupId>
-                                                       <artifactId>hub-maven-plugin</artifactId>
-                                                       <version>1.4.0</version>
-                                                       <inherited>false</inherited>
-                                                       <configuration>
-                                                               <hubProjectName>${project.name}</hubProjectName>
-                                                               <outputDirectory>${project.basedir}</outputDirectory>
-                                                       </configuration>
-                                                       <executions>
-                                                               <execution>
-                                                                       <id>create-bdio-file</id>
-                                                                       <phase>package</phase>
-                                                                       <goals>
-                                                                               <goal>createHubOutput</goal>
-                                                                       </goals>
-                                                               </execution>
-                                                       </executions>
-                                               </plugin>
-                                       </plugins>
+    <profiles>
+        <profile>
+            <id>blackduck</id>
+            <activation>
+                <property>
+                    <name>blackduck-scan</name>
+                </property>
+            </activation>
+            <build>
+                    <plugins>
+                        <plugin>
+                            <groupId>com.blackducksoftware.integration</groupId>
+                            <artifactId>hub-maven-plugin</artifactId>
+                            <version>1.4.0</version>
+                            <inherited>false</inherited>
+                            <configuration>
+                                <hubProjectName>${project.name}</hubProjectName>
+                                <outputDirectory>${project.basedir}</outputDirectory>
+                            </configuration>
+                            <executions>
+                                <execution>
+                                    <id>create-bdio-file</id>
+                                    <phase>package</phase>
+                                    <goals>
+                                        <goal>createHubOutput</goal>
+                                    </goals>
+                                </execution>
+                            </executions>
+                        </plugin>
+                    </plugins>
 
 
 
-                       </build>
+            </build>
 
-               </profile>
+        </profile>
 
-       </profiles>
+    </profiles>
 
 </project>