Issued security fixes 71/66871/3
authorSingla, Rajiv (rs153v) <rs153v@att.com>
Mon, 17 Sep 2018 03:20:45 +0000 (23:20 -0400)
committerSingla, Rajiv (rs153v) <rs153v@att.com>
Mon, 17 Sep 2018 23:36:28 +0000 (19:36 -0400)
Issue-ID: DCAEGEN2-765
Change-Id: I19eaf86af61af5f177a06fea9bcf27bc57e41143
Signed-off-by: Singla, Rajiv (rs153v) <rs153v@att.com>
.gitignore
dcae-analytics/dcae-analytics-tca-web/Dockerfile
dcae-analytics/dcae-analytics-tca-web/docker/Dockerfile
dcae-analytics/dcae-analytics-tca-web/docker/logback.xml
dcae-analytics/dcae-analytics-tca-web/pom.xml
dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/abatement/mongo/MongoAbatementEntity.java
dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/abatement/simple/SimpleAbatementEntity.java
dcae-analytics/pom.xml
pom.xml

index ff94b20..6405abb 100644 (file)
@@ -49,3 +49,8 @@ dependency-reduced-pom.xml
 blackDuckHubProjectName.txt
 blackDuckHubProjectVersionName.txt
 /bin/
+
+
+#ECOMP LOGS
+**/debug-logs/
+**/logs/
\ No newline at end of file
index 83136ad..19afab7 100644 (file)
@@ -1,15 +1,20 @@
 # NOTE: This Dockerfile is auto generated and filtered via maven resources plugin.
 # Edits to generated Dockerfile will NOT be saved.
 # Only changes made in docker/Dockerfile template file will be persistent
+# ==========================================================================
+
 FROM openjdk:8-jre-alpine
+
 MAINTAINER Rajiv Singla <rs153v@att.com>
+
+VOLUME /tmp
+ADD docker/logback.xml logback.xml
+ADD target/dcae-analytics-tca-web-3.0.0-SNAPSHOT.jar dcae-analytics-tca-web.jar
+EXPOSE 9091
+
 ENTRYPOINT ["java", \
             "-Djava.security.egd=file:/dev/./urandom", \
             "-Dlogging.config=logback.xml", \
             "-Dlogging.file=logs/dcae-analytics-tca-web.log", \
             "-Dspring.profiles.active=dev", \
             "-jar", "dcae-analytics-tca-web.jar"]
-EXPOSE 9091
-VOLUME /tmp
-ADD docker/logback.xml logback.xml
-ADD target/dcae-analytics-tca-web-3.0.0-SNAPSHOT.jar dcae-analytics-tca-web.jar
index fcbc5ac..eccef3b 100644 (file)
@@ -1,15 +1,20 @@
 # NOTE: This Dockerfile is auto generated and filtered via maven resources plugin.
 # Edits to generated Dockerfile will NOT be saved.
 # Only changes made in docker/Dockerfile template file will be persistent
+# ==========================================================================
+
 FROM openjdk:8-jre-alpine
+
 MAINTAINER Rajiv Singla <rs153v@att.com>
+
+VOLUME /tmp
+ADD docker/logback.xml logback.xml
+ADD target/${project.build.finalName}.jar ${project.artifactId}.jar
+EXPOSE 9091
+
 ENTRYPOINT ["java", \
             "-Djava.security.egd=file:/dev/./urandom", \
             "-Dlogging.config=logback.xml", \
             "-Dlogging.file=logs/${project.artifactId}.log", \
             "-Dspring.profiles.active=dev", \
             "-jar", "${project.artifactId}.jar"]
-EXPOSE 9091
-VOLUME /tmp
-ADD docker/logback.xml logback.xml
-ADD target/${project.build.finalName}.jar ${project.artifactId}.jar
index cba7e63..57348d3 100644 (file)
@@ -23,7 +23,7 @@
     <property scope="context" name="componentName" value="dcae-analytics-tca"/>
     <contextName>${componentName}</contextName>
 
-    <include resource="ecomp-logback.xml"/>
+    <include resource="eelf-logback.xml"/>
     <include resource="org/springframework/boot/logging/logback/base.xml"/>
 
     <logger name="org.springframework" level="INFO"/>
index 689668e..4cc7e5b 100644 (file)
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
             </plugin>
