TCAGen2 java upgrade 59/110059/6
authorKai <lukai@chinamobile.com>
Fri, 10 Jul 2020 10:05:46 +0000 (18:05 +0800)
committerKai <lukai@chinamobile.com>
Wed, 15 Jul 2020 02:03:34 +0000 (10:03 +0800)
Issue-ID: DCAEGEN2-2285
Signed-off-by: Kai Lu <lukai@chinamobile.com>
Change-Id: I1a7b3db68141ed8648fe47865f39dea22f0d999c

27 files changed:
dcae-analytics/dcae-analytics-model/pom.xml
dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/configbindingservice/ConfigBindingServiceConstants.java
dcae-analytics/dcae-analytics-tca-core/pom.xml
dcae-analytics/dcae-analytics-tca-model/pom.xml
dcae-analytics/dcae-analytics-tca-web/Dockerfile
dcae-analytics/dcae-analytics-tca-web/pom.xml
dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java
dcae-analytics/dcae-analytics-test/pom.xml
dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsTest.java
dcae-analytics/dcae-analytics-web/pom.xml
dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java
dcae-analytics/pom.xml
dcae-analytics/version.properties
eelf-logger/eelf-logger-api/pom.xml
eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/AppLogInfo.java
eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/ErrorLogInfo.java
eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/NagiosAlertLevel.java
eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/ResponseLogInfo.java
eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/log/AuditLog.java
eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/log/ErrorLog.java
eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/log/MetricLog.java
eelf-logger/eelf-logger-logback-impl/pom.xml
eelf-logger/eelf-logger-model/pom.xml
eelf-logger/pom.xml
eelf-logger/version.properties
pom.xml
version.properties

index 67a35a4..d7d2133 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
         <artifactId>dcae-analytics</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
+        <version>1.2.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>dcae-analytics-model</artifactId>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
+        </dependency>
+        <dependency>
+           <groupId>com.fasterxml.jackson.dataformat</groupId>
+           <artifactId>jackson-dataformat-smile</artifactId>
+        </dependency>
 
         <!-- JSON PATH -->
         <dependency>
