Configure sonarqube
[aai/sparky-be.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.openecomp.aai.sparky-be</groupId>
11         <artifactId>sparky-be</artifactId>
12         <version>1.0-SNAPSHOT</version>
13
14         <properties>
15                 <docker.location>${basedir}/target</docker.location>
16                 <module.ajsc.namespace.name>inventory-ui-service</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>9517</serverPort>
38                 <sslport>8000</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         
45         <!-- Sonar Configuration -->
46         <sonar.language>java</sonar.language>
47        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
48        <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
49        <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
50        <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
51        <sonar.projectVersion>${project.version}</sonar.projectVersion>
52         </properties>
53
54         <dependencies>
55
56                 <dependency>
57                         <groupId>org.mockito</groupId>
58                         <artifactId>mockito-all</artifactId>
59                         <version>1.10.19</version>
60                         <scope>test</scope>
61                 </dependency>
62                 <dependency>
63                         <groupId>org.powermock</groupId>
64                         <artifactId>powermock-module-junit4</artifactId>
65                         <version>1.6.2</version>
66                         <scope>test</scope>
67                 </dependency>
68                 <dependency>
69                         <groupId>org.powermock</groupId>
70                         <artifactId>powermock-api-mockito</artifactId>
71                         <version>1.6.2</version>
72                         <scope>test</scope>
73                 </dependency>
74                 <dependency>
75                         <groupId>org.powermock</groupId>
76                         <artifactId>powermock-module-javaagent</artifactId>
77                         <version>1.6.2</version>
78                         <scope>test</scope>
79                 </dependency>
80                 <dependency>
81                         <groupId>org.powermock</groupId>
82                         <artifactId>powermock-module-junit4-rule-agent</artifactId>
83                         <version>1.6.2</version>
84                         <scope>test</scope>
85                 </dependency>
86
87
88                 <dependency>
89                         <groupId>dom4j</groupId>
90                         <artifactId>dom4j</artifactId>
91                         <version>1.6.1</version>
92                         <scope>provided</scope>
93                 </dependency>
94                 <dependency>
95                         <groupId>com.att.aft</groupId>
96                         <artifactId>dme2</artifactId>
97                         <version>3.1.200</version>
98                         <scope>provided</scope>
99                 </dependency>
100
101                 <dependency>
102                         <groupId>org.slf4j</groupId>
103                         <artifactId>slf4j-api</artifactId>
104                         <version>1.7.20</version>
105                 </dependency>
106
107                 <dependency>
108                         <groupId>org.openecomp.aai</groupId>
109                         <artifactId>rest-client</artifactId>
110             <version>1.1.0-SNAPSHOT</version>
111                 </dependency>
112
113
114                 <dependency>
115                         <groupId>org.hamcrest</groupId>
116                         <artifactId>hamcrest-library</artifactId>
117                         <version>1.3</version>
118                         <scope>test</scope>
119                 </dependency>
120
121                 <!-- <dependency> <groupId>com.att.csp</groupId> <artifactId>gatekeeper</artifactId> 
122                         <version>1.0</version> <scope>system</scope> <systemPath>${project.basedir}/local-repository/gatekeeper-1.0.jar</systemPath> 
123                         </dependency> <dependency> <groupId>com.att.csp</groupId> <artifactId>PSE_Lite</artifactId> 
124                         <version>1.0</version> <scope>system</scope> <systemPath>${project.basedir}/local-repository/PSE_Lite-1.0.jar</systemPath> 
125                         </dependency> -->
126
127                 <dependency>
128                         <groupId>org.eclipse.persistence</groupId>
129                         <artifactId>eclipselink</artifactId>
130                         <version>2.6.2</version>
131                 </dependency>
132
133                 <dependency>
134                         <groupId>com.fasterxml.jackson.core</groupId>
135                         <artifactId>jackson-core</artifactId>
136                         <version>2.7.4</version>
137                 </dependency>
138
139                 <dependency>
140                         <groupId>org.json</groupId>
141                         <artifactId>json</artifactId>
142                         <version>20131018</version>
143                 </dependency>
144
145                 <dependency>
146                         <groupId>com.fasterxml.jackson.core</groupId>
147                         <artifactId>jackson-databind</artifactId>
148                         <version>2.7.4</version>
149                 </dependency>
150
151                 <!-- Common logging framework -->
152                 <dependency>
153                   <groupId>org.openecomp.aai.logging-service</groupId>
154                   <artifactId>common-logging</artifactId>
155                   <version>1.0.0</version>
156                 </dependency>
157                 
158                 <dependency>
159                         <groupId>com.google.code.gson</groupId>
160                         <artifactId>gson</artifactId>
161                         <version>2.6.2</version>
162                 </dependency>
163
164                 <dependency>
165                         <groupId>ch.qos.logback</groupId>
166                         <artifactId>logback-classic</artifactId>
167                         <version>1.1.7</version>
168                 </dependency>
169
170                 <dependency>
171                         <groupId>ch.qos.logback</groupId>
172                         <artifactId>logback-core</artifactId>
173                         <version>1.1.7</version>
174                 </dependency>
175
176                 <dependency>
177                         <groupId>commons-io</groupId>
178                         <artifactId>commons-io</artifactId>
179                         <version>2.4</version>
180                 </dependency>
181                 
182                 <dependency>
183                     <groupId>log4j</groupId>
184                     <artifactId>log4j</artifactId>
185                     <version>1.2.17</version>
186                 </dependency>
187                 
188                 <dependency>
189                         <groupId>org.openecomp.ecompsdkos</groupId>
190                         <artifactId>epsdk-fw</artifactId>
191                         <version>1.1.0</version>
192                         <exclusions>
193                                 <exclusion>
194                                         <groupId>commons-logging</groupId>
195                                         <artifactId>commons-logging</artifactId>
196                                 </exclusion>
197                                 <exclusion>
198                                         <groupId>log4j</groupId>
199                                         <artifactId>log4j</artifactId>
200                                 </exclusion>
201                                 <exclusion>
202                                         <groupId>log4j</groupId>
203                                         <artifactId>apache-log4j-extras</artifactId>
204                                 </exclusion>
205                                 <exclusion>
206                                         <groupId>org.slf4j</groupId>
207                                         <artifactId>slf4j-log4j12</artifactId>
208                                 </exclusion>
209                         </exclusions>
210                 </dependency>
211
212         </dependencies>
213
214         <profiles>
215                 <profile>
216                         <id>runAjsc</id>
217                         <build>
218                                 <defaultGoal>initialize</defaultGoal>
219                                 <plugins>
220
221                                         <plugin>
222                                                 <groupId>org.codehaus.mojo</groupId>
223                                                 <artifactId>exec-maven-plugin</artifactId>
224                                                 <version>1.3.2</version>
225                                                 <executions>
226                                                         <execution>
227                                                                 <phase>initialize</phase>
228                                                                 <goals>
229                                                                         <goal>java</goal>
230                                                                 </goals>
231                                                                 <configuration>
232                                                                         <includeProjectDependencies>false</includeProjectDependencies>
233                                                                         <includePluginDependencies>true</includePluginDependencies>
234                                                                         <executable>java</executable>
235                                                                         <mainClass>com.att.ajsc.runner.Runner</mainClass>
236                                                                         <executableDependency>
237                                                                                 <groupId>com.att.ajsc</groupId>
238                                                                                 <artifactId>ajsc-runner</artifactId>
239                                                                         </executableDependency>
240                                                                         <additionalClasspathElements>
241                                                                                 <additionalClasspathElement>${basedir}/ajsc-shared-config/etc</additionalClasspathElement>
242                                                                         </additionalClasspathElements>
243
244                                                                         <environmentVariables>
245                                                                                 <AJSC_HOME>${runAjscHome}</AJSC_HOME>
246                                                                         </environmentVariables>
247
248                                                                         <!-- Main AJSC System Properties below (necessary for proper startup) -->
249                                                                         <systemProperties>
250                                                                                 <systemProperty>
251                                                                                         <key>AJSC_HOME</key>
252                                                                                         <value>${runAjscHome}</value>
253                                                                                 </systemProperty>
254                                                                                 <systemProperty>
255                                                                                         <key>CONFIG_HOME</key>
256                                                                                         <value>${basedir}/appconfig-local/</value>
257                                                                                 </systemProperty>
258                                                                                 <systemProperty>
259                                                                                         <key>AJSC_CONF_HOME</key>
260                                                                                         <value>${basedir}/bundleconfig-local</value>
261                                                                                 </systemProperty>
262                                                                                 <systemProperty>
263                                                                                         <key>logback.configurationFile</key>
264                                                                                         <value>${basedir}/ajsc-shared-config/etc/logback.xml</value>
265                                                                                 </systemProperty>
266                                                                                 <systemProperty>
267                                                                                         <key>AJSC_SHARED_CONFIG</key>
268                                                                                         <value>${basedir}/ajsc-shared-config</value>
269                                                                                 </systemProperty>
270
271                                                                                 <sysproperty>
272                                                                                         <key>AJSC_EXTERNAL_LIB_FOLDERS</key>
273                                                                                         <value>${basedir}/target/commonLibs</value>
274                                                                                 </sysproperty>
275                                                                                 <sysproperty>
276                                                                                         <key>AJSC_EXTERNAL_PROPERTIES_FOLDERS</key>
277                                                                                         <value>${basedir}/ajsc-shared-config/etc</value>
278                                                                                 </sysproperty>
279
280                                                                                 <systemProperty>
281                                                                                         <key>AJSC_SERVICE_NAMESPACE</key>
282                                                                                         <value>${module.ajsc.namespace.name}</value>
283                                                                                 </systemProperty>
284                                                                                 <systemProperty>
285                                                                                         <key>AJSC_SERVICE_VERSION</key>
286                                                                                         <value>${module.ajsc.namespace.version}</value>
287                                                                                 </systemProperty>
288                                                                                 <systemProperty>
289                                                                                         <key>SOACLOUD_SERVICE_VERSION</key>
290                                                                                         <value>${project.version}</value>
291                                                                                 </systemProperty>
292                                                                                 <systemProperty>
293                                                                                         <key>server.port</key>
294                                                                                         <value>${serverPort}</value>
295                                                                                 </systemProperty>
296                                                                         </systemProperties>
297
298                                                                         <!-- Command Line Arguments to add to the java command. Here, you 
299                                                                                 can specify the port as well as the Context you want your service to run 
300                                                                                 in. Use context=/ to run in an unnamed Context (Root Context). The default 
301                                                                                 configuration of the AJSC is to run under the / Context. Setting the port 
302                                                                                 here can aid during the development phase of your service. However, you can 
303                                                                                 leave this argument out entirely, and the AJSC will default to using an Ephemeral 
304                                                                                 port. -->
305                                                                         <arguments>
306                                                                                 <argument>context=/</argument>
307                                                                                 <argument>port=${serverPort}</argument>
308                                                                                 <argument>sslport=${sslport}</argument>
309                                                                         </arguments>
310                                                                 </configuration>
311                                                         </execution>
312                                                 </executions>
313                                                 <configuration>
314                                                         <executable>java</executable>
315                                                 </configuration>
316                                                 <dependencies>
317                                                         <dependency>
318                                                                 <groupId>com.att.ajsc</groupId>
319                                                                 <artifactId>ajsc-runner</artifactId>
320                                                                 <version>${ajscRuntimeVersion}</version>
321                                                         </dependency>
322                                                 </dependencies>
323                                         </plugin>
324                                 </plugins>
325                         </build>
326                 </profile>
327         </profiles>
328         <build>
329                 <pluginManagement>
330                         <plugins>
331
332                                 <!-- purposely disable cobertura from parent pom as it is very broken 
333                                         Java1.8 code. It can't handle lamdas and comes apart with a bunch of errors -->
334
335                                 <plugin>
336                                         <groupId>org.codehaus.mojo</groupId>
337                                         <artifactId>cobertura-maven-plugin</artifactId>
338                                         <version>2.7</version>
339                                         <configuration>
340                                                 <quiet>true</quiet>
341                                         </configuration>
342                                 </plugin>
343
344
345                                 <!--This plugin's configuration is used to store Eclipse m2e settings 
346                                         only. It has no influence on the Maven build itself. -->
347                                 <plugin>
348                                         <groupId>org.eclipse.m2e</groupId>
349                                         <artifactId>lifecycle-mapping</artifactId>
350                                         <version>1.0.0</version>
351                                         <configuration>
352                                                 <lifecycleMappingMetadata>
353                                                         <pluginExecutions>
354                                                                 <pluginExecution>
355                                                                         <pluginExecutionFilter>
356                                                                                 <groupId>
357                                                                                         org.codehaus.mojo
358                                                                                 </groupId>
359                                                                                 <artifactId>
360                                                                                         properties-maven-plugin
361                                                                                 </artifactId>
362                                                                                 <versionRange>
363                                                                                         [1.0-alpha-2,)
364                                                                                 </versionRange>
365                                                                                 <goals>
366                                                                                         <goal>
367                                                                                                 write-project-properties
368                                                                                         </goal>
369                                                                                 </goals>
370                                                                         </pluginExecutionFilter>
371                                                                         <action>
372                                                                                 <ignore></ignore>
373                                                                         </action>
374                                                                 </pluginExecution>
375                                                         </pluginExecutions>
376                                                 </lifecycleMappingMetadata>
377                                         </configuration>
378                                 </plugin>
379
380                                 <plugin>
381                                         <groupId>org.apache.maven.plugins</groupId>
382                                         <artifactId>maven-dependency-plugin</artifactId>
383                                         <version>3.0.0</version>
384                                         <executions>
385                                                 <execution>
386                                                         <id>copy-installed</id>
387                                                         <phase>install</phase>
388                                                         <goals>
389                                                                 <goal>copy</goal>
390                                                         </goals>
391                                                         <configuration>
392                                                                 <artifactItems>
393                                                                         <artifactItem>
394                                                                                 <groupId>org.openecomp.aai</groupId>
395                                                                                 <artifactId>sparky-fe</artifactId>
396                                                                                 <version>1.0.0-SNAPSHOT</version>
397                                                                                 <type>war</type>
398                                                                                 <outputDirectory>${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extApps/</outputDirectory>
399                                                                                 <destFileName>aai.war</destFileName>
400                                                                         </artifactItem>
401                                                                 </artifactItems>
402                                                         </configuration>
403                                                 </execution>
404                                         </executions>
405                                 </plugin>
406                                 
407                                 <plugin>
408                                         <groupId>org.apache.maven.plugins</groupId>
409                                         <artifactId>maven-compiler-plugin</artifactId>
410                                         <configuration>
411                                                 <source>1.8</source>
412                                                 <target>1.8</target>
413                                         </configuration>
414                                 </plugin>
415
416
417                                 <plugin>
418                                         <groupId>org.apache.maven.plugins</groupId>
419                                         <artifactId>maven-resources-plugin</artifactId>
420                                         <version>2.7</version>
421                                         <executions>
422                                                 <execution>
423                                                         <id>copy-docker-file</id>
424                                                         <phase>package</phase>
425                                                         <goals>
426                                                                 <goal>copy-resources</goal>
427                                                         </goals>
428                                                         <configuration>
429                                                                 <outputDirectory>target</outputDirectory>
430                                                                 <overwrite>true</overwrite>
431                                                                 <resources>
432                                                                         <resource>
433                                                                                 <directory>${basedir}/src/main/docker</directory>
434                                                                                 <filtering>true</filtering>
435                                                                                 <includes>
436                                                                                         <include>**/*</include>
437                                                                                 </includes>
438                                                                         </resource>
439                                                                         <resource>
440                                                                                 <directory>${basedir}/src/main/scripts/</directory>
441                                                                         </resource>
442                                                                 </resources>
443                                                         </configuration>
444                                                 </execution>
445                                         </executions>
446                                 </plugin>
447
448                         </plugins>
449
450                 </pluginManagement>
451
452                 <plugins>
453                                     <plugin>
454                 <groupId>org.apache.maven.plugins</groupId>
455                 <artifactId>maven-site-plugin</artifactId>
456                 <version>3.3</version>
457                 <configuration>
458                     <reportPlugins>
459                         <plugin>
460                             <groupId>org.apache.maven.plugins</groupId>
461                             <artifactId>maven-checkstyle-plugin</artifactId>
462                             <version>2.17</version>
463                             <reportSets>
464                                 <reportSet>
465                                     <reports>
466                                         <report>checkstyle</report>
467                                     </reports>
468                                 </reportSet>
469                             </reportSets>
470                         </plugin>
471                     </reportPlugins>
472                 </configuration>
473             </plugin>
474             <plugin>
475                 <groupId>org.apache.maven.plugins</groupId>
476                 <artifactId>maven-resources-plugin</artifactId>
477                 <version>2.7</version>
478                 <executions>
479                     <execution>
480                         <id>copy-docker-file</id>
481                         <phase>package</phase>
482                         <goals>
483                             <goal>copy-resources</goal>
484                         </goals>
485                         <configuration>
486                             <outputDirectory>target</outputDirectory>
487                             <overwrite>true</overwrite>
488                             <resources>
489                                 <resource>
490                                     <directory>${basedir}/src/main/docker</directory>
491                                     <filtering>true</filtering>
492                                     <includes>
493                                         <include>**/*</include>
494                                     </includes>
495                                 </resource>
496                                 <resource>
497                                     <directory>${basedir}/src/main/scripts/</directory>
498                                 </resource>
499                             </resources>
500                         </configuration>
501                     </execution>
502                 </executions>
503             </plugin>
504             <plugin>
505                 <groupId>com.spotify</groupId>
506                 <artifactId>docker-maven-plugin</artifactId>
507                 <version>0.4.11</version>
508                 <configuration>
509                     <verbose>true</verbose>
510                     <serverId>docker-hub</serverId>
511                     <imageName>${docker.push.registry}/openecomp/${project.artifactId}</imageName>                              
512                     <dockerDirectory>${docker.location}</dockerDirectory>
513                     <imageTags>
514                         <imageTag>latest</imageTag>
515                     </imageTags>
516                     <forceTags>true</forceTags>
517                 </configuration>
518             </plugin>
519             <!-- license plugin -->
520             <plugin>
521                 <groupId>com.mycila</groupId>
522                 <artifactId>license-maven-plugin</artifactId>
523                 <version>3.0</version>
524                 <configuration>
525                     <header>LICENSE</header>
526                     <includes>
527                         <include>src/main/java/**</include>
528                     </includes>
529                 </configuration>
530                 <executions>
531                     <execution>
532                         <goals>
533                             <goal>format</goal>
534                         </goals>
535                         <phase>process-sources</phase>
536                     </execution>
537                 </executions>
538             </plugin>
539             <plugin>
540                 <groupId>org.sonatype.plugins</groupId>
541                 <artifactId>nexus-staging-maven-plugin</artifactId>
542                 <version>1.6.7</version>
543                 <extensions>true</extensions>
544                 <configuration>
545                     <nexusUrl>${nexusproxy}</nexusUrl>
546                     <stagingProfileId>176c31dfe190a</stagingProfileId>
547                     <serverId>ecomp-staging</serverId>
548                 </configuration>
549             </plugin>
550             <plugin>
551                 <groupId>org.apache.maven.plugins</groupId>
552                 <artifactId>maven-deploy-plugin</artifactId>
553                 <configuration>
554                     <skip>true</skip>
555                 </configuration>
556             </plugin>
557             <plugin>
558                 <groupId>org.codehaus.mojo</groupId>
559                 <artifactId>sonar-maven-plugin</artifactId>
560                 <version>3.2</version>
561             </plugin>
562                         <plugin>
563                                 <groupId>org.jacoco</groupId>
564                                 <artifactId>jacoco-maven-plugin</artifactId>
565                                 <version>0.7.9</version>
566                                 <configuration>
567                                         <destFile>${basedir}/target/coverage-reports/jacoco-unit.exec</destFile>
568                                         <dataFile>${basedir}/target/coverage-reports/jacoco-unit.exec</dataFile>
569                                 </configuration>
570                                 <executions>
571                                         <execution>
572                                                 <id>prepare-agent</id>
573                                                 <goals>
574                                                         <goal>prepare-agent</goal>
575                                                 </goals>
576                                         </execution>
577                                         <execution>
578                                                 <id>jacoco-site</id>
579                                                 <phase>package</phase>
580                                                 <goals>
581                                                         <goal>report</goal>
582                                                 </goals>
583                                         </execution>
584                                 </executions>
585                         </plugin>
586
587                 </plugins>
588         </build>
589         <distributionManagement>
590         <repository>
591             <id>ecomp-releases</id>
592             <name>ECOMP Release Repository</name>
593             <url>${nexusproxy}/content/repositories/releases/</url>
594         </repository>
595         <snapshotRepository>
596             <id>ecomp-snapshots</id>
597             <name>ECOMP Snapshot Repository</name>
598             <url>${nexusproxy}/content/repositories/snapshots/</url>
599         </snapshotRepository>
600     </distributionManagement>
601 </project>