Fix Sonar build problems 45/67345/2
authorelinuxhenrik <henrik.b.andersson@est.tech>
Tue, 18 Sep 2018 12:39:34 +0000 (14:39 +0200)
committerelinuxhenrik <henrik.b.andersson@est.tech>
Tue, 18 Sep 2018 20:06:30 +0000 (22:06 +0200)
Change-Id: I92896b289e3a3cd0387b4b864dceacdf5c8c0403
Issue-ID: DCAEGEN2-792
Signed-off-by: elinuxhenrik <henrik.b.andersson@est.tech>
datafile-app-server/pom.xml
datafile-app-server/src/main/resources/datafile_endpoints.json [new file with mode: 0644]

index 339daeb..860c1cc 100644 (file)
   <properties>
     <docker.image.name>onap/${project.groupId}.${project.artifactId}</docker.image.name>
     <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
-    <project.fatJar.finalName>datafile-happ-server</project.fatJar.finalName>
-    <nexusproxy>https://nexus.onap.org</nexusproxy>
-    <snapshots.path>content/repositories/snapshots/</snapshots.path>
-    <releases.path>content/repositories/releases/</releases.path>
   </properties>
 
   <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+      </resource>
+    </resources>
+
     <plugins>
       <plugin>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>repackage</goal>
-            </goals>
-          </execution>
-        </executions>
         <configuration>
-          <finalName>${project.fatJar.finalName}</finalName>
+          <finalName>${project.artifactId}</finalName>
           <mainClass>org.onap.dcaegen2.collectors.datafile.MainApp</mainClass>
         </configuration>
       </plugin>
             <tag>latest</tag>
           </imageTags>
           <baseImage>openjdk:8-jre-alpine</baseImage>
-          <entryPoint>["java", "-jar", "/opt/${project.fatJar.finalName}.jar"]</entryPoint>
           <resources>
             <resource>
-              <targetPath>/opt</targetPath>
               <directory>${project.build.directory}</directory>
-              <include>${project.fatJar.finalName}.jar</include>
+              <include>${project.artifactId}.jar</include>
+              <targetPath>/target</targetPath>
             </resource>
             <resource>
               <targetPath>/config</targetPath>
@@ -83,6 +77,7 @@
             <expose>8100</expose>
             <expose>8433</expose>
           </exposes>
+          <cmd>["java", "-jar", "/target/${project.artifactId}.jar"]</cmd>
         </configuration>
         <executions>
           <execution>
       </plugin>
     </plugins>
   </build>
+
   <dependencies>
     <dependency>
       <groupId>io.projectreactor</groupId>
diff --git a/datafile-app-server/src/main/resources/datafile_endpoints.json b/datafile-app-server/src/main/resources/datafile_endpoints.json
new file mode 100644 (file)
index 0000000..f6b65fb
--- /dev/null
@@ -0,0 +1,28 @@
+{
+    "configs": {
+        "dmaap": {
+            "dmaapConsumerConfiguration": {
+                "consumerGroup": "notification",
+                "consumerId": "1",
+                "dmaapContentType": "application/json",
+                "dmaapHostName": "localhost",
+                "dmaapPortNumber": 3904,
+                "dmaapProtocol": "http",
+                "dmaapTopicName": "/events/unauthenticated.VES_NOTIFICATION_OUTPUT",
+                "dmaapUserName": "admin",
+                "dmaapUserPassword": "admin",
+                "messageLimit": 1000,
+                "timeoutMS": 1000
+            },
+            "dmaapProducerConfiguration": {
+                "dmaapContentType": "application/octet-stream",
+                "dmaapHostName": "localhost",
+                "dmaapPortNumber": 3905,
+                "dmaapProtocol": "http",
+                "dmaapTopicName": "/events/unauthenticated.VES_NOTIFICATION_OUTPUT",
+                "dmaapUserName": "admin",
+                "dmaapUserPassword": "admin"
+            }
+        }
+    }
+}