[DMAAP MM] Update info.yaml 32/118532/3 honolulu istanbul master
authorefiacor <fiachra.corcoran@est.tech>
Thu, 25 Feb 2021 15:33:24 +0000 (15:33 +0000)
committerFiachra Corcoran <fiachra.corcoran@est.tech>
Mon, 1 Mar 2021 09:43:02 +0000 (09:43 +0000)
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Change-Id: I5b5315e700803a8fc82fd5fe7b403a6d31bcb062
Issue-ID: DMAAP-1538

INFO.yaml
pom.xml
src/main/java/org/onap/dmaap/mr/dmaapMMAgent/MirrorMakerAgent.java
src/main/java/org/onap/dmaap/mr/dmaapMMAgent/TopicUtil.java
src/main/java/org/onap/dmaap/mr/dmaapMMAgent/utils/MirrorMakerProcessHandler.java
src/main/resources/log4j.properties [deleted file]
src/main/resources/log4j2.properties [new file with mode: 0644]

index f204084..7566429 100644 (file)
--- a/INFO.yaml
+++ b/INFO.yaml
@@ -1,81 +1,64 @@
 ---
 project: 'dmaap-messagerouter-mirroragent'
 project_creation_date: '2017-08-29'
-lifecycle_state: 'Incubation'
+lifecycle_state: 'Mature'
 project_lead: &onap_releng_ptl
-    name: 'Mandar Sawant'
-    email: 'ms5838@att.com'
-    id: 'sawantmandar'
-    company: 'ATT'
-    timezone: 'America/Dallas'
+  name: 'Fiachra Corcoran'
+  email: 'fiachra.corcoran@est.tech'
+  company: 'ericsson'
+  id: 'efiacor'
+  timezone: 'Europe/Dublin'
 primary_contact: *onap_releng_ptl
 project_category: ''
 issue_tracking:
-    type: 'jira'
-    url: 'https://jira.onap.org/projects/DMAAP'
-    key: 'DMAAP'
+  type: 'jira'
+  url: 'https://jira.onap.org/projects/DMAAP'
+  key: 'DMAAP'
 mailing_list:
-    type: 'groups.io'
-    url: 'lists.onap.org'
-    tag: '<[sub-project_name]>'
+  type: 'groups.io'
+  url: 'lists.onap.org'
+  tag: '<[sub-project_name]>'
 realtime_discussion: ''
 meetings:
-    - type: 'zoom'
-      agenda: ''
-      url: 'https://wiki.onap.org/pages/viewpage.action?pageId=13599275'
-      server: 'n/a'
-      channel: 'n/a'
-      repeats: 'weekly'
-      time: '13:00 UTC'
+  - type: 'zoom'
+    agenda: ''
+    url: 'https://wiki.onap.org/pages/viewpage.action?pageId=13599275'
+    server: 'n/a'
+    channel: 'n/a'
+    repeats: 'weekly'
+    time: '15:30 UTC'
 repositories:
-    - 'dmaap-buscontroller'
-    - 'dmaap-datarouter'
-    - 'dmaap-dbcapi'
-    - 'dmaap-kafka11aaf'
-    - 'dmaap-messagerouter-dmaapclient'
-    - 'dmaap-messagerouter-messageservice'
-    - 'dmaap-messagerouter-mirroragent'
-    - 'dmaap-messagerouter-msgrtr'
-    - 'dmaap-oom'
-    - 'dmaap-zookeeper'
+  - 'dmaap/messagerouter/mirroragent'
 committers:
-    - <<: *onap_releng_ptl
-    - name: 'Mandar Sawant'
-      email: 'ms5838@att.com'
-      company: 'ATT'
-      id: 'sawantmandar'
-      timezone: 'America/Dallas'
-    - name: 'Bhanu Ramesh'
-      email: 'bg6954@att.com'
-      company: 'ATT'
-      id: 'BhanuRamesh'
-      timezone: 'America/Dallas'
-    - name: 'Dominic Lunanuova'
-      email: 'dgl@research.att.com'
-      company: 'ATT'
-      id: 'dglFromAtt'
-      timezone: 'America/Dallas'
-    - name: 'Sunil Unnava'
-      email: 'su622b@att.com'
-      company: 'ATT'
-      id: 'su622b'
-      timezone: 'America/Louisville'
-    - name: 'Conor Ward'
-      email: 'conor.ward@ericsson.com'
-      company: 'ericsson'
-      id: 'econwar'
-      timezone: 'Europe/Dublin'
-    - name: 'Fiachra Corcoran'
-      email: 'fiachra.corcoran@est.tech'
-      company: 'ericsson'
-      id: 'efiacor'
-      timezone: 'Europe/Dublin'      
+  - <<: *onap_releng_ptl
+  - name: 'Fiachra Corcoran'
+    email: 'fiachra.corcoran@est.tech'
+    company: 'ericsson'
+    id: 'efiacor'
+    timezone: 'Europe/Dublin'
+  - name: 'Dominic Lunanuova'
+    email: 'dgl@research.att.com'
+    company: 'ATT'
+    id: 'dglFromAtt'
+    timezone: 'America/Dallas'
 tsc:
