Improve SONAR coverage in aai/data-router
[aai/data-router.git] / pom.xml
1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3     <modelVersion>4.0.0</modelVersion>
4
5     <parent>
6         <artifactId>ajsc-archetype-parent</artifactId>
7         <groupId>com.att.ajsc</groupId>
8         <version>2.0.0</version>
9     </parent>
10     <groupId>org.onap.aai.data-router</groupId>
11     <artifactId>data-router</artifactId>
12     <version>1.1.0-SNAPSHOT</version>
13
14     <properties>
15         <docker.location>${basedir}/target</docker.location>
16         <module.ajsc.namespace.name>data-router</module.ajsc.namespace.name>
17         <module.ajsc.namespace.version>v1</module.ajsc.namespace.version>
18         <ajscRuntimeVersion>2.0.0</ajscRuntimeVersion>
19         <absoluteDistFilesRoot>/appl/${project.artifactId}</absoluteDistFilesRoot>
20
21         <!-- For NO Versioning, REMOVE the /${project.version} from the <distFilesRoot>
22             property, below. PLEASE, NOTE: If your ${project.version} is a "-SNAPSHOT"
23             version, THIS will be used as your directory structure. If you do NOT want
24             this, simply remove the "-SNAPSHOT" from your <version> declaration at the
25             top of pom.xml -->
26         <distFilesRoot>/appl/${project.artifactId}/${project.version}</distFilesRoot>
27         <runAjscHome>${basedir}/target/swm/package/nix/dist_files${distFilesRoot}</runAjscHome>
28
29         <!-- For SOA Cloud Installation -->
30         <installOwnerUser>aaiadmin</installOwnerUser>
31         <installOwnerGroup>aaiadmin</installOwnerGroup>
32         <ownerManagementGroup>com.att.csid.lab</ownerManagementGroup>
33
34         <!-- Port Selection. A value of 0 will allow for dynamic port selection.
35             For local testing, you may choose to hardcode this value to something like
36             8080 -->
37         <serverPort>0</serverPort>
38         <sslport>9502</sslport>
39
40         <testRouteOffer>workstation</testRouteOffer>
41         <testEnv>DEV</testEnv>
42         <checkstyle.config.location>google_checks.xml</checkstyle.config.location>
43         <nexusproxy>https://nexus.onap.org</nexusproxy>
44                       <!-- Sonar Properties -->
45               <sonar.language>java</sonar.language>
46               <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
47               <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
48               <sonar.jacoco.reportPath>${project.build.directory}/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
49               <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
50               <sonar.projectVersion>${project.version}</sonar.projectVersion>
51     </properties>
52
53     <dependencies>
54 <dependency>
55                         <groupId>org.powermock</groupId>
56                         <artifactId>powermock-module-junit4</artifactId>
57                         <version>1.6.2</version>
58                         <scope>test</scope>
59                 </dependency>
60                 
61                 <dependency>
62                         <groupId>org.powermock</groupId>
63                         <artifactId>powermock-api-mockito</artifactId>
64                         <version>1.6.2</version>
65                         <scope>test</scope>
66                 </dependency>
67                 
68                 <dependency>
69                         <groupId>org.powermock</groupId>
70                         <artifactId>powermock-module-javaagent</artifactId>
71                         <version>1.6.2</version>
72                         <scope>test</scope>
73                 </dependency>
74                 
75                 <dependency>
76                         <groupId>org.powermock</groupId>
77                         <artifactId>powermock-module-junit4-rule-agent</artifactId>
78                         <version>1.6.2</version>
79                         <scope>test</scope>
80                 </dependency>   
81         <dependency>
82             <groupId>dom4j</groupId>
83             <artifactId>dom4j</artifactId>
84             <version>1.6.1</version>
85             <scope>provided</scope>
86         </dependency>
87
88         <dependency>
89             <groupId>com.att.aft</groupId>
90             <artifactId>dme2</artifactId>
91             <version>3.1.200</version>
92             <scope>provided</scope>
93         </dependency>
94         <dependency>
95             <groupId>org.onap.aai.aai-common</groupId>
96             <artifactId>aai-schema</artifactId>
97             <version>1.1.0-SNAPSHOT</version>
98         </dependency>
99         <dependency>
100             <groupId>org.onap.aai.router-core</groupId>
101             <artifactId>router-core</artifactId>
102             <version>1.1.0-SNAPSHOT</version>
103         </dependency>
104
105         <dependency>
106             <groupId>org.json</groupId>
107             <artifactId>json</artifactId>
108         </dependency>
109
110         <dependency>
111             <groupId>com.google.code.gson</groupId>
112             <artifactId>gson</artifactId>
113             <version>2.6.2</version>
114         </dependency>
115
116         <dependency>
117             <groupId>org.eclipse.persistence</groupId>
118             <artifactId>eclipselink</artifactId>
119             <version>2.6.2</version>
120         </dependency>
121
122         <dependency>
123             <groupId>org.openecomp.aai.logging-service</groupId>
124             <artifactId>common-logging</artifactId>
125             <version>1.0.0</version>
126         </dependency>
127
128         <dependency>
129             <groupId>org.openecomp.aai</groupId>
130             <artifactId>rest-client</artifactId>
131             <version>1.1.0</version>
132         </dependency>
133
134         <dependency>
135             <groupId>ch.qos.logback</groupId>
136             <artifactId>logback-core</artifactId>
137             <version>1.1.7</version>
138         </dependency>
139
140     </dependencies>
141
142     <build>
143         <plugins>
144             <!-- Checkstyle plugin - used to report on compliance with -->
145             <!-- the Google style guide. -->
146             <plugin>
147                 <groupId>org.apache.maven.plugins</groupId>
148                 <artifactId>maven-site-plugin</artifactId>
149                 <version>3.3</version>
150                 <configuration>
151                     <reportPlugins>
152                         <plugin>
153                             <groupId>org.apache.maven.plugins</groupId>
154                             <artifactId>maven-checkstyle-plugin</artifactId>
155                             <version>2.17</version>
156                             <reportSets>
157                                 <reportSet>
158                                     <reports>
159                                         <report>checkstyle</report>
160                                     </reports>
161                                 </reportSet>
162                             </reportSets>
163                         </plugin>
164                     </reportPlugins>
165                 </configuration>
166             </plugin>
167             <plugin>
168                 <groupId>org.apache.maven.plugins</groupId>
169                 <artifactId>maven-resources-plugin</artifactId>
170                 <version>2.7</version>
171                 <executions>
172                     <execution>
173                         <id>copy-docker-file</id>
174                         <phase>package</phase>
175                         <goals>
176                             <goal>copy-resources</goal>
177                         </goals>
178                         <configuration>
179                             <outputDirectory>target</outputDirectory>
180                             <overwrite>true</overwrite>
181                             <resources>
182                                 <resource>
183                                     <directory>${basedir}/src/main/docker</directory>
184                                     <filtering>true</filtering>
185                                     <includes>
186                                         <include>**/*</include>
187                                     </includes>
188                                 </resource>
189                                 <resource>
190                                     <directory>${basedir}/src/main/bin/</directory>
191                                 </resource>
192                             </resources>
193                         </configuration>
194                     </execution>
195                 </executions>
196             </plugin>
197             <plugin>
198                 <groupId>com.spotify</groupId>
199                 <artifactId>docker-maven-plugin</artifactId>
200                 <version>0.4.11</version>
201                 <configuration>
202                     <verbose>true</verbose>
203                     <serverId>docker-hub</serverId>
204                     <imageName>${docker.push.registry}/openecomp/${project.artifactId}</imageName>                              
205                     <dockerDirectory>${docker.location}</dockerDirectory>
206                     <imageTags>
207                         <imageTag>latest</imageTag>
208                     </imageTags>
209                     <forceTags>true</forceTags>
210                 </configuration>
211             </plugin>
212             <!-- license plugin -->
213             <plugin>
214                 <groupId>com.mycila</groupId>
215                 <artifactId>license-maven-plugin</artifactId>
216                 <version>3.0</version>
217                 <configuration>
218                     <header>License.txt</header>
219                     <includes>
220                         <include>src/main/java/**</include>
221                     </includes>
222                 </configuration>
223                 <executions>
224                     <execution>
225                         <goals>
226                             <goal>format</goal>
227                         </goals>
228                         <phase>process-sources</phase>
229                     </execution>
230                 </executions>
231             </plugin>
232             <plugin>
233                 <groupId>org.sonatype.plugins</groupId>
234                 <artifactId>nexus-staging-maven-plugin</artifactId>
235                 <version>1.6.7</version>
236                 <extensions>true</extensions>
237                 <configuration>
238                     <nexusUrl>${nexusproxy}</nexusUrl>
239                     <stagingProfileId>176c31dfe190a</stagingProfileId>
240                     <serverId>ecomp-staging</serverId>
241                 </configuration>
242             </plugin>
243             <plugin>
244                 <groupId>org.apache.maven.plugins</groupId>
245                 <artifactId>maven-deploy-plugin</artifactId>
246                 <configuration>
247                     <skip>true</skip>
248                 </configuration>
249             </plugin>
250             <plugin>
251                 <groupId>org.codehaus.mojo</groupId>
252                 <artifactId>sonar-maven-plugin</artifactId>
253                 <version>3.2</version>
254             </plugin>
255             <plugin>
256                 <groupId>org.jacoco</groupId>
257                 <artifactId>jacoco-maven-plugin</artifactId>
258                 <version>0.7.7.201606060606</version>
259                 <configuration>
260                     <dumpOnExit>true</dumpOnExit>
261                 </configuration>
262                 <executions>
263                     <execution>
264                         <id>jacoco-initialize-unit-tests</id>
265                         <goals>
266                             <goal>prepare-agent</goal>
267                         </goals>
268                         <configuration>
269                             <destFile>${project.build.directory}/coverage-reports/jacoco.exec
270                             </destFile>
271                         </configuration>
272                     </execution>
273                 </executions>
274             </plugin>
275             
276         </plugins>
277     </build>
278
279     <profiles>
280         <profile>
281             <id>runAjsc</id>
282             <build>
283                 <defaultGoal>initialize</defaultGoal>
284                 <plugins>
285                     <plugin>
286                         <groupId>org.codehaus.mojo</groupId>
287                         <artifactId>exec-maven-plugin</artifactId>
288                         <version>1.3.2</version>
289                         <executions>
290                             <execution>
291                                 <phase>initialize</phase>
292                                 <goals>
293                                     <goal>java</goal>
294                                 </goals>
295                                 <configuration>
296                                     <includeProjectDependencies>false</includeProjectDependencies>
297                                     <includePluginDependencies>true</includePluginDependencies>
298                                     <executable>java</executable>
299                                     <mainClass>com.att.ajsc.runner.Runner</mainClass>
300                                     <executableDependency>
301                                         <groupId>com.att.ajsc</groupId>
302                                         <artifactId>ajsc-runner</artifactId>
303                                     </executableDependency>
304                                     <additionalClasspathElements>
305                                         <additionalClasspathElement>${basedir}/ajsc-shared-config/etc</additionalClasspathElement>
306                                     </additionalClasspathElements>
307
308                                     <environmentVariables>
309                                         <AJSC_HOME>${runAjscHome}</AJSC_HOME>
310                                     </environmentVariables>
311
312                                     <!-- Main AJSC System Properties below (necessary for proper startup) -->
313                                     <systemProperties>
314                                         <systemProperty>
315                                             <key>AJSC_HOME</key>
316                                             <value>${runAjscHome}</value>
317                                         </systemProperty>
318
319                                         <systemProperty>
320                                             <key>CONFIG_HOME</key>
321                                             <value>${basedir}/appconfig-local/</value>
322                                         </systemProperty>
323
324                                         <systemProperty>
325                                             <key>AJSC_CONF_HOME</key>
326                                             <value>${basedir}/bundleconfig-local</value>
327                                         </systemProperty>
328                                         <systemProperty>
329                                             <key>logback.configurationFile</key>
330                                             <value>${basedir}/ajsc-shared-config/etc/logback.xml</value>
331                                         </systemProperty>
332                                         <systemProperty>
333                                             <key>AJSC_SHARED_CONFIG</key>
334                                             <value>${basedir}/ajsc-shared-config</value>
335                                         </systemProperty>
336
337                                         <sysproperty>
338                                             <key>AJSC_EXTERNAL_LIB_FOLDERS</key>
339                                             <value>${basedir}/target/commonLibs</value>
340                                         </sysproperty>
341                                         <sysproperty>
342                                             <key>AJSC_EXTERNAL_PROPERTIES_FOLDERS</key>
343                                             <value>${basedir}/ajsc-shared-config/etc</value>
344                                         </sysproperty>
345
346                                         <systemProperty>
347                                             <key>AJSC_SERVICE_NAMESPACE</key>
348                                             <value>${module.ajsc.namespace.name}</value>
349                                         </systemProperty>
350                                         <systemProperty>
351                                             <key>AJSC_SERVICE_VERSION</key>
352                                             <value>${module.ajsc.namespace.version}</value>
353                                         </systemProperty>
354                                         <systemProperty>
355                                             <key>SOACLOUD_SERVICE_VERSION</key>
356                                             <value>${project.version}</value>
357                                         </systemProperty>
358                                         <systemProperty>
359                                             <key>server.port</key>
360                                             <value>${serverPort}</value>
361                                         </systemProperty>
362                                     </systemProperties>
363
364                                     <!-- Command Line Arguments to add to the java command. Here, you
365                                         can specify the port as well as the Context you want your service to run
366                                         in. Use context=/ to run in an unnamed Context (Root Context). The default
367                                         configuration of the AJSC is to run under the / Context. Setting the port
368                                         here can aid during the development phase of your service. However, you can
369                                         leave this argument out entirely, and the AJSC will default to using an Ephemeral
370                                         port. -->
371                                     <arguments>
372                                         <argument>context=/</argument>
373                                         <argument>port=${serverPort}</argument>
374                                         <argument>sslport=${sslport}</argument>
375                                     </arguments>
376                                 </configuration>
377                             </execution>
378                         </executions>
379                         <configuration>
380                             <executable>java</executable>
381                         </configuration>
382                         <dependencies>
383                             <dependency>
384                                 <groupId>com.att.ajsc</groupId>
385                                 <artifactId>ajsc-runner</artifactId>
386                                 <version>${ajscRuntimeVersion}</version>
387                             </dependency>
388                         </dependencies>
389                     </plugin>
390                    
391                 </plugins>
392             </build>
393         </profile>
394     </profiles>
395     <dependencyManagement>
396         <dependencies>
397             <dependency>
398                 <groupId>org.apache.httpcomponents</groupId>
399                 <artifactId>httpclient</artifactId>
400                 <version>4.5</version>
401             </dependency>
402             <dependency>
403                 <groupId>org.apache.httpcomponents</groupId>
404                 <artifactId>httpcore</artifactId>
405                 <version>4.4.1</version>
406             </dependency>
407             <dependency>
408                 <groupId>org.json</groupId>
409                 <artifactId>json</artifactId>
410                 <version>20131018</version>
411             </dependency>
412         </dependencies>
413     </dependencyManagement>
414     <distributionManagement>
415         <repository>
416             <id>ecomp-releases</id>
417             <name>ECOMP Release Repository</name>
418             <url>${nexusproxy}/content/repositories/releases/</url>
419         </repository>
420         <snapshotRepository>
421             <id>ecomp-snapshots</id>
422             <name>ECOMP Snapshot Repository</name>
423             <url>${nexusproxy}/content/repositories/snapshots/</url>
424         </snapshotRepository>
425     </distributionManagement>
426 </project>