bf423a6198e31b7b9a01f9064e5af7cd1da37120
[federation.git] / gateway / pom.xml
1 <?xml version="1.0"?>
2 <project
3         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
4         xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
5         <modelVersion>4.0.0</modelVersion>
6         <groupId>org.acumos.federation</groupId>
7         <artifactId>gateway</artifactId>
8         <version>1.0.0-SNAPSHOT</version>
9         <name>Federation Gateway</name>
10         <description>Federated Acumos Interface for inter-acumos and ONAP communication</description>
11
12         <parent>
13                 <groupId>org.springframework.boot</groupId>
14                 <artifactId>spring-boot-starter-parent</artifactId>
15                 <version>1.5.4.RELEASE</version>
16     <!-- silence warning about parent relative path -->
17     <relativePath />
18         </parent>
19
20         <properties>
21                 <encoding>UTF-8</encoding>
22                 <!-- Stand-alone RESTFul application -->
23                 <start-class>org.acumos.federation.gateway.Application</start-class>
24                 <!-- Jenkins invokes mvn with argument -Dbuild.number=${BUILD_NUMBER} -->
25                 <build.number>0</build.number>
26                 <eelf.version>1.0.0</eelf.version>
27                 <!-- tests require database to be running -->
28                 <skipTests>false</skipTests>
29                 <!-- Docker daemon -->
30                 <docker.host.url>unix:/var/run/docker.sock</docker.host.url>
31                 <!-- Docker image registry -->
32                 <docker.registry.url>Set by Jenkins</docker.registry.url>
33                 <docker.registry.login>Registry userId - supplied by jenkins</docker.registry.login>
34                 <docker.registry.password>Registry password - supplied by jenkins</docker.registry.password>
35                 <!--
36                 <docker.registry.url>registry.hub.docker.io</docker.registry.url>
37                 --> 
38                 <!-- dependencies versions -->
39                 <slf4j.version>1.7.25</slf4j.version>
40                 <logback.version>1.2.3</logback.version>
41                 <spring.boot.devtools.version>1.5.8.RELEASE</spring.boot.devtools.version>
42                 <spring.boot.starter.web.version>1.5.8.RELEASE</spring.boot.starter.web.version>
43                 <spring.boot.starter.security.version>1.5.8.RELEASE</spring.boot.starter.security.version>
44                 <spring.boot.starter.test.version>1.5.8.RELEASE</spring.boot.starter.test.version>
45                 <spring.boot.configuration.processor.version>1.5.8.RELEASE</spring.boot.configuration.processor.version>
46                 <!-- All acumos.nexus.* are overridden by Jenkins settings -->
47                 <acumos.nexus.url>http://cognita-nexus01.eastus.cloudapp.azure.com:8081</acumos.nexus.url>
48                 <acumos.nexus.snapshot.path>repository/repo_cognita_platform_maven_snapshots</acumos.nexus.snapshot.path>
49                 <acumos.nexus.release.path>repository/repo_cognita_platform_maven</acumos.nexus.release.path>
50                 <maven.build.timestamp.format>yyyy.MM.dd_HH.mm</maven.build.timestamp.format>
51         </properties>
52
53         <repositories>
54                 <repository>
55                         <id>acumos-snapshots</id>
56                         <name>acumos-repository-snapshots</name>
57                         <url>${acumos.nexus.url}/${acumos.nexus.snapshot.path}</url>
58                 </repository>
59                 <repository>
60                         <id>acumos-releases</id>
61                         <name>acumos-repository-releases</name>
62                         <url>${acumos.nexus.url}/${acumos.nexus.release.path}</url>
63                 </repository>
64                 <repository>
65                         <id>onap-snapshots</id>
66                         <name>ONAP Snapshot Repository</name>
67                         <url>${onap.nexus.url}/${onap.nexus.snapshot.path}</url>
68                 </repository>
69                 <repository>
70                         <id>onap-releases</id>
71                         <name>ONAP Release Repository</name>
72                         <url>${onap.nexus.url}/${onap.nexus.release.path}</url>
73                 </repository>
74         </repositories>
75
76         <dependencies>
77                 <dependency>
78                         <groupId>org.acumos</groupId>
79                         <artifactId>acumos-nexus-client</artifactId>
80                         <!-- <version>1.0.0-SNAPSHOT</version> -->
81                         <version>1.12.0</version>
82                 </dependency>
83                 <dependency>
84                         <groupId>org.acumos.common-dataservice</groupId>
85                         <artifactId>cmn-data-svc-client</artifactId>
86                         <version>1.10.1-SNAPSHOT</version>
87                         <!-- <version>1.12.0-SNAPSHOT</version> -->
88                 </dependency>
89                 <dependency>
90               <groupId>org.json</groupId>
91               <artifactId>json</artifactId>
92               <version>20160212</version>
93             </dependency>
94                 <dependency>
95                         <groupId>org.slf4j</groupId>
96                         <artifactId>slf4j-api</artifactId>
97                         <version>${slf4j.version}</version>
98                 </dependency>
99                 <dependency>
100                         <groupId>ch.qos.logback</groupId>
101                         <artifactId>logback-classic</artifactId>
102                         <version>${logback.version}</version>
103                 </dependency>
104                 <dependency>
105                         <groupId>ch.qos.logback</groupId>
106                         <artifactId>logback-core</artifactId>
107                         <version>${logback.version}</version>
108                 </dependency>
109                 <dependency>
110         <groupId>org.springframework.boot</groupId>
111                 <artifactId>spring-boot-starter-security</artifactId>
112                         <version>${spring.boot.starter.security.version}</version>
113                 </dependency>
114                 <dependency>
115                         <groupId>org.springframework.boot</groupId>
116                         <artifactId>spring-boot-starter-web</artifactId>
117                         <version>${spring.boot.starter.web.version}</version>
118                 </dependency>
119                 <dependency>
120                         <groupId>org.springframework.boot</groupId>
121                         <artifactId>spring-boot-configuration-processor</artifactId>
122                         <version>${spring.boot.configuration.processor.version}</version>
123                         <optional>true</optional>
124                 </dependency>
125                 <dependency>
126                     <groupId>org.apache.httpcomponents</groupId>
127                     <artifactId>httpclient</artifactId>
128                     <version>4.5</version>
129                 </dependency>
130                 <dependency>
131         <groupId>org.springframework.shell</groupId>
132         <artifactId>spring-shell</artifactId>
133         <version>1.2.0.RELEASE</version>
134                 </dependency>
135                 <dependency>
136                         <groupId>io.springfox</groupId>
137                         <artifactId>springfox-swagger2</artifactId>
138                         <version>2.6.1</version>
139                 </dependency>
140                 <dependency>
141                         <groupId>io.springfox</groupId>
142                         <artifactId>springfox-swagger-ui</artifactId>
143                         <version>2.6.1</version>
144                 </dependency>
145                 <dependency>
146                         <groupId>com.att.eelf</groupId>
147                         <artifactId>eelf-core</artifactId>
148                         <version>${eelf.version}</version>
149                 </dependency>
150                 <dependency>
151                         <groupId>javax.inject</groupId>
152                         <artifactId>javax.inject</artifactId>
153                         <version>1</version>
154                 </dependency>
155                 <dependency>
156                         <groupId>io.jsonwebtoken</groupId>
157                         <artifactId>jjwt</artifactId>
158                         <version>0.6.0</version>
159                 </dependency>
160                 <dependency>
161                 <groupId>org.python</groupId>
162                 <artifactId>jython-standalone</artifactId>
163                 <version>2.7.1-rc3</version>
164                 </dependency>
165                 <dependency>
166                         <groupId>junit</groupId>
167                         <artifactId>junit</artifactId>
168                         <version>3.8.1</version>
169                         <scope>test</scope>
170                 </dependency>
171                 <dependency>
172                 <groupId>commons-cli</groupId>
173                 <artifactId>commons-cli</artifactId>
174                 <version>1.2</version>
175                 </dependency>
176                 <dependency>
177                 <groupId>org.apache.commons</groupId>
178                 <artifactId>commons-lang3</artifactId>
179                 <version>3.6</version>
180                 </dependency>
181                 <dependency>
182         <groupId>org.aspectj</groupId>
183         <artifactId>aspectjweaver</artifactId>
184         <version>1.8.13</version>
185                 </dependency>
186
187                 <dependency>
188                         <groupId>junit</groupId>
189                         <artifactId>junit</artifactId>
190                         <version>4.12</version>
191                         <scope>test</scope>
192                 </dependency>
193                 <dependency>
194                         <groupId>org.assertj</groupId>
195                         <artifactId>assertj-core</artifactId>
196                         <version>3.8.0</version>
197                         <scope>test</scope>
198                 </dependency>
199                 <dependency>
200                         <groupId>org.springframework.boot</groupId>
201                         <artifactId>spring-boot-starter-test</artifactId>
202                         <version>${spring.boot.starter.test.version}</version>
203                         <scope>test</scope>
204                 </dependency>
205         </dependencies>
206         
207         <build>
208                 <plugins>
209                         <plugin>
210                                 <groupId>org.apache.maven.plugins</groupId>
211                                 <artifactId>maven-compiler-plugin</artifactId>
212                                 <version>3.0</version>
213                                 <configuration>
214                                         <source>1.8</source>
215                                         <target>1.8</target>
216                                 </configuration>
217                         </plugin>
218                         <plugin>
219                                 <groupId>org.apache.maven.plugins</groupId>
220                                 <artifactId>maven-jar-plugin</artifactId>
221                                 <configuration>
222                                         <archive>
223                                                 <manifest>
224                                                         <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
225                                                 </manifest>
226                                                 <manifestEntries>
227                                                         <Build-Number>${project.version}.${build.number}</Build-Number>
228                                                         <Build-Time>${maven.build.timestamp}</Build-Time>
229                                                 </manifestEntries>
230                                         </archive>
231                                 </configuration>
232                                 <executions>
233                                         <execution>
234                                                 <goals>
235                                                         <goal>test-jar</goal>
236                                                 </goals>
237                                         </execution>
238                                 </executions>
239                         </plugin>
240                         <plugin>
241                                 <groupId>org.springframework.boot</groupId>
242                                 <artifactId>spring-boot-maven-plugin</artifactId>
243                                 <executions>
244                                         <execution>
245                                                 <goals>
246                                                         <goal>repackage</goal>
247                                                 </goals>
248                                         </execution>
249                                 </executions>
250                         </plugin>
251       <plugin>
252         <groupId>org.apache.maven.plugins</groupId>
253         <artifactId>maven-dependency-plugin</artifactId>
254         <version>2.10</version>
255         <executions>
256           <execution>
257             <id>copy-dependencies</id>
258             <phase>package</phase>
259             <goals>
260               <goal>copy-dependencies</goal>
261             </goals>
262             <configuration>
263               <outputDirectory>${project.build.directory}/deps</outputDirectory>
264               <overWriteReleases>true</overWriteReleases>
265               <overWriteSnapshots>true</overWriteSnapshots>
266               <overWriteIfNewer>true</overWriteIfNewer>
267             </configuration>
268           </execution>
269         </executions>
270       </plugin>
271                         <plugin>
272                                 <groupId>io.fabric8</groupId>
273                                 <artifactId>docker-maven-plugin</artifactId>
274                                 <version>0.21.0</version>
275                                 <configuration>
276                                         <verbose>true</verbose>
277                                         <dockerHost>${docker.host.url}</dockerHost>
278                                         <registry>${docker.registry.url}</registry>
279                                         <authConfig>
280                                                 <username>${docker.registry.login}</username>
281                                                 <password>${docker.registry.password}</password>
282                                         </authConfig>
283                                         <images>
284                                                 <image>
285                                                         <name>federation-gateway:${project.version}</name>
286                                                         <build>
287                                                                 <!-- This is the same FROM used in a Dockerfile -->
288                                                                 <!-- <from>openjdk:8-jdk</from> -->
289                                                                 <from>frolvlad/alpine-oraclejdk8:slim</from>
290                                                                 <tags>
291                                                                 <tag>latest</tag>
292                                                         <tag>${project.version}</tag>
293                                                                 <tag>${maven.build.timestamp}</tag>
294                                                                 </tags>
295                                                                 <assembly>
296                                                                         <inline>
297                                                                                 <files>
298                                                                                         <file>
299                                                                                                 <source>application.properties.template</source>
300                                                                                                 <outputDirectory />
301                                                                                                 <destName>application.properties</destName>
302                                                                                         </file>
303                                                                                         <file>
304                                                                                                 <source>src/test/resources/ist-acumosa.pkcs12</source>
305                                                                                                 <outputDirectory />
306                                                                                                 <destName>ist-acumosa.pkcs12</destName>
307                                                                                         </file>
308                                                                                         <file>
309                                                                                                 <source>src/test/resources/ist-acumosb.pkcs12</source>
310                                                                                                 <outputDirectory />
311                                                                                                 <destName>ist-acumosb.pkcs12</destName>
312                                                                                         </file>
313                                                                                         <file>
314                                                                                                 <source>src/test/resources/acumosTrustStore.jks</source>
315                                                                                                 <outputDirectory />
316                                                                                                 <destName>acumosTrustStore.jks</destName>
317                                                                                         </file>
318                                                                                         <file>
319                                                                                                 <source>target/${project.artifactId}-${project.version}.${project.packaging}</source>
320                                                                                                 <outputDirectory />
321                                                                                         </file>
322                                                                                 </files>
323                                                                         </inline>
324                                                                 </assembly>
325                                                                 <!-- This is the same CMD used in a Dockerfile -->
326                                                                 <cmd>
327                                                                         <shell><![CDATA[        cd /maven; java -Djava.security.egd=file:/dev/./urandom -jar ${project.artifactId}-${project.version}.${project.packaging}]]></shell>
328                                                                 </cmd>
329                                                         </build>
330                                                 </image>
331                                                 <image>
332                                                         <name>federation-gateway-test:${project.version}</name>
333                                                         <build>
334                                                                 <!-- This is the same FROM used in a Dockerfile -->
335                                                                 <!-- <from>openjdk:8-jdk</from> -->
336                                                                 <from>frolvlad/alpine-oraclejdk8:slim</from>
337                                                                 <tags>
338                                                                 <tag>latest</tag>
339                                                         <tag>${project.version}</tag>
340                                                                 <tag>${maven.build.timestamp}</tag>
341                                                                 </tags>
342                                                                 <assembly>
343                                                                         <inline>
344                                                                                 <files>
345                                                                                         <file>
346                                                                                                 <source>application.properties.template</source>
347                                                                                                 <outputDirectory />
348                                                                                                 <destName>application.properties</destName>
349                                                                                         </file>
350 <!--
351         need the following two for server config
352 -->
353                                                                                         <file>
354                                                                                                 <source>src/test/resources/acumosa.pkcs12</source>
355                                                                                                 <outputDirectory />
356                                                                                                 <destName>acumosa.pkcs12</destName>
357                                                                                         </file>
358                                                                                         <file>
359                                                                                                 <source>src/test/resources/acumosb.pkcs12</source>
360                                                                                                 <outputDirectory />
361                                                                                                 <destName>acumosb.pkcs12</destName>
362                                                                                         </file>
363                                                                                         <file>
364                                                                                                 <source>src/test/resources/acumosTrustStore.jks</source>
365                                                                                                 <outputDirectory />
366                                                                                                 <destName>acumosTrustStore.jks</destName>
367                                                                                         </file>
368                                                                                         <file>
369                                                                                                 <source>target/${project.artifactId}-${project.version}.${project.packaging}</source>
370                                                                                                 <outputDirectory />
371                                                                                         </file>
372                                                                                         <file>
373                                                                                                 <source>target/${project.artifactId}-${project.version}-tests.${project.packaging}</source>
374                                                                                                 <outputDirectory />
375                                                                                         </file>
376                                                                                 </files>
377                                                                                 <fileSets>
378                       <fileSet>
379                         <directory>${project.build.directory}/deps/</directory>
380                         <outputDirectory>/libs/</outputDirectory>
381                         <includes>
382                           <include>*</include>
383                         </includes>
384                         <fileMode>0755</fileMode>
385                                                                                         </fileSet>
386                                                                                 </fileSets>
387                                                                         </inline>
388                                                                 </assembly>
389                                                                 <!-- This is the same CMD used in a Dockerfile -->
390                                                                 <cmd>
391                                                                         <shell><![CDATA[        cd /maven; java -cp ${project.artifactId}-${project.version}.${project.packaging}:${project.artifactId}-${project.version}-tests.${project.packaging}:/libs/* -Djavax.net.ssl.trustStore=/app/certs/acumosTrustStore.jks -Djavax.net.ssl.trustStorePassword=acumos -Djava.security.egd=file:/dev/./urandom org.springframework.boot.loader.PropertiesLauncher]]></shell>
392
393 <!--
394                                                                         <shell><![CDATA[        cd /maven; java -cp ${project.artifactId}-${project.version}.${project.packaging}:${project.artifactId}-${project.version}-tests.${project.packaging}:/libs/* -Djavax.net.ssl.trustStore=acumosTrustStore.jks -Djavax.net.ssl.trustStorePassword=acumos -Djava.security.egd=file:/dev/./urandom org.springframework.boot.loader.PropertiesLauncher]]></shell>
395 -->
396                                                                 </cmd>
397                                                         </build>
398                                                 </image>
399                                         </images>
400                                 </configuration>
401                                 <executions>
402                                         <execution>
403                                                 <goals>
404                                                         <!-- build is bound to install phase -->
405                                                         <goal>build</goal>
406                                                         <!-- push is bound to deploy phase -->
407                                                         <goal>push</goal>
408                                                 </goals>
409                                         </execution>
410                                 </executions>
411                         </plugin>
412                         <plugin>
413                                 <groupId>org.codehaus.mojo</groupId>
414                                 <artifactId>license-maven-plugin</artifactId>
415                                 <version>1.14</version>
416                                 <configuration>
417                                         <licenseName>acumos</licenseName>
418                                         <licenseResolver>${project.baseUri}/src/license</licenseResolver>
419                                         <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
420                                         <processStartTag>===============LICENSE_START=======================================================</processStartTag>
421                                         <processEndTag>===============LICENSE_END=========================================================</processEndTag>
422                                         <sectionDelimiter>===================================================================================</sectionDelimiter>
423                                         <inceptionYear>2017</inceptionYear>
424                                         <organizationName>AT&amp;T Intellectual Property &amp; Tech Mahindra. All rights reserved.</organizationName>
425                                         <projectName>Acumos</projectName>
426                                         <canUpdateCopyright>true</canUpdateCopyright>
427                                         <canUpdateDescription>true</canUpdateDescription>
428                                         <canUpdateLicense>true</canUpdateLicense>
429                                         <emptyLineAfterHeader>true</emptyLineAfterHeader>
430                                         <includes>
431                                                 <include>**/*.java</include>
432                                         </includes>
433                                 </configuration>
434 <!--
435                                 <executions>
436                                         <execution>
437                                                 <id>first</id>
438                                                 <goals>
439                                                         <goal>update-file-header</goal>
440                                                 </goals>
441                                                 <phase>process-sources</phase>
442                                         </execution>
443                                 </executions>
444 -->
445                         </plugin>
446                         <plugin>
447                                 <groupId>org.jacoco</groupId>
448                                 <artifactId>jacoco-maven-plugin</artifactId>
449                                 <version>0.7.6.201602180812</version>
450                                 <executions>
451                                         <execution>
452                                                 <id>default-prepare-agent</id>
453                                                 <goals>
454                                                         <goal>prepare-agent</goal>
455                                                 </goals>
456                                         </execution>
457                                         <execution>
458                                                 <id>default-report</id>
459                                                 <phase>prepare-package</phase>
460                                                 <goals>
461                                                         <goal>report</goal>
462                                                 </goals>
463                                         </execution>
464                                 </executions>
465                         </plugin>
466
467                 </plugins>
468         </build>
469         <distributionManagement>
470                 <snapshotRepository>
471                         <!-- must match ID in Jenkins settings -->
472                         <id>acumos-nexus</id>
473                         <name>acumos-repository-snapshots</name>
474                         <url>${acumos.nexus.url}/${acumos.nexus.snapshot.path}</url>
475                 </snapshotRepository>
476                 <repository>
477                         <!-- must match ID in Jenkins settings -->
478                         <id>acumos-nexus</id>
479                         <name>acumos-repository-releases</name>
480                         <url>${acumos.nexus.url}/${acumos.nexus.release.path}</url>
481                 </repository>
482         </distributionManagement>
483 </project>