Merge "Updated champ-lib to use the correct logger"
authorJames Forsyth <jf2512@att.com>
Thu, 15 Aug 2019 13:43:24 +0000 (13:43 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 15 Aug 2019 13:43:24 +0000 (13:43 +0000)
12 files changed:
champ-lib/champ-core/pom.xml
champ-lib/champ-janus/pom.xml
champ-lib/champ-titan/pom.xml
champ-lib/pom.xml
champ-service-deps-janus/pom.xml
champ-service-deps-titan/pom.xml
champ-service/pom.xml
champ-service/src/main/java/org/onap/champ/entity/ChampBulkPayload.java
champ-service/src/main/java/org/onap/champ/service/ChampTransactionCache.java
champ-service/src/main/java/org/onap/champ/util/ChampProperties.java
pom.xml
version.properties

index f352c81..df143c4 100644 (file)
@@ -27,7 +27,7 @@ limitations under the License.
     <parent>
         <groupId>org.onap.aai.champ</groupId>
         <artifactId>champ-lib</artifactId>
-        <version>1.4.1-SNAPSHOT</version>
+        <version>1.5.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.onap.aai.champ.champ-lib</groupId>
@@ -168,9 +168,6 @@ limitations under the License.
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
             </plugin>
             <plugin>
                 <groupId>com.mycila</groupId>
index d9966cf..02b375c 100644 (file)
@@ -27,7 +27,7 @@ limitations under the License.
     <parent>
         <groupId>org.onap.aai.champ</groupId>
         <artifactId>champ-lib</artifactId>
-        <version>1.4.1-SNAPSHOT</version>
+        <version>1.5.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.onap.aai.champ.champ-lib</groupId>
@@ -145,9 +145,6 @@ limitations under the License.
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
             </plugin>
             <plugin>
                 <groupId>com.mycila</groupId>
index 40e1281..de1426a 100644 (file)
@@ -26,7 +26,7 @@ limitations under the License.
     <parent>
         <groupId>org.onap.aai.champ</groupId>
         <artifactId>champ-lib</artifactId>
-        <version>1.4.1-SNAPSHOT</version>
+        <version>1.5.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.onap.aai.champ.champ-lib</groupId>
@@ -128,9 +128,6 @@ limitations under the License.
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
             </plugin>
             <plugin>
                 <groupId>com.mycila</groupId>
index 41085ff..815928f 100644 (file)
@@ -25,7 +25,7 @@ limitations under the License.
     <parent>
         <groupId>org.onap.aai</groupId>
         <artifactId>champ</artifactId>
-        <version>1.4.1-SNAPSHOT</version>
+        <version>1.5.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.onap.aai.champ</groupId>
@@ -123,9 +123,6 @@ limitations under the License.
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
             </plugin>
             <plugin>
                 <groupId>com.mycila</groupId>
index cd104f4..6407f06 100644 (file)
@@ -25,7 +25,7 @@ limitations under the License.
     <parent>
         <groupId>org.onap.aai</groupId>
         <artifactId>champ</artifactId>
-        <version>1.4.1-SNAPSHOT</version>
+        <version>1.5.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.onap.aai.champ</groupId>
@@ -330,9 +330,6 @@ limitations under the License.
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
             </plugin>
         </plugins>
     </build>
index d43f95c..2b35a34 100644 (file)
@@ -25,7 +25,7 @@ limitations under the License.
     <parent>
         <groupId>org.onap.aai</groupId>
         <artifactId>champ</artifactId>
-        <version>1.4.1-SNAPSHOT</version>
+        <version>1.5.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.onap.aai.champ</groupId>
@@ -295,9 +295,6 @@ limitations under the License.
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
             </plugin>
         </plugins>
     </build>
index 5311692..93126bd 100644 (file)
@@ -26,7 +26,7 @@ limitations under the License.
     <parent>
         <groupId>org.onap.aai</groupId>
         <artifactId>champ</artifactId>
-        <version>1.4.1-SNAPSHOT</version>
+        <version>1.5.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.onap.aai.champ</groupId>
@@ -344,37 +344,50 @@ limitations under the License.
                     </execution>
                 </executions>
             </plugin>
-
-            <plugin>
-                <groupId>com.spotify</groupId>
-                <artifactId>docker-maven-plugin</artifactId>
-                <version>0.4.11</version>
-                <configuration>
-                    <verbose>true</verbose>
-                    <serverId>docker-hub</serverId>
-                    <imageName>${docker.push.registry}/onap/${docker.name}</imageName>
-                    <dockerDirectory>${docker.location}</dockerDirectory>
-                    <imageTags>
-                        <imageTag>latest</imageTag>
-                    </imageTags>
-                    <forceTags>true</forceTags>
-                </configuration>
-            </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-deploy-plugin</artifactId>
             </plugin>
-
-            <plugin>
-                <groupId>org.sonatype.plugins</groupId>
-                <artifactId>nexus-staging-maven-plugin</artifactId>
-            </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-site-plugin</artifactId>
             </plugin>
         </plugins>
     </build>
+
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.spotify</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                        <version>0.4.11</version>
+                        <configuration>
+                            <verbose>true</verbose>
+                            <serverId>docker-hub</serverId>
+                            <imageName>${docker.push.registry}/onap/${docker.name}</imageName>
+                            <dockerDirectory>${docker.location}</dockerDirectory>
+                            <imageTags>
+                                <imageTag>latest</imageTag>
+                            </imageTags>
+                            <forceTags>true</forceTags>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>default</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                </goals> 
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+
 </project>
index 9ee9349..aa09306 100644 (file)
@@ -5,6 +5,8 @@
  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
  * Copyright © 2017-2018 Amdocs
  * ================================================================================
+ * Modifications Copyright (C) 2019 IBM.
+ * ================================================================================
  * 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
@@ -30,10 +32,10 @@ import java.util.List;
 
 public class ChampBulkPayload {
 
-  public static String ADD_OP = "add";
-  public static String UPDATE_OP = "modify";
-  public static String DELETE_OP = "delete";
-  public static String PATCH_OP = "patch";
+  public static final String ADD_OP = "add";
+  public static final String UPDATE_OP = "modify";
+  public static final String DELETE_OP = "delete";
+  public static final String PATCH_OP = "patch";
 
   private List<ChampBulkOp> edgeDeleteOps = new ArrayList<ChampBulkOp>();
   private List<ChampBulkOp> vertexDeleteOps = new ArrayList<ChampBulkOp>();
index 9dc7233..e9a4e00 100644 (file)
@@ -5,6 +5,8 @@
  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
  * Copyright © 2017-2018 Amdocs
  * ===================================================================
+ * Modifications Copyright (C) 2019 IBM.
+ * ===================================================================
  * 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
@@ -60,8 +62,7 @@ public class ChampTransactionCache {
               graphImpl.rollbackTransaction((ChampTransaction) notification.getValue());
               logger.info(ChampMsgs.CHAMP_TX_CACHE, "Transaction rolledback successfully :" + notification.getKey());
             } catch (ChampTransactionException e) {
-              // TODO Auto-generated catch block
-              e.printStackTrace();
+              logger.error(ChampMsgs.CHAMP_DATA_SERVICE_ERROR, e, "Transaction rolledback failed :");
             }
             }
           }