-    approval: 'https://lists.onap.org/pipermail/onap-tsc'
-    changes:
-        - type: 'Removal'
-          name: 'Habib Madani'
-          name: 'Xinhui Li'
-          name: 'Jing Wang'
-          name: 'Ramdas Sawant'
-          name: 'Varun Gudisena'
+  approval: 'https://lists.onap.org/pipermail/onap-tsc'
+  changes:
+    - type: 'Removal'
+      name: 'Habib Madani'
+    - type: 'Removal'
+      name: 'Xinhui Li'
+    - type: 'Removal'
+      name: 'Jing Wang'
+    - type: 'Removal'
+      name: 'Ramdas Sawant'
+    - type: 'Removal'
+      name: 'Varun Gudisena'
+    - type: 'Removal'
+      name: 'Conor Ward'
+    - type: 'Removal'
+      name: 'Sunil Unnava'
+    - type: 'Removal'
+      name: 'Bhanu Ramesh'
+    - type: 'Removal'
+      name: 'Mandar Sawant'
diff --git a/pom.xml b/pom.xml
index e0516b8..6c53e7b 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
        <parent>
                <groupId>org.onap.oparent</groupId>
                <artifactId>oparent</artifactId>
-               <version>2.0.0</version>
+               <version>2.1.0</version>
        </parent>
 
        <name>dmaap-messagerouter-mirroragent</name>
 
        <properties>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+               <log4j.version>2.13.3</log4j.version>
                <!--  SONAR  -->
                <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
-                <jacoco.version>0.7.7.201606060606</jacoco.version>
-           <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
-           <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
-           <!-- Default Sonar configuration -->
-           <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
-           <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
-           <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
+           <sonar.language>java</sonar.language>
+        <sonar.skip>false</sonar.skip>
+        <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
+        <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
+        <sonar.projectVersion>${project.version}</sonar.projectVersion>
            <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
            <sitePath>/content/sites/site/org/onap/dmaap/messagerouter/mirroragent/${project.artifactId}/${project.version}</sitePath>
            <nexusproxy>https://nexus.onap.org</nexusproxy>
                        <version>2.6.2</version>
                </dependency>
                <dependency>
