--- /dev/null
+<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.so.adapters.so-cnf-adapter</groupId>
+ <artifactId>so-cnf-adapter</artifactId>
+ <version>1.8.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.onap.so.adapters.so-cnf-adapter.packages</groupId>
+ <packaging>pom</packaging>
+ <artifactId>docker</artifactId>
+ <name>SO CNF Adapter Docker Packaging</name>
+
+ <properties>
+ <cnf-adapter-project-version>${project.version}</cnf-adapter-project-version>
+ <docker.skip>false</docker.skip>
+ <docker.skip.build>false</docker.skip.build>
+ <docker.skip.push>false</docker.skip.push>
+ <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
+ <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
+ <docker.image.prefix>onap/so</docker.image.prefix>
+ <docker.push.phase>deploy</docker.push.phase>
+ </properties>
+
+ <build>
+ <finalName>${project.artifactId}-${project.version}</finalName>
+ <plugins>
+ <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 version: ' + project.properties['cnf-adapter-project-version'];
+ def versionArray;
+ if (project.properties['cnf-adapter-project-version'] != null) {
+ versionArray = project.properties['cnf-adapter-project-version'].split('-');
+ }
+
+ if (project.properties['cnf-adapter-project-version'].endsWith("-SNAPSHOT")) {
+ project.properties['project.docker.latesttag.version'] = versionArray[0] + "-SNAPSHOT-latest";
+ } else {
+ project.properties['project.docker.latesttag.version'] = versionArray[0] + "-STAGING-latest";
+ }
+
+ println 'New tag for docker: ' + project.properties['project.docker.latesttag.version'];
+ </source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration combine.self="override">
+ <verbose>true</verbose>
+ <apiVersion>1.23</apiVersion>
+ <pullRegistry>${docker.pull.registry}</pullRegistry>
+ <pushRegistry>${docker.push.registry}</pushRegistry>
+ <images>
+ <image>
+ <name>${docker.image.prefix}/base-image:1.0</name>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFile>docker-files/Dockerfile.so-base-image</dockerFile>
+ </build>
+ </image>
+ <image>
+ <name>so-cnf-adapter</name>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFile>docker-files/Dockerfile.so-app</dockerFile>
+ <tags>
+ <tag>${project.version}</tag>
+ <tag>${project.version}-${maven.build.timestamp}</tag>
+ <tag>${project.docker.latesttag.version}</tag>
+ </tags>
+ <assembly>
+ <inline>
+ <dependencySets>
+ <dependencySet>
+ <includes>
+ <include>
+ org.onap.so.adapters.so-cnf-adapter:so-cnf-adapter-application
+ </include>
+ </includes>
+ <outputFileNameMapping>app.jar</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+ </inline>
+ </assembly>
+ </build>
+ </image>
+
+ </images>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>clean-images</id>
+ <phase>pre-clean</phase>
+ <goals>
+ <goal>remove</goal>
+ </goals>
+ <configuration>
+ <removeAll>true</removeAll>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>generate-images</id>
+ <phase>generate-sources</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>
+ <configuration>
+ <image>so-cnf-adapter</image>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.so.adapters.so-cnf-adapter</groupId>
+ <artifactId>so-cnf-adapter-application</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
-FROM adoptopenjdk/openjdk11:jre-11.0.8_10-alpine
+FROM onap/so/base-image:1.0
-ARG JAR_FILE=*.jar
ARG http_proxy
ENV HTTP_PROXY=$http_proxy
ENV http_proxy=$HTTP_PROXY
ARG https_proxy
ENV HTTPS_PROXY=$https_proxy
ENV https_proxy=$HTTPS_PROXY
+
USER root
RUN mkdir -p /app/config
RUN mkdir -p /app/certificates
RUN mkdir -p /app/logs
RUN mkdir -p /app/ca-certificates
-RUN apk update && apk add apache2-utils
-COPY target/${JAR_FILE} /app/app.jar
+COPY maven/app.jar /app
COPY configs/logging/logback-spring.xml /app
COPY scripts/start-app.sh /app
COPY scripts/wait-for.sh /app
COPY ca-certificates/onap-ca.crt /app/ca-certificates/onap-ca.crt
-#RUN chown -R so:so /app
-#USER so
+RUN chown -R so:so /app
+
+USER so
# Springboot configuration (required)
VOLUME /app/config
+
# Root certificates (optional)
VOLUME /app/ca-certificates
+
WORKDIR /app
ENTRYPOINT ["/app/start-app.sh"]
-
--- /dev/null
+FROM adoptopenjdk/openjdk11:jre-11.0.8_10-alpine
+
+ARG http_proxy
+ARG https_proxy
+ENV HTTP_PROXY=$http_proxy
+ENV HTTPS_PROXY=$https_proxy
+ENV http_proxy=$HTTP_PROXY
+ENV https_proxy=$HTTPS_PROXY
+
+# Install commonly needed tools
+RUN apk --no-cache add curl netcat-openbsd nss apache2-utils java-cacerts
+
+# Create symlink for default Java truststore
+RUN set -eux; \
+ rm -rf "$JAVA_HOME/lib/security/cacerts"; \
+ ln -sT /etc/ssl/certs/java/cacerts "$JAVA_HOME/lib/security/cacerts"
+
+# Create 'so' user
+RUN addgroup -g 1000 so && adduser -S -u 1000 -G so -s /bin/sh so
<!--
============LICENSE_START=======================================================
- ONAP - SO
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2021 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-
+
http://www.apache.org/licenses/LICENSE-2.0
-
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+
+ SPDX-License-Identifier: Apache-2.0
============LICENSE_END=========================================================
--->
+ -->
<configuration scan="true" debug="false">
<contextListener class="org.onap.so.logger.LoggerStartupListener" />
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
<logger name="org.springframework" level="WARN" />
<logger name="org.springframework.security.authentication.dao.DaoAuthenticationProvider" level="DEBUG" />
- <!-- Camunda related loggers -->
- <logger name="org.camunda.bpm.engine.jobexecutor.level" level="WARN" />
- <logger name="org.camunda.bpm.engine.impl.persistence.entity.JobEntity.level" level="WARN" />
-
<logger name="org.apache.wire" level="DEBUG" />
<logger name="org.onap" level="DEBUG" />
- <logger name="com.att.ecomp" level="DEBUG" />
+
<logger name="org.apache.cxf.interceptor" level="DEBUG" />
- <logger name="com.att.commons" level="DEBUG" />
+
<logger name="org.reflections" level="ERROR" />
<logger name="AUDIT" level="INFO" additivity="false">
--- /dev/null
+#!/bin/sh
+
+if [ `id -u` = 0 ]
+then
+ # Install certificates found in the /app/ca-certificates volume, if any.
+
+ needUpdate=FALSE
+
+ for certificate in `ls -1 /app/ca-certificates`; do
+ echo "Installing $certificate in /usr/local/share/ca-certificates"
+ cp /app/ca-certificates/$certificate /usr/local/share/ca-certificates/$certificate
+ needUpdate=TRUE
+ done
+
+ if [ $needUpdate = TRUE ]; then
+ update-ca-certificates --fresh
+ fi
+
+ # Re-exec this script as the 'onap' user.
+ this=`readlink -f $0`
+ exec su so -c "$this"
+fi
+
+touch /app/app.jar
+
+if [ ! -z "$DB_HOST" -a -z "$DB_PORT" ]; then
+ export DB_PORT=3306
+fi
+
+if [ -z "${CONFIG_PATH}" ]; then
+ export CONFIG_PATH=/app/config/override.yaml
+fi
+
+if [ -z "${LOG_PATH}" ]; then
+ export LOG_PATH="logs/${APP}"
+fi
+
+if [ "${SSL_DEBUG}" = "log" ]; then
+ export SSL_DEBUG="-Djavax.net.debug=all"
+else
+ export SSL_DEBUG=
+fi
+
+# Set java keystore and truststore options, if specified in the environment.
+
+jksargs=
+
+if [ ! -z "${KEYSTORE}" ]; then
+ jksargs="$jksargs -Dmso.load.ssl.client.keystore=true"
+ jksargs="$jksargs -Djavax.net.ssl.keyStore=$KEYSTORE"
+ jksargs="$jksargs -Djavax.net.ssl.keyStorePassword=${KEYSTORE_PASSWORD}"
+fi
+
+if [ ! -z "${TRUSTSTORE}" ]; then
+ jksargs="$jksargs -Djavax.net.ssl.trustStore=${TRUSTSTORE}"
+ jksargs="$jksargs -Djavax.net.ssl.trustStorePassword=${TRUSTSTORE_PASSWORD}"
+fi
+
+if [ -z "${ACTIVE_PROFILE}" ]; then
+ export ACTIVE_PROFILE="basic"
+fi
+
+jvmargs="${JVM_ARGS} -Dspring.profiles.active=${ACTIVE_PROFILE} -Djava.security.egd=file:/dev/./urandom -Dlogs_dir=${LOG_PATH} -Dlogging.config=/app/logback-spring.xml $jksargs -Dspring.config.additional-location=$CONFIG_PATH ${SSL_DEBUG} ${DISABLE_SNI}"
+
+
+read_properties(){
+ while IFS="=" read -r key value; do
+ case "${key}" in
+ '#'*) ;;
+ *)
+ eKey=$(echo $key | tr '[:lower:]' '[:upper:]')
+ export "$eKey"="$value"
+ esac
+ done <<-EOF
+ $1
+ EOF
+}
+
+if [ -n "${AAF_SSL_CERTS_ENABLED}" ]; then
+read_properties "$(head -n 4 /app/certs/.passphrases)"
+fi
+
+echo "JVM Arguments: ${jvmargs}"
+
+java ${jvmargs} -jar app.jar
+rc=$?
+
+echo "Application exiting with status code $rc"
+
+if [ ! -z "${EXIT_DELAY}" -a "${EXIT_DELAY}" != 0 ]; then
+ echo "Delaying $APP exit for $EXIT_DELAY seconds"
+ sleep $EXIT_DELAY
+fi
+
+exit $rc
\ No newline at end of file
--- /dev/null
+<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.so.adapters.so-cnf-adapter</groupId>
+ <artifactId>so-cnf-adapter</artifactId>
+ <version>1.8.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>packages</artifactId>
+ <packaging>pom</packaging>
+ <name>SO CNF Adapter Packages</name>
+
+ <profiles>
+ <!-- DO NOT CHANGE THE *ORDER* IN WHICH THESE PROFILES ARE DEFINED! -->
+
+ <profile>
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ </profile>
+
+ <!-- Those profile are exclusive, choose docker or with-integration-tests -->
+ <profile>
+ <id>docker</id>
+ <modules>
+ <module>docker</module>
+ </modules>
+ <properties>
+ <docker.skip.push>false</docker.skip.push>
+ </properties>
+ </profile>
+ </profiles>
+</project>
\ No newline at end of file
-<!--
- ~*
- ~============LICENSE_START=======================================================
- ~* ONAP - SO
- ~*================================================================================
- ~* Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- ~*================================================================================
- ~* 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.
- ~* ============LICENSE_END=========================================================
- ~*/
- -->
-
<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.so</groupId>
- <artifactId>so</artifactId>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.so</groupId>
+ <artifactId>so</artifactId>
+ <version>1.8.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.onap.so.adapters.so-cnf-adapter</groupId>
+ <artifactId>so-cnf-adapter</artifactId>
<version>1.8.0-SNAPSHOT</version>
- </parent>
- <!-- <groupId>org.onap.so.adapters</groupId -->
- <artifactId>so-cnf-adapter</artifactId>
- <packaging>jar</packaging>
- <name>so-cnf-adapter</name>
- <description>Web service endpoint for cnf operations</description>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-dependencies</artifactId>
- <version>${springboot.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <build>
- <finalName>${project.artifactId}-${project.version}</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <configuration>
- <mainClass>org.onap.so.adapters.cnf.MSOCnfApplication</mainClass>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>net.revelc.code.formatter</groupId>
- <artifactId>formatter-maven-plugin</artifactId>
- <version>2.9.0</version>
- <executions>
- <execution>
- <id>format-java</id>
- <goals>
- <goal>format</goal>
- </goals>
- <phase>process-sources</phase>
- <configuration>
- <skip>${format.skipExecute}</skip>
- <configFile>${project.basedir}/onap-eclipse-format.xml</configFile>
- </configuration>
- </execution>
- <execution>
- <id>format-xml</id>
- <goals>
- <goal>format</goal>
- </goals>
- <phase>process-sources</phase>
- <configuration>
- <skip>${format.skipExecute}</skip>
- <sourceDirectory>${project.basedir}</sourceDirectory>
- <configXmlFile>${project.basedir}/pom-format.properties</configXmlFile>
- <includes>
- <include>pom.xml</include>
- </includes>
- </configuration>
- </execution>
- <execution>
- <id>validate-java</id>
- <goals>
- <goal>validate</goal>
- </goals>
- <configuration>
- <skip>${format.skipValidate}</skip>
- <configFile>${project.basedir}/onap-eclipse-format.xml</configFile>
- </configuration>
- </execution>
- <execution>
- <id>validate-poms</id>
- <goals>
- <goal>validate</goal>
- </goals>
- <configuration>
- <skip>${format.skipValidate}</skip>
- <configFile>${project.basedir}/pom-format.properties</configFile>
- <includes>
- <include>pom.xml</include>
- </includes>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-annotations</artifactId>
- <version>2.9.8</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>docker-build</id>
- <phase>install</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <dockerFile>Dockerfile</dockerFile>
- <executable>docker</executable>
- <workingDirectory>${project.basedir}</workingDirectory>
- <arguments>
- <argument>build</argument>
- <argument>-t</argument>
- <argument>${project.artifactId}:${project.version}</argument>
- <argument>.</argument>
- </arguments>
- <buildArgs>
- <JAR_FILE>${project.artifactId}-${project.version}.jar</JAR_FILE>
- <ARTIFACT_ID>${project.artifactId}</ARTIFACT_ID>
- </buildArgs>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-actuator</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-jdbc</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-jdbc</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-spring-boot-starter-jaxws</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-spring-boot-starter-jaxrs</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpmime</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-jpa</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpcore</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.cloud</groupId>
- <artifactId>spring-cloud-contract-wiremock</artifactId>
- <version>1.2.4.RELEASE</version>
- </dependency>
- <dependency>
- <groupId>org.onap.so</groupId>
- <artifactId>aai-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>com.sun.xml.ws</groupId>
- <artifactId>jaxws-ri</artifactId>
- <version>2.3.0</version>
- <type>pom</type>
- </dependency>
- </dependencies>
-</project>
+ <name>SO CNF Adapter</name>
+ <packaging>pom</packaging>
+
+ <properties>
+ <java.version>11</java.version>
+ <version.java.compiler>11</version.java.compiler>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <version-swagger-codegen>2.3.1</version-swagger-codegen>
+ <gson-fire-version>1.8.2</gson-fire-version>
+ <retrofit-version>2.7.2</retrofit-version>
+ <threetenbp-version>1.3.5</threetenbp-version>
+ <oltu-version>1.0.1</oltu-version>
+ <swagger-core-version>1.5.21</swagger-core-version>
+ <okhttp3-version>3.14.0</okhttp3-version>
+ <okhttp-version>2.7.5</okhttp-version>
+ <okio-version>1.13.0</okio-version>
+ <spring-security-oauth2-version>2.3.6.RELEASE</spring-security-oauth2-version>
+ <jaxb-api>2.3.0</jaxb-api>
+ <snakeyaml-version>0.11</snakeyaml-version>
+ <hamcrest-version>2.2</hamcrest-version>
+ <equalsverifier-version>3.4.1</equalsverifier-version>
+ <so-core-version>1.8.0-SNAPSHOT</so-core-version>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>${version.java.compiler}</source>
+ <target>${version.java.compiler}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>net.revelc.code.formatter</groupId>
+ <artifactId>formatter-maven-plugin</artifactId>
+ <version>2.9.0</version>
+ <executions>
+ <execution>
+ <id>format-java</id>
+ <goals>
+ <goal>format</goal>
+ </goals>
+ <phase>process-sources</phase>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </execution>
+ <execution>
+ <id>format-xml</id>
+ <goals>
+ <goal>format</goal>
+ </goals>
+ <phase>process-sources</phase>
+ <configuration>
+ <skip>true</skip>
+ <includes>
+ <include>pom.xml</include>
+ </includes>
+ </configuration>
+ </execution>
+ <execution>
+ <id>validate-java</id>
+ <goals>
+ <goal>validate</goal>
+ </goals>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </execution>
+ <execution>
+ <id>validate-poms</id>
+ <goals>
+ <goal>validate</goal>
+ </goals>
+ <configuration>
+ <skip>true</skip>
+ <includes>
+ <include>pom.xml</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <modules>
+ <module>so-cnf-adapter-application</module>
+ <module>packages</module>
+ </modules>
+</project>
+++ /dev/null
-# Default behavior
-* text=auto
-
-# Files to have unix style line endings on checkout
-*.sh text eol=lf
\ No newline at end of file
+++ /dev/null
-#!/bin/sh
-#temprary condition
-if [ `id -u` = 0 ]
-then
- # Install certificates found in the /app/ca-certificates volume, if any.
-
- needUpdate=FALSE
-
- for certificate in `ls -1 /app/ca-certificates`; do
- echo "Installing $certificate in /usr/local/share/ca-certificates"
- # cp /app/ca-certificates/$certificate /usr/local/share/ca-certificates/$certificate
- needUpdate=FALSE
- done
-
- # Re-exec this script as the 'onap' user.
- this=`readlink -f $0`
- # exec su so -c "$this"
-fi
-
-touch /app/app.jar
-
-if [ ! -z "$DB_HOST" -a -z "$DB_PORT" ]; then
- export DB_PORT=3306
-fi
-
-if [ -z "${CONFIG_PATH}" ]; then
- export CONFIG_PATH=/app/config/override.yaml
-fi
-
-if [ "${SSL_DEBUG}" = "log" ]; then
- export SSL_DEBUG="-Djavax.net.debug=all"
-else
- export SSL_DEBUG=
-fi
-
-# Set java keystore and truststore options, if specified in the environment.
-
-jksargs=
-
-if [ ! -z "${KEYSTORE}" ]; then
- jksargs="$jksargs -Dmso.load.ssl.client.keystore=true"
- jksargs="$jksargs -Djavax.net.ssl.keyStore=$KEYSTORE"
- jksargs="$jksargs -Djavax.net.ssl.keyStorePassword=${KEYSTORE_PASSWORD}"
-fi
-
-if [ ! -z "${TRUSTSTORE}" ]; then
- jksargs="$jksargs -Djavax.net.ssl.trustStore=${TRUSTSTORE}"
- jksargs="$jksargs -Djavax.net.ssl.trustStorePassword=${TRUSTSTORE_PASSWORD}"
-fi
-
-if [ -z "${ACTIVE_PROFILE}" ]; then
- export ACTIVE_PROFILE="basic"
-fi
-
-jvmargs="${JVM_ARGS} -Dspring.profiles.active=${ACTIVE_PROFILE} -Djava.security.egd=file:/dev/./urandom -Dlogs_dir=${LOG_PATH} -Dlogging.config=/app/logback-spring.xml $jksargs -Dspring.config.additional-location=$CONFIG_PATH ${SSL_DEBUG} ${DISABLE_SNI}"
-
-
-read_properties(){
- while IFS="=" read -r key value; do
- case "${key}" in
- '#'*) ;;
- *)
- eKey=$(echo $key | tr '[:lower:]' '[:upper:]')
- export "$eKey"="$value"
- esac
- done <<-EOF
- $1
- EOF
-}
-
-
-
-if [ -n "${AAF_SSL_CERTS_ENABLED}" ]; then
-read_properties "$(head -n 4 /app/certs/.passphrases)"
-fi
-
-echo "JVM Arguments: ${jvmargs}"
-
-java ${jvmargs} -jar app.jar
-rc=$?
-
-echo "Application exiting with status code $rc"
-
-if [ ! -z "${EXIT_DELAY}" -a "${EXIT_DELAY}" != 0 ]; then
- echo "Delaying $APP exit for $EXIT_DELAY seconds"
- sleep $EXIT_DELAY
-fi
-
-exit $rc
--- /dev/null
+<!--
+ ~*
+ ~============LICENSE_START=======================================================
+ ~* ONAP - SO
+ ~*================================================================================
+ ~* Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
+ ~*================================================================================
+ ~* 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.
+ ~* ============LICENSE_END=========================================================
+ ~*/
+ -->
+
+<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.so.adapters.so-cnf-adapter</groupId>
+ <artifactId>so-cnf-adapter</artifactId>
+ <version>1.8.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>so-cnf-adapter-application</artifactId>
+ <name>so-cnf-adapter</name>
+ <packaging>jar</packaging>
+ <description>Web service endpoint for cnf operations</description>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-dependencies</artifactId>
+ <version>${springboot.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <build>
+ <finalName>${project.artifactId}-${project.version}</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <configuration>
+ <mainClass>org.onap.so.adapters.cnf.MSOCnfApplication</mainClass>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>original</id>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemPropertyVariables>
+ <so.log.level>DEBUG</so.log.level>
+ </systemPropertyVariables>
+ <rerunFailingTestsCount>2</rerunFailingTestsCount>
+ <parallel>suites</parallel>
+ <useUnlimitedThreads>false</useUnlimitedThreads>
+ <threadCount>1</threadCount>
+ </configuration>
+ </plugin>
+ </plugins>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ <excludes>
+ <exclude>**/*.p12</exclude>
+ <exclude>**/*.jks</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>**/*.p12</include>
+ <include>**/*.jks</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-actuator</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-jdbc</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-jdbc</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-spring-boot-starter-jaxws</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-spring-boot-starter-jaxrs</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpmime</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-data-jpa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-contract-wiremock</artifactId>
+ <version>1.2.4.RELEASE</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.so</groupId>
+ <artifactId>aai-client</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.ws</groupId>
+ <artifactId>jaxws-ri</artifactId>
+ <version>2.3.0</version>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+</project>
+