index 2693a68..c859932 100644 (file)
@@ -46,10 +46,12 @@ public abstract class ConfigBindingServiceConstants {
     public static final String CONFIG = "config";
     public static final String TCAPOLICY = "tca.policy";
     public static final String ITEMS = "items";
+    public static final String POLICIES = "policies";
     public static final int CONFIG_SERVICE_REFRESHPERIOD = 1;
+    public static final String CONFIG_POLICIES = "config-binding-service.config.policies.items[0].config.tca.policy";
 
     public static final String POLICY = "config-binding-service.config.tca.policy";
-    public static final String POLICIES = "config-binding-service.policies";
+    public static final String WITHPOLICIES = "config-binding-service.policies.items[0].tca.policy";
     public static final String PROCESSINGBATCHSIZE = "config-binding-service.config.tca.processing_batch_size";
     public static final String ENABLEABATEMENT = "config-binding-service.config.tca.enable_abatement";
     public static final String ENABLEECOMPLOGGING = "config-binding-service.config.tca.enable_ecomp_logging";
index 2a2ba83..f56842d 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
         <artifactId>dcae-analytics</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
+        <version>1.2.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>dcae-analytics-tca-core</artifactId>
index f400d58..ec3f1f9 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
         <artifactId>dcae-analytics</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
+        <version>1.2.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>dcae-analytics-tca-model</artifactId>
index b6e4778..411b6b1 100644 (file)
@@ -3,7 +3,7 @@
 # Only changes made in docker/Dockerfile template file will be persistent
 # ==========================================================================
 
-FROM openjdk:8-jre-alpine
+FROM openjdk:11-jre-slim
 
 MAINTAINER Rajiv Singla <rs153v@att.com>
 
@@ -14,7 +14,7 @@ ARG DOCKER_ARTIFACT_DIR
 
 RUN mkdir -p /var/log/ONAP/dcaegen2/analytics/tca-gen2
 #Add a new user and group to allow container to be run as non-root
-RUN addgroup -S tca-gen2 && adduser -S -G tca-gen2 tca-gen2; \
+RUN groupadd tca-gen2 && useradd -g tca-gen2 tca-gen2; \
     chmod a+rwx /opt; \
     chmod a+rwx /var/log/ONAP/dcaegen2/analytics/tca-gen2; \
     chown -R tca-gen2:tca-gen2 /opt; \
index 1275c71..57f9bdf 100644 (file)
@@ -29,7 +29,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
         <artifactId>dcae-analytics</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
+        <version>1.2.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>dcae-analytics-tca-web</artifactId>
       <dependency>
         <groupId>io.undertow</groupId>
         <artifactId>undertow-core</artifactId>
-        <version>2.0.17.Final</version>
       </dependency>
 
     </dependencies>
             <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-core</artifactId>
-                <version>5.0.11.RELEASE</version>
+                <version>5.1.12.RELEASE</version>
             </dependency>
         </dependencies>
     </dependencyManagement>
             <plugin>
                   <groupId>com.spotify</groupId>
                   <artifactId>dockerfile-maven-plugin</artifactId>
-                  <version>1.4.3</version>
+                  <version>1.4.10</version>
                     <configuration>
                          <contextDirectory>${project.basedir}</contextDirectory>
                          <repository>${docker.repository}/${docker.image.name}</repository>
index 0214a3d..d70922b 100644 (file)
@@ -30,11 +30,6 @@ import org.onap.dcae.analytics.model.configbindingservice.BaseConfigBindingServi
 import org.onap.dcae.analytics.model.configbindingservice.ConfigBindingServiceConstants;
 import org.springframework.core.env.Environment;
 
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
-
 import lombok.Data;
 import lombok.ToString;
 
@@ -106,17 +101,12 @@ public class TcaAppProperties extends BaseConfigBindingServiceProperties {
      */
     private String getPolicy() {
 
-        String policies = environment.getProperty(ConfigBindingServiceConstants.POLICIES);
+        String policies = environment.getProperty(ConfigBindingServiceConstants.WITHPOLICIES);
         if (policies == null) {
             return environment.getProperty(ConfigBindingServiceConstants.POLICY);
         }
-        JsonObject policiesObject = new JsonParser().parse(policies).getAsJsonObject();
-        JsonArray items = policiesObject.get(ConfigBindingServiceConstants.ITEMS).getAsJsonArray();
-        JsonElement policy = items.get(0)
-                                 .getAsJsonObject().get(ConfigBindingServiceConstants.CONFIG)
-                                 .getAsJsonObject().get(ConfigBindingServiceConstants.TCAPOLICY);
 
-        return policy.toString();
+        return policies;
 
     }
 
index 43afaed..e6ff020 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
         <artifactId>dcae-analytics</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
+        <version>1.2.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>dcae-analytics-test</artifactId>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
-            <version>${spring.boot.version}</version>
             <scope>compile</scope>
             <exclusions>
                 <exclusion>
                     <groupId>junit</groupId>
                     <artifactId>junit</artifactId>
                 </exclusion>
-            </exclusions>
+                <exclusion>
+                    <groupId>org.junit.vintage</groupId>
+                    <artifactId>junit-vintage-engine</artifactId>
+                </exclusion>
+                           <exclusion>
+                             <groupId>org.mockito</groupId>
+                             <artifactId>mockito-core</artifactId>
+                           </exclusion>
+                </exclusions>
         </dependency>
 
         <!-- JSON SERIALIZATION/DESERIALIZATION LIBRARY -->
             <artifactId>jackson-databind</artifactId>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+           <groupId>com.fasterxml.jackson.dataformat</groupId>
+           <artifactId>jackson-dataformat-smile</artifactId>
+            <scope>compile</scope>
+        </dependency>
 
         <!-- JUNIT 5 DEPENDENCIES -->
         <dependency>
             <artifactId>apiguardian-api</artifactId>
             <scope>compile</scope>
         </dependency>
+        <!-- MOCKING FRAMEWORK -->
+            <dependency>
+                <groupId>org.mockito</groupId>
+                <artifactId>mockito-core</artifactId>
+                <scope>compile</scope>
+            </dependency>
 
         <!-- ASSERTION UTILITIES -->
         <dependency>
             <artifactId>jsonassert</artifactId>
             <scope>compile</scope>
         </dependency>
-
-        <!-- MOCKING FRAMEWORK -->
-        <dependency>
-            <groupId>org.mockito</groupId>
-            <artifactId>mockito-core</artifactId>
-            <scope>compile</scope>
-        </dependency>
-
     </dependencies>
 
 </project>
index 419fe2f..8c7f025 100644 (file)
@@ -271,7 +271,7 @@ abstract class BaseAnalyticsTest {
      */
     public static <T> T deserializeJsonFileToModel(final String jsonFileLocation, final Class<T> modelClass,
                                                    final ObjectMapper objectMapper) {
-        try (final InputStream jsonFileInputStream =
+        try (InputStream jsonFileInputStream =
                 BaseAnalyticsTest.class.getClassLoader().getResourceAsStream(jsonFileLocation)) {
             assertThat(jsonFileInputStream).as("Input JSON File location must be valid").isNotNull();
             return objectMapper.readValue(jsonFileInputStream, modelClass);
index 9d87508..2f2ef9f 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
         <artifactId>dcae-analytics</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
+        <version>1.2.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>dcae-analytics-web</artifactId>
         <dependency>
             <groupId>io.undertow</groupId>
             <artifactId>undertow-core</artifactId>
-            <version>2.0.17.Final</version>
         </dependency>
 
     </dependencies>
index d286d10..8798b4e 100644 (file)
@@ -229,8 +229,13 @@ public class ConfigBindingServiceEnvironmentPostProcessor implements Environment
         Optional<String> configServiceJsonOptional;
         JsonElement jsonConfig = jsonObject.get(ConfigBindingServiceConstants.CONFIG);
 
+        String policies = null;
         if (jsonConfig.getAsJsonObject().get(ConfigBindingServiceConstants.CONFIG) != null) {
             configServiceJsonOptional = Optional.of(jsonConfig.toString());
+            policies = jsonConfig.getAsJsonObject().get(ConfigBindingServiceConstants.POLICIES)
+                                 .getAsJsonObject().getAsJsonArray(ConfigBindingServiceConstants.ITEMS).get(0)
+                                 .getAsJsonObject().get(ConfigBindingServiceConstants.CONFIG)
+                                 .getAsJsonObject().get(ConfigBindingServiceConstants.TCAPOLICY).toString();
         } else {
             configServiceJsonOptional = Optional.of(jsonObject.toString());
         }
@@ -239,7 +244,9 @@ public class ConfigBindingServiceEnvironmentPostProcessor implements Environment
         // values
         Map<String, Object> configPropertiesMap = configServiceJsonOptional
                 .map(new JsonStringToMapFunction(configServicePropertiesKey)).orElse(Collections.emptyMap());
-
+        if (policies != null) {
+            configPropertiesMap.put(ConfigBindingServiceConstants.CONFIG_POLICIES, policies);
+        }
         if (configPropertiesMap.isEmpty()) {
 
             logger.warn("No properties found in config binding service");
@@ -264,7 +271,7 @@ public class ConfigBindingServiceEnvironmentPostProcessor implements Environment
                     .info("Adding property from config service in spring context: {} -> {}", key, value));
             MutablePropertySources sources = env.getPropertySources();
             addJsonPropertySource(sources, new MapPropertySource(configServicePropertiesKey, filterKeyMap));
-
+            
         }
         return configServiceJsonOptional.get();
     }
index 22fdccc..c419983 100644 (file)
@@ -27,7 +27,7 @@
        <parent>
                <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
                <artifactId>tca-gen2-parent</artifactId>
-               <version>1.1.0-SNAPSHOT</version>
+               <version>1.2.0-SNAPSHOT</version>
        </parent>
 
     <artifactId>dcae-analytics</artifactId>
@@ -55,7 +55,7 @@
 
         <!-- DEPENDENCIES VERSION -->
         <eelf.logger.version>1.0.1-SNAPSHOT</eelf.logger.version>
-        <spring.boot.version>2.0.5.RELEASE</spring.boot.version>
+        <spring.boot.version>2.0.9.RELEASE</spring.boot.version>
         <spring.cloud.version>Finchley.RC2</spring.cloud.version>
         <spring.version>5.0.11.RELEASE</spring.version>
         <commons.text.version>1.4</commons.text.version>
         <findbugs.annotations.version>3.0.1</findbugs.annotations.version>
 
         <!-- TEST DEPENDENCIES -->
-        <junit-jupiter.version>5.0.2</junit-jupiter.version>
-        <junit-platform.version>1.0.2</junit-platform.version>
+        <junit-jupiter.version>5.6.2</junit-jupiter.version>
+        <junit-platform.version>1.6.2</junit-platform.version>
         <apiguardian-api.version>1.0.0</apiguardian-api.version>
 
         <!--TEST SETTINGS -->
         <surefire.redirectTestOutputToFile>true</surefire.redirectTestOutputToFile>
         <!-- PLUGINS VERSIONS -->
-        <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
+        <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
         <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
         <maven-assembly-plugin.version>3.1.0</maven-assembly-plugin.version>
-        <maven-javadoc-plugin.version>3.0.0-M1</maven-javadoc-plugin.version>
-        <maven-surefire-plugin.version>2.19</maven-surefire-plugin.version>
-        <maven-failsafe-plugin.version>2.19.1</maven-failsafe-plugin.version>
+        <maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
+        <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
+        <maven-failsafe-plugin.version>2.22.2</maven-failsafe-plugin.version>
         <maven-source-plugin.version>3.0.1</maven-source-plugin.version>
         <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
         <jacoco.plugin.version>0.8.1</jacoco.plugin.version>
         <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
         </sonar.coverage.jacoco.xmlReportPaths>
-        <findbugs.plugin.version>3.0.5</findbugs.plugin.version>
-        <pmd.plugin.version>3.8</pmd.plugin.version>
+        <pmd.plugin.version>3.11.0</pmd.plugin.version>
         <checkstyle.plugin.version>2.17</checkstyle.plugin.version>
-        <lombok.plugin.version>1.16.18.1</lombok.plugin.version>
+        <lombok.plugin.version>1.18.0.0</lombok.plugin.version>
         <gitcommitid.plugin.version>2.2.3</gitcommitid.plugin.version>
         <maven.build.helper.plugin.version>3.0.0</maven.build.helper.plugin.version>
-        <!--<dockerfile-maven-version>1.4.3</dockerfile-maven-version>-->
-       <docker-maven-version>1.0.0</docker-maven-version>
+           <docker-maven-version>1.0.0</docker-maven-version>
 
         <!--PLUGIN SETTINGS -->
-        <compiler.source.version>1.8</compiler.source.version>
-        <compiler.target.version>1.8</compiler.target.version>
+        <compiler.source.version>11</compiler.source.version>
+        <compiler.target.version>11</compiler.target.version>
         <unit.test.pattern>**/*Test.java</unit.test.pattern>
         <skip.unit.tests>false</skip.unit.tests>
         <integration.test.pattern>**/*IT.java</integration.test.pattern>
         <snapshots.path>content/repositories/snapshots/</snapshots.path>
         <releases.path>content/repositories/releases/</releases.path>
         <docker.repository>nexus3.onap.org:10003</docker.repository>
-
+        <jackson.version>2.11.0</jackson.version>
+        <undertow.version>2.0.27</undertow.version>
+        <spring-webflux.version>5.2.7.RELEASE</spring-webflux.version>
+        <spring-swagger-ui.version>2.10.5</spring-swagger-ui.version>
 
         <!-- SONAR EXCLUSIONS -->
         <!-- EXCLUDE TEST COVERAGE ON
                 <version>${project.version}</version>
             </dependency>
 
-
             <!-- EELF LOGGER -->
             <dependency>
                 <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
             <dependency>
                 <groupId>io.springfox</groupId>
                 <artifactId>springfox-swagger-ui</artifactId>
-                <version>${springfox-swagger2.version}</version>
+                <version>${spring-swagger-ui.version}</version>
             </dependency>
 
             <!-- FIND BUGS -->
                 <version>${junit-jupiter.version}</version>
                 <scope>test</scope>
             </dependency>
+                   <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <version>4.13</version>
+                       <scope>test</scope>
+                   </dependency>
+                   <dependency>
+                       <groupId>org.junit.vintage</groupId>
+                       <artifactId>junit-vintage-engine</artifactId>
+                       <version>5.6.2</version>
+                       <scope>test</scope>
+                   </dependency>
             <dependency>
                 <groupId>org.junit.platform</groupId>
                 <artifactId>junit-platform-engine</artifactId>
-                <version>${junit-platform.version}</version>
+                <version>1.6.2</version>
                 <scope>test</scope>
             </dependency>
             <dependency>
                 <groupId>org.junit.platform</groupId>
                 <artifactId>junit-platform-launcher</artifactId>
-                <version>${junit-platform.version}</version>
+                <version>1.6.2</version>
                 <scope>test</scope>
             </dependency>
             <dependency>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-web</artifactId>
                 </exclusion>
+                <exclusion>
+                           <groupId>org.springframework.boot</groupId>
+                           <artifactId>spring-boot-starter-test</artifactId>
+                </exclusion>
+                <exclusion>
+                       <groupId>org.mockito</groupId>
+                       <artifactId>mockito-core</artifactId>
+                </exclusion>
+                <exclusion>
+                               <groupId>io.undertow</groupId>
+                               <artifactId>undertow-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>spring-webflux</artifactId>
+                </exclusion>
+                <exclusion>
+                           <groupId>com.fasterxml.jackson.core</groupId>
+                           <artifactId>jackson-databind</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.fasterxml.jackson.core</groupId>
+                    <artifactId>jackson-core</artifactId>
+                </exclusion>
+                <exclusion>
+                           <groupId>com.fasterxml.jackson.dataformat</groupId>
+                           <artifactId>jackson-dataformat-smile</artifactId>
+                </exclusion>
               </exclusions>
                 <type>pom</type>
                 <scope>import</scope>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
+                       <dependency>
+                           <groupId>org.springframework</groupId>
+                           <artifactId>spring-webflux</artifactId>
+                           <version>${spring-webflux.version}</version>
+                       </dependency>
           <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-web</artifactId>
             <version>${spring.version}</version>
           </dependency>
+          <dependency>
+             <groupId>org.springframework.boot</groupId>
+             <artifactId>spring-boot-starter-test</artifactId>
+            <version>2.2.0.RELEASE</version>
+          </dependency>
+          <dependency>
+                <groupId>org.mockito</groupId>
+                <artifactId>mockito-core</artifactId>
+                <version>2.23.4</version>
+          </dependency>
+             <dependency>
+               <groupId>io.undertow</groupId>
+               <artifactId>undertow-core</artifactId>
+               <version>2.0.27.Final</version>
+             </dependency>
+               <dependency>
+                   <groupId>com.fasterxml.jackson.core</groupId>
+                   <artifactId>jackson-databind</artifactId>
+                <version>${jackson.version}</version>
+               </dependency>
+               <dependency>
+                           <groupId>com.fasterxml.jackson.core</groupId>
+                           <artifactId>jackson-core</artifactId>
+                           <version>${jackson.version}</version>
+            </dependency>
+                       <dependency>
+                          <groupId>com.fasterxml.jackson.dataformat</groupId>
+                          <artifactId>jackson-dataformat-smile</artifactId>
+                          <version>${jackson.version}</version>
+                       </dependency>
+
         </dependencies>
     </dependencyManagement>
 
                             <exclude>${integration.test.pattern}</exclude>
                         </excludes>
                     </configuration>
-                    <dependencies>
-                        <dependency>
-                            <groupId>org.junit.platform</groupId>
-                            <artifactId>junit-platform-surefire-provider</artifactId>
-                            <version>${junit-platform.version}</version>
-                        </dependency>
-                    </dependencies>
                 </plugin>
 
                 <!-- FAIL SAFE PLUGIN FOR INTEGRATION TEST -->
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-failsafe-plugin</artifactId>
                     <version>${maven-failsafe-plugin.version}</version>
-                    <dependencies>
-                        <dependency>
-                            <groupId>org.junit.platform</groupId>
-                            <artifactId>junit-platform-surefire-provider</artifactId>
-                            <version>${junit-platform.version}</version>
-                        </dependency>
-                    </dependencies>
                     <executions>
                         <execution>
                             <id>integration-tests</id>
                     </executions>
                 </plugin>
 
-
-                <!-- FIND BUGS (STATIC CODE ANALYSIS) PLUGIN -->
-                <plugin>
-                    <groupId>org.codehaus.mojo</groupId>
-                    <artifactId>findbugs-maven-plugin</artifactId>
-                    <version>${findbugs.plugin.version}</version>
-                    <configuration>
-                        <effort>Max</effort>
-                        <threshold>Low</threshold>
-                        <xmlOutput>true</xmlOutput>
-                        <!-- BUILD FAIL ON FINDBUGS ERRORS -->
-                        <failOnError>${findbugs.failOnError}</failOnError>
-                        <excludeFilterFile>${main.basedir}/findbugs-exclude.xml</excludeFilterFile>
-                        <outputDirectory>${project.reporting.outputDirectory}/findbugs</outputDirectory>
-                        <findbugsXmlOutputDirectory>${project.reporting.outputDirectory}/findbugs
-                        </findbugsXmlOutputDirectory>
-                    </configuration>
-                    <executions>
-                        <execution>
-                            <id>analyze-compile</id>
-                            <phase>compile</phase>
-                            <goals>
-                                <goal>check</goal>
-                            </goals>
-                        </execution>
-                    </executions>
-                </plugin>
-
                 <!-- PMD PLUGIN SETUP -->
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-pmd-plugin</artifactId>
             </plugin>
 
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>findbugs-maven-plugin</artifactId>
-            </plugin>
-
            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-checkstyle-plugin</artifactId>
index aeffff6..99c1da7 100644 (file)
@@ -17,7 +17,7 @@
 #
 #
 major=1
-minor=1
+minor=2
 patch=0
 base_version=${major}.${minor}.${patch}
 release_version=${base_version}
index 2817cf1..5157e81 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
         <artifactId>eelf-logger</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
+        <version>1.2.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>eelf-logger-api</artifactId>
index bdce8d1..1acf7a7 100644 (file)
@@ -29,7 +29,7 @@ public interface AppLogInfo extends LogInfo {
 
     /**
      * Required field contains UUID which identifies this service instance inside an inventory management system
-     * (e.g. A&AI) to reference/manage this service as a unit
+     * to reference/manage this service as a unit
      *
      * @return remote VM Name or service the request is acting upon.
      */
index 876037c..af70c89 100644 (file)
@@ -30,36 +30,29 @@ public interface ErrorLogInfo extends LogInfo {
     /**
      * Required field contains an error code representing the error condition. The codes can be chose by
      * the logging application but they should adhere to the guidelines embodied in the table below:
-     * <table summary="Error Codes" cellspacing=0 border=1>
-     * <tr>
-     * <td style=min-width:50px>Error type</td>
-     * <td style=min-width:50px>Notes</td>
-     * </tr>
-     * <tr>
-     * <td style=min-width:50px>100</td>
-     * <td style=min-width:50px>Permission errors</td>
-     * </tr>
-     * <tr>
-     * <td style=min-width:50px>200</td>
-     * <td style=min-width:50px>Availability errors/Timeouts</td>
-     * </tr>
-     * <tr>
-     * <td style=min-width:50px>300</td>
-     * <td style=min-width:50px>Data errors</td>
-     * </tr>
-     * <tr>
-     * <td style=min-width:50px>400</td>
-     * <td style=min-width:50px>Schema errors</td>
-     * </tr>
-     * <tr>
-     * <td style=min-width:50px>500</td>
-     * <td style=min-width:50px>Business process errors</td>
-     * </tr>
-     * <tr>
-     * <td style=min-width:50px>900</td>
-     * <td style=min-width:50px>Unknown Errors</td>
-     * </tr>
-     * </table>
+     *
+     * <div style="display: flex">
+     *     <div style="border-left: 2px solid black; border-right: 2px solid black;">
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Error Type</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">100</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">200</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">300</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">400</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">500</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;border-bottom: 2px solid black;">
+     *             900</p>
+     *     </div>
+     *     <div style="border-right: 2px solid black;">
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Notes</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Permission errors</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Availability errors/Timeouts</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Data errors</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Schema errors</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Business process errors</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;border-bottom: 2px solid black;">
+     *             Unknown Errors</p>
+     *     </div>
+     * </div>
      *
      * @return error Code
      */
index 3da5fc3..81e0369 100644 (file)
@@ -21,14 +21,33 @@ package org.onap.dcae.utils.eelf.logger.api.info;
 
 /**
  * Enum for Nagios monitoring/alerting codes as per table below.
- * <p>
- * <table cellspacing=0 border=1>
- * <tr><th>Return Code</th><th>Service State</th><th>Host State</th></tr>
- * <tr><td>0</td><td>OK</td><td>UP</td></tr>
- * <tr><td>1</td><td>WARNING</td><td>UP or DOWN/UNREACHABLE*</td></tr>
- * <tr><td>2</td><td>CRITICAL</td><td>DOWN/UNREACHABLE</td></tr>
- * <tr><td>3</td><td>UNKNOWN</td><td>DOWN/UNREACHABLE</td></tr>
- * </table>
+ *
+ *
+ * <div style="display: flex">
+ *         <div style="border-left: 2px solid black; border-right: 2px solid black;">
+ *             <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Return Code</p>
+ *             <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">0</p>
+ *             <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">1</p>
+ *             <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">2</p>
+ *             <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;border-bottom: 2px solid black;">3</p>
+ *         </div>
+ *         <div style="border-right: 2px solid black;">
+ *             <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Service State</p>
+ *             <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">OK</p>
+ *             <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">WARNING</p>
+ *             <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">CRITICAL</p>
+ *             <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;border-bottom: 2px solid black;">
+ *                 UNKNOWN</p>
+ *         </div>
+ *         <div style="border-right: 2px solid black;">
+ *             <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Host State</p>
+ *             <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">UP</p>
+ *             <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">UP or DOWN/UNREACHABLE*</p>
+ *             <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">DOWN/UNREACHABLE</p>
+ *             <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;border-bottom: 2px solid black;">
+ *                 DOWN/UNREACHABLE</p>
+ *         </div>
+ * </div>
  *
  * @author Rajiv Singla
  */
index 1929e7f..ad09f3d 100644 (file)
@@ -30,43 +30,32 @@ public interface ResponseLogInfo extends LogInfo {
      * Required field contains application-specific response codes. While error codes are
      * application-specific, they
      * should conform categories mentioned in table below in order to provide consistency
-     * <p>
-     * <table cellspacing=0 border=1>
-     * <tr>
-     * <th style=min-width:50px><b>Error type</b></th>
-     * <th style=min-width:50px><b>Notes</b></th>
-     * </tr>
-     * <tr>
-     * <td style=min-width:50px>0</td>
-     * <td style=min-width:50px>Success</td>
-     * </tr>
-     * <tr>
-     * <td style=min-width:50px>100</td>
-     * <td style=min-width:50px>Permission errors</td>
-     * </tr>
-     * <tr>
-     * <td style=min-width:50px>200</td>
-     * <td style=min-width:50px>Availability errors/Timeouts</td>
-     * </tr>
-     * <tr>
-     * <td style=min-width:50px>300</td>
-     * <td style=min-width:50px>Data errors</td>
-     * </tr>
-     * <tr>
-     * <td style=min-width:50px>400</td>
-     * <td style=min-width:50px>Schema errors</td>
-     * </tr>
-     * <tr>
-     * <td style=min-width:50px>500</td>
-     * <td style=min-width:50px>Business process errors</td>
-     * </tr>
-     * <tr>
-     * <td style=min-width:50px>900</td>
-     * <td style=min-width:50px>Unknown Errors</td>
-     * </tr>
-     * </table>
+     * <div style="display: flex">
+     *     <div style="border-left: 2px solid black; border-right: 2px solid black;">
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Error Type</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">0</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">100</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">200</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">300</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">400</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">500</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;border-bottom: 2px solid black;">
+     *             900</p>
+     *     </div>
+     *     <div style="border-right: 2px solid black;">
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Notes</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Success</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Permission errors</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Availability errors/Timeouts</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Data errors</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Schema errors</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;">Business process errors</p>
+     *         <p style="margin: 0;padding: 0 1px 0;border-top: 2px solid black;border-bottom: 2px solid black;">
+     *             Unknown Errors</p>
+     *     </div>
+     * </div>
      *
-     * @return application-specific error code
+     * @return error Code
      */
     Integer getResponseCode();
 
index 952176e..df33941 100644 (file)
@@ -59,6 +59,7 @@ public interface AuditLog {
      *
      * @param message log message
      * @param auditLogSpec audit log spec
+     * @param optionalLogSpec optional log spec
      * @param args argument values for log message interpolation
      */
     void info(String message, AuditLogSpec auditLogSpec, OptionalLogSpec optionalLogSpec, String... args);
@@ -78,6 +79,7 @@ public interface AuditLog {
      *
      * @param message log message
      * @param auditLogSpec audit log spec
+     * @param optionalLogSpec optional log spec
      * @param args argument values for log message interpolation
      */
     void warn(String message, AuditLogSpec auditLogSpec, OptionalLogSpec optionalLogSpec, String... args);
@@ -96,6 +98,7 @@ public interface AuditLog {
      *
      * @param message log message
      * @param auditLogSpec audit log spec
+     * @param optionalLogSpec optional log spec
      * @param args argument values for log message interpolation
      */
     void error(String message, AuditLogSpec auditLogSpec, OptionalLogSpec optionalLogSpec, String... args);
@@ -114,6 +117,7 @@ public interface AuditLog {
      *
      * @param message log message
      * @param auditLogSpec audit log spec
+     * @param optionalLogSpec optional log spec
      * @param args argument values for log message interpolation
      */
     void fatal(String message, AuditLogSpec auditLogSpec, OptionalLogSpec optionalLogSpec, String... args);
index 6b27755..900eebf 100644 (file)
@@ -57,6 +57,7 @@ public interface ErrorLog {
      *
      * @param message log message
      * @param errorLogSpec error log spec
+     * @param optionalLogSpec optional log spec
      * @param args argument values for log message interpolation
      */
     void error(String message, ErrorLogSpec errorLogSpec, OptionalLogSpec optionalLogSpec, String... args);
@@ -76,6 +77,7 @@ public interface ErrorLog {
      *
      * @param message log message
      * @param errorLogSpec error log spec
+     * @param optionalLogSpec optional log spec
      * @param args argument values for log message interpolation
      */
     void warn(String message, ErrorLogSpec errorLogSpec, OptionalLogSpec optionalLogSpec, String... args);
index ebc33ca..508f791 100644 (file)
@@ -59,6 +59,7 @@ public interface MetricLog {
      *
      * @param message log message
      * @param metricLogSpec metric log spec
+     * @param optionalLogSpec optional log spec
      * @param args argument values for log message interpolation
      */
     void info(String message, MetricLogSpec metricLogSpec, OptionalLogSpec optionalLogSpec, String... args);
@@ -78,6 +79,7 @@ public interface MetricLog {
      *
      * @param message log message
      * @param metricLogSpec metric log spec
+     * @param optionalLogSpec optional log spec
      * @param args argument values for log message interpolation
      */
     void warn(String message, MetricLogSpec metricLogSpec, OptionalLogSpec optionalLogSpec, String... args);
@@ -96,6 +98,7 @@ public interface MetricLog {
      *
      * @param message log message
      * @param metricLogSpec metric log spec
+     * @param optionalLogSpec optional log spec
      * @param args argument values for log message interpolation
      */
     void error(String message, MetricLogSpec metricLogSpec, OptionalLogSpec optionalLogSpec, String... args);
@@ -114,6 +117,7 @@ public interface MetricLog {
      *
      * @param message log message
      * @param metricLogSpec metric log spec
+     * @param optionalLogSpec optional log spec
      * @param args argument values for log message interpolation
      */
     void fatal(String message, MetricLogSpec metricLogSpec, OptionalLogSpec optionalLogSpec, String... args);
index b829b51..429457f 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
                <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
         <artifactId>eelf-logger</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
+        <version>1.2.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>eelf-logger-logback-impl</artifactId>
index 50230b0..e3d941b 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
                <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
         <artifactId>eelf-logger</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
+        <version>1.2.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>eelf-logger-model</artifactId>
index 05eb504..bb762ae 100644 (file)
@@ -26,7 +26,7 @@
        <parent>
                <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
                <artifactId>tca-gen2-parent</artifactId>
-               <version>1.1.0-SNAPSHOT</version>
+               <version>1.2.0-SNAPSHOT</version>
        </parent>
 
     <artifactId>eelf-logger</artifactId>
         <module>eelf-logger-logback-impl</module>
     </modules>
 
-
-
     <properties>
-
         <!-- PROJECT SETTINGS-->
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
         <!-- PROJECT DEPENDENCIES -->
         <slf4j.version>1.7.5</slf4j.version>
         <logback.version>1.2.3</logback.version>
-        <lombok.version>1.16.10</lombok.version>
-
+        <lombok.version>1.18.12</lombok.version>
 
         <!--TESTING DEPENDENCIES -->
         <junit.version>4.12</junit.version>
-        <mockito.version>2.2.11</mockito.version>
+        <mockito.version>2.22.0</mockito.version>
         <assertj-core.version>2.6.0</assertj-core.version>
 
 
         <!-- PLUGINS VERSIONS -->
-        <compiler.plugin.version>3.3</compiler.plugin.version>
+        <compiler.plugin.version>3.8.0</compiler.plugin.version>
         <surefire.plugin.version>2.19.1</surefire.plugin.version>
         <failsafe.plugin.version>2.19.1</failsafe.plugin.version>
-        <findbugs.plugin.version>3.0.2</findbugs.plugin.version>
 
-        <pmd.plugin.version>3.5</pmd.plugin.version>
-        <javadoc.plugin.version>2.10.4</javadoc.plugin.version>
-        <source.plugin.version>2.4</source.plugin.version>
+        <pmd.plugin.version>3.11.0</pmd.plugin.version>
+        <javadoc.plugin.version>3.0.0</javadoc.plugin.version>
+        <source.plugin.version>3.2.1</source.plugin.version>
         <jar.plugin.version>2.4</jar.plugin.version>
         <deploy.plugin.version>2.8</deploy.plugin.version>
-        <lombok.plugin.version>1.16.10.0</lombok.plugin.version>
+        <lombok.plugin.version>1.18.0.0</lombok.plugin.version>
         <maven.site.plugin>3.5.1</maven.site.plugin>
 
         <!--PLUGIN SETTINGS -->
-        <compiler.source.version>1.7</compiler.source.version>
-        <compiler.target.version>1.7</compiler.target.version>
+        <compiler.source.version>11</compiler.source.version>
+        <compiler.target.version>11</compiler.target.version>
         <unit.test.pattern>**/*Test.java</unit.test.pattern>
         <skip.unit.tests>false</skip.unit.tests>
         <integration.test.pattern>**/*IT.java</integration.test.pattern>
         <skip.integration.tests>true</skip.integration.tests>
         <pmd.violation.buildfail>true</pmd.violation.buildfail>
-        <findbugs.failOnError>true</findbugs.failOnError>
         <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
 
     </properties>
                     </executions>
                 </plugin>
 
-
-                <!-- FIND BUGS (STATIC CODE ANALYSIS) PLUGIN -->
-                <plugin>
-                    <groupId>org.codehaus.mojo</groupId>
-                    <artifactId>findbugs-maven-plugin</artifactId>
-                    <version>${findbugs.plugin.version}</version>
-                    <configuration>
-                        <effort>Max</effort>
-                        <threshold>Low</threshold>
-                        <xmlOutput>true</xmlOutput>
-                        <!-- BUILD FAIL ON FINDBUGS ERRORS -->
-                        <failOnError>${findbugs.failOnError}</failOnError>
-                        <excludeFilterFile>${main.basedir}/findbugs-exclude.xml</excludeFilterFile>
-                        <outputDirectory>${project.reporting.outputDirectory}/findbugs</outputDirectory>
-                        <findbugsXmlOutputDirectory>${project.reporting.outputDirectory}/findbugs
-                        </findbugsXmlOutputDirectory>
-                    </configuration>
-                    <executions>
-                        <execution>
-                            <id>analyze-compile</id>
-                            <phase>compile</phase>
-                            <goals>
-                                <goal>check</goal>
-                            </goals>
-                        </execution>
-                    </executions>
-                </plugin>
-
                 <!-- PMD PLUGIN SETUP -->
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-pmd-plugin</artifactId>
             </plugin>
 
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>findbugs-maven-plugin</artifactId>
-            </plugin>
         </plugins>
 
     </build>
index 2dd836f..bef49d7 100644 (file)
@@ -16,7 +16,7 @@
 #
 
 major=1
-minor=1
+minor=2
 patch=0
 base_version=${major}.${minor}.${patch}
 release_version=${base_version}
diff --git a/pom.xml b/pom.xml
index eb364e7..088736b 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
 
     <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
     <artifactId>tca-gen2-parent</artifactId>
-    <version>1.1.0-SNAPSHOT</version>
+    <version>1.2.0-SNAPSHOT</version>
 
     <name>dcaegen2-analytics-tca-gen2</name>
     <packaging>pom</packaging>
index 7b8b963..00ef564 100644 (file)
@@ -1,5 +1,5 @@
 major=1
-minor=1
+minor=2
 patch=0
 base_version=${major}.${minor}.${patch}
 release_version=${base_version}