+            <!-- DOCKER PLUGIN -->
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>dockerfile-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>docker-push</id>
+                        <goals>
+                            <goal>build</goal>
+                            <goal>push</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>
index 562c918..0cc1fcf 100644 (file)
@@ -20,7 +20,6 @@
 package org.onap.dcae.analytics.tca.web.abatement.mongo;
 
 import lombok.Data;
-import lombok.NoArgsConstructor;
 
 import java.util.Date;
 
@@ -35,7 +34,6 @@ import org.springframework.data.mongodb.core.mapping.Document;
  * @author Rajiv Singla
  */
 @Data
-@NoArgsConstructor
 @Document(collection = "tca_abatement")
 public class MongoAbatementEntity implements TcaAbatementEntity, TcaModel {
 
index c12306f..42e3759 100644 (file)
@@ -20,7 +20,6 @@
 package org.onap.dcae.analytics.tca.web.abatement.simple;
 
 import lombok.Data;
-import lombok.NoArgsConstructor;
 
 import java.util.Date;
 
@@ -31,7 +30,6 @@ import org.onap.dcae.analytics.tca.model.TcaModel;
  * @author Rajiv Singla
  */
 @Data
-@NoArgsConstructor
 public class SimpleAbatementEntity implements TcaAbatementEntity, TcaModel {
 
     private static final long serialVersionUID = 1L;
index 3a20709..63a7755 100644 (file)
@@ -56,7 +56,7 @@
 
         <!-- DEPENDENCIES VERSION -->
         <eelf.logger.version>3.0.0-SNAPSHOT</eelf.logger.version>
-        <spring.boot.version>2.0.1.RELEASE</spring.boot.version>
+        <spring.boot.version>2.0.5.RELEASE</spring.boot.version>
         <spring.cloud.version>Finchley.RC2</spring.cloud.version>
         <commons.text.version>1.4</commons.text.version>
         <springfox-swagger2.version>2.9.2</springfox-swagger2.version>
         <releases.path>content/repositories/releases/</releases.path>
         <docker.repository>nexus3.onap.org:10003</docker.repository>
 
+
+        <!-- SONAR EXCLUSIONS -->
+        <!-- EXCLUDE TEST COVERAGE ON
+          TEST PACKAGES - USED FOR TESTING - NOT FOR DEPLOYMENT
+          MODEL PACAKGES - MODELS ONLY CONTAINS POJOs AND NO BUSINESS LOGIC,
+          CONFIG PACKAGE -  CONATINS WIRINGS OF SPRING BEANS,
+          -->
+        <sonar.coverage.exclusions>**/test/**,**/model/**,**/config/**</sonar.coverage.exclusions>
+
     </properties>
 
   
                 </plugin>
 
 
-                <plugin>
-                    <groupId>org.jacoco</groupId>
-                    <artifactId>jacoco-maven-plugin</artifactId>
-                    <version>${jacoco.plugin.version}</version>
-                    <configuration>
-                        <excludes>
-                            <exclude>**/generated/**</exclude>
-                            <exclude>**/generated-sources/**</exclude>
-                        </excludes>
-                    </configuration>
-                    <executions>
-                        <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}/jacoco/jacoco-ut.exec</destFile>
-                                <propertyName>surefireArgLine</propertyName>
-                            </configuration>
-                        </execution>
-                        <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}/jacoco/jacoco-ut.exec</dataFile>
-                                <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}/jacoco/jacoco-it.exec</destFile>
-                                <propertyName>failsafeArgLine</propertyName>
-                            </configuration>
-                        </execution>
-                        <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}/jacoco/jacoco-it.exec</dataFile>
-                                <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
-                            </configuration>
-                        </execution>
-                    </executions>
-
-                </plugin>
-
                 <!-- FIND BUGS (STATIC CODE ANALYSIS) PLUGIN -->
                 <plugin>
                     <groupId>org.codehaus.mojo</groupId>
diff --git a/pom.xml b/pom.xml
index a33525c..d894d3f 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@
     <artifactId>tca-gen2-parent</artifactId>
     <version>3.0.0-SNAPSHOT</version>
 
-    <name>TCA Standalone Parent</name>
+    <name>dcaegen2-analytics-tca-gen2</name>
     <packaging>pom</packaging>
 
     <modules>