index 74b761e..1aeb5cf 100644 (file)
@@ -5,6 +5,8 @@
  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
  * Copyright © 2017-2018 Amdocs
  * ===================================================================
+ * Modifications Copyright (C) 2019 IBM.
+ * ===================================================================
  * 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
@@ -25,8 +27,13 @@ import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.util.Properties;
+import org.onap.aai.cl.api.Logger;
+import org.onap.aai.cl.eelf.LoggerFactory;
+import org.onap.champ.service.logging.ChampMsgs;
 
 public class ChampProperties {
+       
+       private static Logger logger = LoggerFactory.getInstance().getLogger(ChampProperties.class.getName());
 
     private static Properties properties;
 
@@ -37,7 +44,7 @@ public class ChampProperties {
         ) {
             properties.load(fileInputStream);
         } catch (IOException e) {
-            e.printStackTrace();
+               logger.error(ChampMsgs.CHAMP_DATA_SERVICE_ERROR, "Error while loading properties ", e.getMessage());
             Runtime.getRuntime().halt(1);
         }
     }
@@ -57,7 +64,7 @@ public class ChampProperties {
         ) {
             properties.store(fileOut, "Added property: " + key);
         } catch (Exception e) {
-            e.printStackTrace();
+               logger.error(ChampMsgs.CHAMP_DATA_SERVICE_ERROR, "Error while setting properties ", e.getMessage());
         }
     }
 
diff --git a/pom.xml b/pom.xml
index ed2637e..012212e 100755 (executable)
--- a/pom.xml
+++ b/pom.xml
@@ -25,18 +25,18 @@ limitations under the License.
     <parent>
         <groupId>org.onap.oparent</groupId>
         <artifactId>oparent</artifactId>
-        <version>1.2.0</version>
+        <version>2.0.0</version>
     </parent>
 
     <groupId>org.onap.aai</groupId>
     <artifactId>champ</artifactId>
     <name>aai-champ</name>
     <packaging>pom</packaging>
-    <version>1.4.1-SNAPSHOT</version>
+    <version>1.5.0-SNAPSHOT</version>
 
     <properties>
         <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
-        <event.client.version>1.4.0</event.client.version>
+        <event.client.version>1.5.0</event.client.version>
         <!-- Minimum code coverage percentage. Please update this figure as coverage increases to prevent any drops in
          coverage caused by new changes. Note that this figure cannot be lower than the ONAP requirement of 0.55 -->
         <jacoco.line.coverage.limit>0.57</jacoco.line.coverage.limit>
@@ -55,9 +55,6 @@ limitations under the License.
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
             </plugin>
             <plugin>
                 <groupId>org.jacoco</groupId>
index 66827fd..b11eaff 100644 (file)
@@ -4,7 +4,7 @@
 # because they are used in Jenkins, whose plug-in doesn't support
 
 major_version=1
-minor_version=4
+minor_version=5
 patch_version=0
 
 base_version=${major_version}.${minor_version}.${patch_version}