Add build commit information to artifacts
[sdc.git] / pom.xml
1 <!--
2 ============LICENSE_START=======================================================
3 SDC
4 ================================================================================
5 Copyright (C) 2017 AT&T Intellectual Property. 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 Modifications copyright (c) 2018 Nokia
20 ================================================================================
21 -->
22 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24     <modelVersion>4.0.0</modelVersion>
25
26     <groupId>org.openecomp.sdc</groupId>
27     <artifactId>sdc-main</artifactId>
28     <version>1.4.0-SNAPSHOT</version>
29     <packaging>pom</packaging>
30     <name>sdc</name>
31     <properties>
32         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
33
34         <!-- 3rd parties versions -->
35         <bean-matcher.version>0.11</bean-matcher.version>
36         <lang3.version>3.3.2</lang3.version>
37         <lang3.version>3.3.2</lang3.version>
38         <guava.version>18.0</guava.version>
39         <titan.version>1.0.0</titan.version>
40         <sdc.titan.version>1.2.0</sdc.titan.version>
41         <spring.version>4.3.18.RELEASE</spring.version>
42         <spring.security.version>3.2.3.RELEASE</spring.security.version>
43         <spring.ldap.version>2.0.1.RELEASE</spring.ldap.version>
44         <jersey-bom.version>2.27</jersey-bom.version>
45         <servlet-api.version>3.1.0</servlet-api.version>
46         <wire-mock.version>2.18.0</wire-mock.version>
47         <ecomp.version>2.4.0</ecomp.version>
48         <cassandra.unit.version>3.5.0.1</cassandra.unit.version>
49
50         <commons.collections.version>4.1</commons.collections.version>
51
52         <!-- Elastic Search mapper (reference the elastic search version actually). -->
53         <elastic-search.version>2.4.0</elastic-search.version>
54         <catalog-artifacts.version>1.0.0-SNAPSHOT</catalog-artifacts.version>
55         <catalog-builders.version>1.0.0-SNAPSHOT</catalog-builders.version>
56         <jetty.version>9.4.11.v20180605</jetty.version>
57
58         <!-- JSON and YAML Parsing -->
59         <jackson.version>2.8.10</jackson.version>
60         <jackson-annotations.version>2.8.0</jackson-annotations.version>
61
62         <!-- Yaml for properties -->
63         <snakeyaml.version>1.14</snakeyaml.version>
64         <functionaljava.version>4.7</functionaljava.version>
65         <httpclient.version>4.5.3</httpclient.version>
66         <httpcore.version>4.4.1</httpcore.version>
67         <json-simple.version>1.1</json-simple.version>
68
69         <!-- Logging start -->
70         <!-- logback -->
71         <logback.version>1.2.3</logback.version>
72         <slf4j-api.version>1.7.25</slf4j-api.version>
73         <commons-codec>1.10</commons-codec>
74         <commons-logging>1.2</commons-logging>
75         <janino.version>3.0.6</janino.version>
76
77         <!-- aspects -->
78         <jcabi.version>0.20.1</jcabi.version>
79         <aspectjrt.version>1.8.4</aspectjrt.version>
80         <aspectj.version>1.7.4</aspectj.version>
81         <jcabi.maven.plugin.version>0.13.2</jcabi.maven.plugin.version>
82
83         <!-- Logging end -->
84         <!-- System Metrics -->
85         <sigar.version>1.6.4</sigar.version>
86
87         <regex.version>3.0.3</regex.version>
88
89         <!--GSON-->
90         <gson.version>2.3.1</gson.version>
91
92         <!--listen to file changes-->
93         <commons-jci-core.version>1.1</commons-jci-core.version>
94
95         <!--TESTING-->
96         <mockito.version>2.18.3</mockito.version>
97         <jmockit.version>1.33</jmockit.version>
98         <junit.version>4.12</junit.version>
99         <assertj.version>3.10.0</assertj.version>
100         <testng.version>6.9.10</testng.version>
101         <extentreports.version>3.0.3</extentreports.version>
102         <cucumber.version>2.4.0</cucumber.version>
103         <bean-matchers.version>0.11</bean-matchers.version>
104         <hamcrest-all.version>1.3</hamcrest-all.version>
105
106         <!-- parser-->
107         <sdc-tosca-parser.version>1.3.5</sdc-tosca-parser.version>
108
109         <!-- sonar -->
110         <sonar.language>java</sonar.language>
111         <sonar.sourceEncoding>${project.build.sourceEncoding}</sonar.sourceEncoding>
112         <sonar.projectBaseDir>${project.basedir}</sonar.projectBaseDir>
113         <sonar.branch>${project.version}</sonar.branch>
114
115         <!--cassandra -->
116         <cassandra.driver.version>3.0.0</cassandra.driver.version>
117         <!-- maven central (Nexus) -->
118         <nexus.id.release>nexus</nexus.id.release>
119         <nexus.id.snapshot>nexus</nexus.id.snapshot>
120
121         <!--nexus-->
122         <npm.registry>https://registry.npmjs.org/</npm.registry>
123         <!-- https://nexus.onap.org/content/repositories/npm/ -->
124         <nexus.proxy>https://nexus.onap.org</nexus.proxy>
125         <sitePath>/content/sites/site/org/openecomp/sdc/${project.version}</sitePath>
126         <staging.profile.id>176c31dfe190a</staging.profile.id>
127         <!--maven-->
128         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
129         <!--docker tags-->
130         <docker.tag>${project.version}-${maven.build.timestamp}</docker.tag>
131
132
133     </properties>
134
135
136     <dependencyManagement>
137         <dependencies>
138             <dependency>
139                 <groupId>org.glassfish.jersey.ext</groupId>
140                 <artifactId>jersey-bean-validation</artifactId>
141                 <version>${jersey-bom.version}</version>
142             </dependency>
143
144             <dependency>
145                 <groupId>org.glassfish.hk2.external</groupId>
146                 <artifactId>asm-all-repackaged</artifactId>
147                 <version>2.4.0</version>
148             </dependency>
149
150             <dependency>
151                 <groupId>org.assertj</groupId>
152                 <artifactId>assertj-core</artifactId>
153                 <version>${assertj.version}</version>
154             </dependency>
155
156             <dependency>
157                 <groupId>org.mockito</groupId>
158                 <artifactId>mockito-core</artifactId>
159                 <version>${mockito.version}</version>
160             </dependency>
161             
162                         <dependency>
163                         <groupId>org.jmockit</groupId>
164                                 <artifactId>jmockit</artifactId>
165                                 <version>${jmockit.version}</version>
166                         </dependency>
167                         
168
169             <dependency>
170                 <groupId>com.github.tomakehurst</groupId>
171                 <artifactId>wiremock-standalone</artifactId>
172                 <version>${wire-mock.version}</version>
173             </dependency>
174
175             <dependency>
176                 <groupId>io.cucumber</groupId>
177                 <artifactId>cucumber-java</artifactId>
178                 <version>${cucumber.version}</version>
179             </dependency>
180
181             <dependency>
182                 <groupId>io.cucumber</groupId>
183                 <artifactId>cucumber-junit</artifactId>
184                 <version>${cucumber.version}</version>
185             </dependency>
186
187             <dependency>
188                 <groupId>org.apache.commons</groupId>
189                 <artifactId>commons-lang3</artifactId>
190                 <version>${lang3.version}</version>
191             </dependency>
192             <dependency>
193                 <groupId>org.codehaus.groovy</groupId>
194                 <artifactId>groovy</artifactId>
195                 <version>2.4.13</version>
196             </dependency>
197             <dependency>
198                 <groupId>io.netty</groupId>
199                 <artifactId>netty-all</artifactId>
200                 <version>4.0.45.Final</version>
201             </dependency>
202             <dependency>
203                 <groupId>io.netty</groupId>
204                 <artifactId>netty-handler</artifactId>
205                 <version>4.0.45.Final</version>
206             </dependency>
207         </dependencies>
208     </dependencyManagement>
209
210     <reporting>
211         <plugins>
212             <plugin>
213                 <groupId>org.apache.maven.plugins</groupId>
214                 <artifactId>maven-javadoc-plugin</artifactId>
215                 <version>3.0.1</version>
216                 <configuration>
217                     <failOnError>false</failOnError>
218                     <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
219                     <docletArtifact>
220                         <groupId>org.umlgraph</groupId>
221                         <artifactId>umlgraph</artifactId>
222                         <version>5.6</version>
223                     </docletArtifact>
224                     <useStandardDocletOptions>true</useStandardDocletOptions>
225                 </configuration>
226             </plugin>
227         </plugins>
228     </reporting>
229
230     <build>
231         <pluginManagement>
232             <plugins>
233                 <plugin>
234                     <groupId>org.jacoco</groupId>
235                     <artifactId>jacoco-maven-plugin</artifactId>
236                     <version>0.8.1</version>
237                 </plugin>
238                 <plugin>
239                     <groupId>org.apache.maven.plugins</groupId>
240                     <artifactId>maven-assembly-plugin</artifactId>
241                     <version>3.1.0</version>
242                 </plugin>
243
244                 <plugin>
245                     <groupId>org.codehaus.mojo</groupId>
246                     <artifactId>exec-maven-plugin</artifactId>
247                     <version>1.6.0</version>
248                 </plugin>
249                 <plugin>
250                     <groupId>org.sonarsource.scanner.maven</groupId>
251                     <artifactId>sonar-maven-plugin</artifactId>
252                     <version>3.4.1.1168</version>
253                 </plugin>
254                 <plugin>
255                     <groupId>org.apache.maven.plugins</groupId>
256                     <artifactId>maven-clean-plugin</artifactId>
257                     <version>3.1.0</version>
258                 </plugin>
259                 <plugin>
260                     <groupId>ru.yaal.maven</groupId>
261                     <artifactId>write-text-files-maven-plugin</artifactId>
262                     <version>1.1</version>
263                 </plugin>
264                 <plugin>
265                     <groupId>org.codehaus.gmaven</groupId>
266                     <artifactId>gmaven-plugin</artifactId>
267                     <version>1.5</version>
268                 </plugin>
269                 <plugin>
270                     <groupId>org.codehaus.mojo</groupId>
271                     <artifactId>build-helper-maven-plugin</artifactId>
272                     <version>3.0.0</version>
273                 </plugin>
274                 <plugin>
275                     <groupId>org.apache.maven.plugins</groupId>
276                     <artifactId>maven-deploy-plugin</artifactId>
277                     <version>2.8.2</version>
278                 </plugin>
279                 <plugin>
280                     <groupId>org.apache.maven.plugins</groupId>
281                     <artifactId>maven-shade-plugin</artifactId>
282                     <version>3.1.1</version>
283                 </plugin>
284                 <plugin>
285                     <groupId>org.apache.maven.plugins</groupId>
286                     <artifactId>maven-resources-plugin</artifactId>
287                     <version>3.1.0</version>
288                 </plugin>
289                 <plugin>
290                     <groupId>io.fabric8</groupId>
291                     <artifactId>docker-maven-plugin</artifactId>
292                     <version>0.26.0</version>
293                 </plugin>
294                 <plugin>
295                     <groupId>org.apache.maven.plugins</groupId>
296                     <artifactId>maven-war-plugin</artifactId>
297                     <version>3.2.2</version>
298                 </plugin>
299                 <plugin>
300                     <groupId>com.github.eirslett</groupId>
301                     <artifactId>frontend-maven-plugin</artifactId>
302                     <version>1.6</version>
303                 </plugin>
304                 <plugin>
305                     <groupId>org.apache.maven.plugins</groupId>
306                     <artifactId>maven-surefire-plugin</artifactId>
307                     <version>2.22.0</version>
308                 </plugin>
309                 <plugin>
310                     <groupId>org.apache.maven.plugins</groupId>
311                     <artifactId>maven-compiler-plugin</artifactId>
312                     <version>3.8.0</version>
313                 </plugin>
314                 <plugin>
315                     <groupId>org.sonatype.plugins</groupId>
316                     <artifactId>nexus-staging-maven-plugin</artifactId>
317                     <version>1.6.8</version>
318                 </plugin>
319                 <plugin>
320                     <groupId>com.github.sylvainlaurent.maven</groupId>
321                     <artifactId>yaml-json-validator-maven-plugin</artifactId>
322                     <version>1.0.1</version>
323                 </plugin>
324                 <plugin>
325                     <groupId>pl.project13.maven</groupId>
326                     <artifactId>git-commit-id-plugin</artifactId>
327                     <version>2.2.6</version>
328                 </plugin>
329             </plugins>
330         </pluginManagement>
331
332         <plugins>
333
334             <!-- Staging Plugin -->
335             <plugin>
336                 <groupId>org.sonatype.plugins</groupId>
337                 <artifactId>nexus-staging-maven-plugin</artifactId>
338                 <extensions>true</extensions>
339                 <configuration>
340                     <nexusUrl>${nexus.proxy}</nexusUrl>
341                     <stagingProfileId>${staging.profile.id}</stagingProfileId>
342                     <serverId>ecomp-staging</serverId>
343                 </configuration>
344             </plugin>
345
346             <!-- plugin for parsing the project version -->
347             <plugin>
348                 <groupId>org.codehaus.mojo</groupId>
349                 <artifactId>build-helper-maven-plugin</artifactId>
350                 <executions>
351                     <execution>
352                         <id>parse-version</id>
353                         <phase>pre-clean</phase>
354                         <goals>
355                             <goal>parse-version</goal>
356                         </goals>
357                     </execution>
358                 </executions>
359             </plugin>
360
361             <!-- Java Code Coverage -->
362             <plugin>
363                 <groupId>org.jacoco</groupId>
364                 <artifactId>jacoco-maven-plugin</artifactId>
365                 <executions>
366                     <execution>
367                         <id>default-prepare-agent</id>
368                         <goals>
369                             <goal>prepare-agent</goal>
370                         </goals>
371                     </execution>
372                     <execution>
373                         <id>default-report</id>
374                         <goals>
375                             <goal>report</goal>
376                         </goals>
377                     </execution>
378                 </executions>
379             </plugin>
380
381             <plugin>
382                 <groupId>org.apache.maven.plugins</groupId>
383                 <artifactId>maven-site-plugin</artifactId>
384                 <version>3.7.1</version>
385                 <dependencies>
386                     <dependency>
387                         <groupId>org.apache.maven.wagon</groupId>
388                         <artifactId>wagon-webdav-jackrabbit</artifactId>
389                         <version>3.0.0</version>
390                     </dependency>
391                 </dependencies>
392             </plugin>
393
394             <!-- Set the deployment repositories properties. -->
395             <plugin>
396                 <groupId>org.codehaus.gmaven</groupId>
397                 <artifactId>gmaven-plugin</artifactId>
398                 <executions>
399                     <execution>
400                         <inherited>false</inherited>
401                         <phase>integration-test</phase>
402                         <goals>
403                             <goal>execute</goal>
404                         </goals>
405                         <configuration>
406                             <source>
407                                 pom.properties['deploy.url'] =
408                                 pom.version.contains('-SNAPSHOT') ?
409                                 project.distributionManagement.snapshotRepository.url :
410                                 project.distributionManagement.repository.url;
411                                 pom.properties['repo.id'] = pom.version.contains('-SNAPSHOT') ?
412                                 project.distributionManagement.snapshotRepository.id :
413                                 project.distributionManagement.repository.id;
414                             </source>
415                         </configuration>
416                     </execution>
417                 </executions>
418             </plugin>
419             <plugin>
420                 <groupId>org.apache.maven.plugins</groupId>
421                 <artifactId>maven-compiler-plugin</artifactId>
422                 <configuration>
423                     <source>1.8</source>
424                     <target>1.8</target>
425                 </configuration>
426             </plugin>
427             <plugin>
428                 <groupId>org.apache.maven.plugins</groupId>
429                 <artifactId>maven-surefire-plugin</artifactId>
430                 <configuration>
431                     <printSummary>false</printSummary>
432                 </configuration>
433             </plugin>
434             <plugin>
435                <groupId>pl.project13.maven</groupId>
436                <artifactId>git-commit-id-plugin</artifactId>
437                <executions>
438                   <execution>
439                      <goals>
440                         <goal>revision</goal>
441                      </goals>
442                   </execution>
443                </executions>
444                <configuration>
445                   <generateGitPropertiesFile>true</generateGitPropertiesFile>
446                   <generateGitPropertiesFilename>${project.build.outputDirectory}/META-INF/git.properties</generateGitPropertiesFilename>
447                   <failOnNoGitDirectory>true</failOnNoGitDirectory>
448                   <verbose>false</verbose>
449                   <includeOnlyProperties>
450                      <includeOnlyProperty>git.build.version</includeOnlyProperty>
451                      <includeOnlyProperty>git.build.time</includeOnlyProperty>
452                      <includeOnlyProperty>git.commit.id</includeOnlyProperty>
453                      <includeOnlyProperty>git.commit.time</includeOnlyProperty>
454                      <includeOnlyProperty>git.commit.user.name</includeOnlyProperty>
455                      <includeOnlyProperty>git.commit.user.email</includeOnlyProperty>
456                      <includeOnlyProperty>git.commit.message.short</includeOnlyProperty>
457                      <includeOnlyProperty>git.commit.message.full</includeOnlyProperty>
458                   </includeOnlyProperties>
459                   <gitDescribe>
460                      <skip>true</skip>
461                   </gitDescribe>
462                   <useNativeGit>false</useNativeGit>
463                </configuration>
464             </plugin>
465         </plugins>
466     </build>
467
468     <profiles>
469         <profile>
470             <id>all</id>
471             <activation>
472                 <activeByDefault>true</activeByDefault>
473             </activation>
474             <modules>
475                 <module>onboarding</module>
476                 <module>security-utils</module>
477                 <module>common-app-api</module>
478                 <module>common-be</module>
479                 <module>catalog-dao</module>
480                 <module>catalog-model</module>
481                 <module>catalog-be</module>
482                 <module>asdctool</module>
483                 <module>catalog-ui</module>
484                 <module>catalog-fe</module>
485                 <module>test-apis-ci</module>
486                 <module>ui-ci</module>
487                 <module>sdc-os-chef</module>
488                 <module>utils/webseal-simulator</module>
489             </modules>
490
491         </profile>
492
493         <profile>
494             <id>catalog</id>
495             <activation>
496                 <activeByDefault>false</activeByDefault>
497             </activation>
498             <modules>
499                 <module>security-utils</module>
500                 <module>common-app-api</module>
501                 <module>common-be</module>
502                 <module>catalog-dao</module>
503                 <module>catalog-model</module>
504                 <module>catalog-be</module>
505                 <module>asdctool</module>
506                 <module>catalog-ui</module>
507                 <module>catalog-fe</module>
508                 <module>test-apis-ci</module>
509                 <module>ui-ci</module>
510             </modules>
511
512             <properties>
513                 <sdc-tosca-parser.version>1.1.32</sdc-tosca-parser.version>
514             </properties>
515         </profile>
516
517         <profile>
518             <id>onboarding</id>
519             <activation>
520                 <activeByDefault>false</activeByDefault>
521             </activation>
522             <modules>
523                 <module>onboarding</module>
524             </modules>
525         </profile>
526
527     </profiles>
528
529     <repositories>
530         <!-- LF repositories -->
531         <repository>
532             <id>ecomp-releases</id>
533             <name>Release Repository</name>
534             <url>${nexus.proxy}/content/repositories/releases/</url>
535         </repository>
536         <repository>
537             <id>ecomp-snapshots</id>
538             <name>Snapshots Repository</name>
539             <url>${nexus.proxy}/content/repositories/snapshots/</url>
540         </repository>
541         <repository>
542             <id>ecomp-public</id>
543             <name>Public Repository</name>
544             <url>${nexus.proxy}/content/repositories/public/</url>
545         </repository>
546         <!-- LF repositories END-->
547     </repositories>
548
549     <distributionManagement>
550         <repository>
551             <id>ecomp-releases</id>
552             <name>Release Repository</name>
553             <url>${nexus.proxy}/content/repositories/releases/</url>
554         </repository>
555         <snapshotRepository>
556             <id>ecomp-snapshots</id>
557             <name>Snapshot Repository</name>
558             <url>${nexus.proxy}/content/repositories/snapshots/</url>
559         </snapshotRepository>
560         <site>
561             <id>ecomp-site</id>
562             <url>dav:${nexus.proxy}${sitePath}</url>
563         </site>
564     </distributionManagement>
565 </project>