-                       <groupId>log4j</groupId>
-                       <artifactId>log4j</artifactId>
-                       <version>1.2.17</version>
+                       <groupId>org.apache.logging.log4j</groupId>
+                       <artifactId>log4j-api</artifactId>
+                       <version>${log4j.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.logging.log4j</groupId>
+                       <artifactId>log4j-core</artifactId>
+                       <version>${log4j.version}</version>
                </dependency>
                <dependency>
                        <groupId>org.jasypt</groupId>
                                        </execution>
                                </executions>
                        </plugin>
-                       <plugin>
-                               <groupId>org.codehaus.mojo</groupId>
-                               <artifactId>cobertura-maven-plugin</artifactId>
-                               <version>2.7</version>
-                               <configuration>
-                                       <formats>
-                                               <format>html</format>
-                                               <format>xml</format>
-                                       </formats>
-                               </configuration>
-                       </plugin>
                        <plugin>
                                <artifactId>maven-assembly-plugin</artifactId>
                                <version>2.4</version>
                                        </execution>
                                </executions>
                        </plugin>
-                       <plugin>
-          <groupId>org.jacoco</groupId>
-          <artifactId>jacoco-maven-plugin</artifactId>
-          <version>${jacoco.version}</version>
-          <configuration>
-            <!-- Note: This exclusion list should match <sonar.exclusions>
-         property above -->
-            <excludes>
-              <exclude>**/gen/**</exclude>
-              <exclude>**/generated-sources/**</exclude>
-              <exclude>**/yang-gen/**</exclude>
-              <exclude>**/pax/**</exclude>
-            </excludes>
-          </configuration>
-          <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>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
-                <!--
-            Sets the name of the property containing the settings
-            for JaCoCo runtime agent.
-        -->
-                <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>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
-                <!-- Sets the output directory for the code coverage report. -->
-                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
-              </configuration>
-            </execution>
-            <execution>
-              <id>pre-integration-test</id>
-              <phase>pre-integration-test</phase>
-              <goals>
-                <goal>prepare-agent</goal>
-              </goals>
-              <configuration>
-                <!-- Sets the path to the file which contains the execution data. -->
-                <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
-                <!--
-            Sets the name of the property containing the settings
-            for JaCoCo runtime agent.
-        -->
-                <propertyName>failsafeArgLine</propertyName>
-              </configuration>
-            </execution>
-            <!--
-        Ensures that the code coverage report for integration tests after
-        integration tests have been run.
-        -->
-            <execution>
-              <id>post-integration-test</id>
-              <phase>post-integration-test</phase>
-              <goals>
-                <goal>report</goal>
-              </goals>
-              <configuration>
-                <!-- Sets the path to the file which contains the execution data. -->
-                <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
-                <!-- Sets the output directory for the code coverage report. -->
-                <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
-              </configuration>
-            </execution>
-          </executions>
-        </plugin>
+                        <plugin>
+                    <groupId>org.jacoco</groupId>
+                    <artifactId>jacoco-maven-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>prepare-agent</id>
+                            <goals>
+                                <goal>prepare-agent</goal>
+                            </goals>
+                        </execution>
+                        <execution>
+                            <id>report</id>
+                            <goals>
+                                <goal>report</goal>
+                            </goals>
+                            <configuration>
+                                <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile>
+                                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
 
                </plugins>
        </build>
index 9af3809..f47adfb 100644 (file)
@@ -21,6 +21,8 @@
  *******************************************************************************/
 package org.onap.dmaap.mr.dmaapMMAgent;
 
+import com.google.gson.Gson;
+import com.google.gson.internal.LinkedTreeMap;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -29,8 +31,8 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.Properties;
-
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.jasypt.util.text.BasicTextEncryptor;
 import org.json.JSONObject;
 import org.onap.dmaap.mr.dmaapMMAgent.dao.CreateMirrorMaker;
@@ -41,11 +43,8 @@ import org.onap.dmaap.mr.dmaapMMAgent.dao.UpdateMirrorMaker;
 import org.onap.dmaap.mr.dmaapMMAgent.dao.UpdateWhiteList;
 import org.onap.dmaap.mr.dmaapMMAgent.utils.MirrorMakerProcessHandler;
 
-import com.google.gson.Gson;
-import com.google.gson.internal.LinkedTreeMap;
-
 public class MirrorMakerAgent {
-       static final Logger logger = Logger.getLogger(MirrorMakerAgent.class);
+       private static final Logger logger = LogManager.getLogger(MirrorMakerAgent.class);
        Properties mirrorMakerProperties = new Properties();
        ListMirrorMaker mirrorMakers = null;
        String mmagenthome = "/opt";
index e2dc0ef..85a6bcd 100644 (file)
 
 package org.onap.dmaap.mr.dmaapMMAgent;
 
+import com.google.gson.Gson;
+import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
 import java.io.BufferedReader;
 import java.io.DataOutputStream;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.net.HttpURLConnection;
 import java.net.URL;
-
-import org.apache.log4j.Logger;
-
-import com.google.gson.Gson;
-import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 public class TopicUtil {
 
-       static final Logger logger = Logger.getLogger(TopicUtil.class);
+       private static final Logger logger = LogManager.getLogger(TopicUtil.class);
 
        public String publishTopic(String topicURL, String topicname, String mechid, String password, String message) {
                try {
index 883d151..625fbc8 100644 (file)
@@ -24,11 +24,11 @@ package org.onap.dmaap.mr.dmaapMMAgent.utils;
 import java.io.BufferedReader;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 public class MirrorMakerProcessHandler {
-       static final Logger logger = Logger.getLogger(MirrorMakerProcessHandler.class);
+       private static final Logger logger = LogManager.getLogger(MirrorMakerProcessHandler.class);
        static String mmagenthome = "/opt";
 
        public static boolean checkMirrorMakerProcess(String agentname, boolean enablelogCheck, String grepLog) throws Exception {
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
deleted file mode 100644 (file)
index 9225695..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-###############################################################################
-#  ============LICENSE_START=======================================================
-#  org.onap.dmaap
-#  ================================================================================
-#  Copyright © 2017 AT&T Intellectual Property. 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=========================================================
-#
-#  ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#  
-###############################################################################
-# Root logger option
-log4j.rootLogger=INFO, stdout, file
-
-# Redirect log messages to console
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p - %m %n
-
-# Redirect log messages to a log file, support file rolling.
-log4j.appender.file=org.apache.log4j.RollingFileAppender
-log4j.appender.file.File= /opt/logs/mmagent.log
-log4j.appender.file.MaxFileSize=5MB
-log4j.appender.file.MaxBackupIndex=10
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p - %m  %n
\ No newline at end of file
diff --git a/src/main/resources/log4j2.properties b/src/main/resources/log4j2.properties
new file mode 100644 (file)
index 0000000..9432e1d
--- /dev/null
@@ -0,0 +1,47 @@
+###
+# ============LICENSE_START=======================================================
+#  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=========================================================
+###
+
+# Log4j2 PropertiesConfig
+status = info
+name = PropertiesConfig
+
+# Console Appender
+appender.console.type = Console
+appender.console.name = STDOUT
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p - %m %n
+
+# Rolling Appender
+appender.rolling.type = RollingFile
+appender.rolling.name = rollingFile
+appender.rolling.fileName = /opt/logs/mmagent.log
+appender.rolling.filePattern = /opt/logs/$${date:yyyy-MM-dd}/mmagent-%d{yyyy-MM-dd}-%i.log
+appender.rolling.layout.type = PatternLayout
+appender.rolling.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p - %m  %n
+appender.rolling.policies.type = Policies
+appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
+appender.rolling.policies.size.size=5MB
+appender.rolling.strategy.type = DefaultRolloverStrategy
+appender.rolling.strategy.max = 10
+
+# Root Logger
+rootLogger.level = info
+rootLogger.appenderRef.stdout.ref = STDOUT
+rootLogger.appenderRef.rolling.ref = rollingFile
\ No newline at end of file