CodeCoverage improvement for dcaegen2-platform-mod-genprocessor
[dcaegen2/platform.git] / mod / genprocessor / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 ============LICENSE_START=======================================================
4 Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
5 Copyright (C) 2022 Huawei. All rights reserved.
6 ================================================================================
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11      http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ============LICENSE_END=========================================================
19 -->
20 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22   <modelVersion>4.0.0</modelVersion>
23   <parent>
24     <groupId>org.onap.oparent</groupId>
25     <artifactId>oparent</artifactId>
26     <version>2.0.0</version>
27   </parent>
28   <groupId>org.onap.dcaegen2.platform.mod</groupId>
29   <artifactId>genprocessor</artifactId>
30   <version>1.0.3-SNAPSHOT</version>
31   <name>dcaegen2-platform-mod-genprocessor</name>
32   <properties>
33     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
34     <maven.deploy.skip>true</maven.deploy.skip>
35     <java.version>1.8</java.version>
36     <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
37     <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
38     <docker.push.registry>${env.NEXUS3_PUSH_REGISTRY}</docker.push.registry>
39     <start-class>org.onap.dcae.genprocessor.App</start-class>
40     <!--NOTE: Nifi jars used here are version 1.9.2 but dcae mod is on 1.9.3 because 1.9.3 is not in Maven Central -->
41     <nifi.version>1.9.2</nifi.version>
42     <docker.fabric.version>0.32.0</docker.fabric.version>
43     <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
44     </sonar.coverage.jacoco.xmlReportPaths>
45   </properties>
46   <dependencies>
47     <dependency>
48       <groupId>org.apache.nifi</groupId>
49       <artifactId>nifi-api</artifactId>
50       <version>${nifi.version}</version>
51     </dependency>
52     <dependency>
53       <groupId>org.apache.nifi</groupId>
54       <artifactId>nifi-record-serialization-service-api</artifactId>
55       <version>${nifi.version}</version>
56     </dependency>
57     <dependency>
58       <groupId>org.apache.nifi</groupId>
59       <artifactId>nifi-record</artifactId>
60       <version>${nifi.version}</version>
61     </dependency>
62     <dependency>
63       <groupId>org.apache.nifi</groupId>
64       <artifactId>nifi-processor-utils</artifactId>
65       <version>${nifi.version}</version>
66     </dependency>
67     <dependency>
68       <groupId>org.apache.nifi</groupId>
69       <artifactId>nifi-utils</artifactId>
70       <version>${nifi.version}</version>
71     </dependency>
72     <dependency>
73       <groupId>org.javassist</groupId>
74       <artifactId>javassist</artifactId>
75       <version>3.25.0-GA</version>
76     </dependency>
77     <dependency>
78       <groupId>ch.qos.logback</groupId>
79       <artifactId>logback-classic</artifactId>
80       <version>1.2.3</version>
81     </dependency>
82     <dependency>
83       <groupId>com.fasterxml.jackson.core</groupId>
84       <artifactId>jackson-core</artifactId>
85       <version>2.11.0</version>
86     </dependency>
87     <dependency>
88       <groupId>com.fasterxml.jackson.core</groupId>
89       <artifactId>jackson-databind</artifactId>
90       <version>2.11.0</version>
91     </dependency>
92     <dependency>
93       <groupId>org.apache.commons</groupId>
94       <artifactId>commons-text</artifactId>
95       <version>1.7</version>
96     </dependency>
97     <dependency>
98       <groupId>junit</groupId>
99       <artifactId>junit</artifactId>
100       <version>4.11</version>
101       <scope>test</scope>
102     </dependency>
103     <dependency>
104       <groupId>com.github.stefanbirkner</groupId>
105       <artifactId>system-rules</artifactId>
106       <version>1.19.0</version>
107       <scope>test</scope>
108     </dependency>
109   </dependencies>
110   <build>
111     <plugins>
112       <plugin>
113         <groupId>io.fabric8</groupId>
114         <artifactId>docker-maven-plugin</artifactId>
115         <version>${docker.fabric.version}</version>
116         <configuration>
117           <verbose>true</verbose>
118           <pullRegistry>${docker.pull.registry}</pullRegistry>
119           <pushRegistry>${docker.push.registry}</pushRegistry>
120           <images>
121             <image>
122               <name>onap/${project.groupId}.${project.artifactId}-http</name>
123               <registry>${onap.nexus.dockerregistry.daily}</registry>
124               <build>
125                 <from>nginx:latest</from>
126                 <tags>
127                   <tag>latest</tag>
128                   <tag>${project.version}</tag>
129                   <tag>${project.version}-${maven.build.timestamp}Z</tag>
130                 </tags>
131                 <assembly>
132                   <targetDir>/</targetDir>
133                   <inline>
134                     <files>
135                       <file>
136                         <source>./nginx.conf</source>
137                         <outputDirectory>/etc/nginx/conf.d</outputDirectory>
138                         <destName>default.conf</destName>
139                       </file>
140                     </files>
141                   </inline>
142                 </assembly>
143                 <runCmds>
144                     <runCmd>sed -i /etc/nginx/nginx.conf -e '/^user /d' &amp;&amp; touch /var/run/nginx.pid &amp;&amp; mkdir -p /www/data &amp;&amp; chown -R nginx:nginx /www /etc/nginx /var/cache/nginx /var/log/nginx /var/run/nginx.pid</runCmd>
145                 </runCmds>
146         <user>nginx</user>
147                 <entryPoint>
148                   <exec>
149                     <arg>nginx</arg>
150                     <arg>-g</arg>
151                     <arg>daemon off;</arg>
152                   </exec>
153                 </entryPoint>
154               </build>
155             </image>
156             <image>
157               <name>onap/${project.groupId}.${project.artifactId}-job</name>
158               <registry>${onap.nexus.dockerregistry.daily}</registry>
159               <build>
160                 <from>openjdk:8</from>
161                 <tags>
162                   <tag>latest</tag>
163                   <tag>${project.version}</tag>
164                   <tag>${project.version}-${maven.build.timestamp}Z</tag>
165                 </tags>
166                 <assembly>
167                   <descriptorRef>artifact-with-dependencies</descriptorRef>
168                 </assembly>
169                 <runCmds>
170                     <runCmd>groupadd -g 1000 dcaemod &amp;&amp; useradd --shell /bin/bash -u 1000 -g 1000 -m dcaemod</runCmd>
171                 </runCmds>
172                 <workdir>/maven</workdir>
173                 <env>
174                   <GENPROC_WORKING_DIR>/work</GENPROC_WORKING_DIR>
175                   <GENPROC_ONBOARDING_API_HOST>http://onboarding-api:8080/onboarding</GENPROC_ONBOARDING_API_HOST>
176                   <GENPROC_SLEEP_SEC>10</GENPROC_SLEEP_SEC>
177                 </env>
178                 <user>dcaemod</user>
179                 <entryPoint>
180                   <exec>
181                     <arg>java</arg>
182                     <arg>-cp</arg>
183                     <arg>/maven/*</arg>
184                     <arg>${start-class}</arg>
185                   </exec>
186                 </entryPoint>
187               </build>
188             </image>
189           </images>
190         </configuration>
191         <executions>
192           <execution>
193             <goals>
194               <goal>build</goal>
195               <goal>push</goal>
196             </goals>
197           </execution>
198         </executions>
199       </plugin>
200     </plugins>
201   </build>
202 </project>