f9db0a95845d097bc4f79034432f23595db6d59d
[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
182                 <dependency>
183                         <groupId>junit</groupId>
184                         <artifactId>junit</artifactId>
185                         <version>4.12</version>
186                         <scope>test</scope>
187                 </dependency>
188                 <dependency>
189                         <groupId>org.assertj</groupId>
190                         <artifactId>assertj-core</artifactId>
191                         <version>3.8.0</version>
192                         <scope>test</scope>
193                 </dependency>
194                 <dependency>
195                         <groupId>org.springframework.boot</groupId>
196                         <artifactId>spring-boot-starter-test</artifactId>
197                         <version>${spring.boot.starter.test.version}</version>
198                         <scope>test</scope>
199                 </dependency>
200                 <dependency>
201         <groupId>org.aspectj</groupId>
202         <artifactId>aspectjweaver</artifactId>
203         <version>1.8.13</version>
204                         <scope>test</scope>
205                 </dependency>
206
207         </dependencies>
208         
209         <build>
210                 <plugins>
211                         <plugin>
212                                 <groupId>org.apache.maven.plugins</groupId>
213                                 <artifactId>maven-compiler-plugin</artifactId>
214                                 <version>3.0</version>
215                                 <configuration>
216                                         <source>1.8</source>
217                                         <target>1.8</target>
218                                 </configuration>
219                         </plugin>
220                         <plugin>
221                                 <groupId>org.apache.maven.plugins</groupId>
222                                 <artifactId>maven-jar-plugin</artifactId>
223                                 <configuration>
224                                         <archive>
225                                                 <manifest>
226                                                         <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
227                                                 </manifest>
228                                                 <manifestEntries>
229                                                         <Build-Number>${project.version}.${build.number}</Build-Number>
230                                                         <Build-Time>${maven.build.timestamp}</Build-Time>
231                                                 </manifestEntries>
232                                         </archive>
233                                 </configuration>
234                                 <executions>
235                                         <execution>
236                                                 <goals>
237                                                         <goal>test-jar</goal>
238                                                 </goals>
239                                         </execution>
240                                 </executions>
241                         </plugin>
242                         <plugin>
243                                 <groupId>org.springframework.boot</groupId>
244                                 <artifactId>spring-boot-maven-plugin</artifactId>
245                                 <executions>
246                                         <execution>
247                                                 <goals>
248                                                         <goal>repackage</goal>
249                                                 </goals>
250                                         </execution>
251                                 </executions>
252                         </plugin>
253      <!--  <plugin>
254         <groupId>org.apache.maven.plugins</groupId>
255         <artifactId>maven-dependency-plugin</artifactId>
256         <version>2.10</version>
257         <executions>
258           <execution>
259             <id>copy-dependencies</id>
260             <phase>package</phase>
261             <goals>
262               <goal>copy-dependencies</goal>
263             </goals>
264             <configuration>
265               <outputDirectory>${project.build.directory}/deps</outputDirectory>
266               <overWriteReleases>false</overWriteReleases>
267               <overWriteSnapshots>false</overWriteSnapshots>
268               <overWriteIfNewer>true</overWriteIfNewer>
269             </configuration>
270           </execution>
271         </executions>
272       </plugin> -->
273                         <plugin>
274                                 <groupId>io.fabric8</groupId>
275                                 <artifactId>docker-maven-plugin</artifactId>
276                                 <version>0.21.0</version>
277                                 <configuration>
278                                         <verbose>true</verbose>
279                                         <dockerHost>${docker.host.url}</dockerHost>
280                                         <registry>${docker.registry.url}</registry>
281                                         <authConfig>
282                                                 <username>${docker.registry.login}</username>
283                                                 <password>${docker.registry.password}</password>
284                                         </authConfig>
285                                         <images>
286                                                 <image>
287                                                         <name>federation-gateway:${project.version}</name>
288                                                         <build>
289                                                                 <!-- This is the same FROM used in a Dockerfile -->
290                                                                 <!-- <from>openjdk:8-jdk</from> -->
291                                                                 <from>frolvlad/alpine-oraclejdk8:slim</from>
292                                                                 <tags>
293                                                                 <tag>latest</tag>
294                                                         <tag>${project.version}</tag>
295                                                                 <tag>${maven.build.timestamp}</tag>
296                                                                 </tags>
297                                                                 <assembly>
298                                                                         <inline>
299                                                                                 <files>
300                                                                                         <file>
301                                                                                                 <source>application.properties.template</source>
302                                                                                                 <outputDirectory />
303                                                                                                 <destName>application.properties</destName>
304                                                                                         </file>
305                                                                                         <file>
306                                                                                                 <source>src/test/resources/ist-acumosa.pkcs12</source>
307                                                                                                 <outputDirectory />
308                                                                                                 <destName>ist-acumosa.pkcs12</destName>
309                                                                                         </file>
310                                                                                         <file>
311                                                                                                 <source>src/test/resources/ist-acumosb.pkcs12</source>
312                                                                                                 <outputDirectory />
313                                                                                                 <destName>ist-acumosb.pkcs12</destName>
314                                                                                         </file>
315                                                                                         <file>
316                                                                                                 <source>src/test/resources/acumosTrustStore.jks</source>
317                                                                                                 <outputDirectory />
318                                                                                                 <destName>acumosTrustStore.jks</destName>
319                                                                                         </file>
320                                                                                         <file>
321                                                                                                 <source>target/${project.artifactId}-${project.version}.${project.packaging}</source>
322                                                                                                 <outputDirectory />
323                                                                                         </file>
324                                                                                 </files>
325                                                                         </inline>
326                                                                 </assembly>
327                                                                 <!-- This is the same CMD used in a Dockerfile -->
328                                                                 <cmd>
329                                                                         <shell><![CDATA[        cd /maven; java -Djava.security.egd=file:/dev/./urandom -jar ${project.artifactId}-${project.version}.${project.packaging}]]></shell>
330                                                                 </cmd>
331                                                         </build>
332                                                 </image>
333                                                 <image>
334                                                         <name>federation-gateway-test:${project.version}</name>
335                                                         <build>
336                                                                 <!-- This is the same FROM used in a Dockerfile -->
337                                                                 <!-- <from>openjdk:8-jdk</from> -->
338                                                                 <from>frolvlad/alpine-oraclejdk8:slim</from>
339                                                                 <tags>
340                                                                 <tag>latest</tag>
341                                                         <tag>${project.version}</tag>
342                                                                 <tag>${maven.build.timestamp}</tag>
343                                                                 </tags>
344                                                                 <assembly>
345                                                                         <inline>
346                                                                                 <files>
347                                                                                         <file>
348                                                                                                 <source>application.properties.template</source>
349                                                                                                 <outputDirectory />
350                                                                                                 <destName>application.properties</destName>
351                                                                                         </file>
352 <!--
353         need the following two for server config
354 -->
355                                                                                         <file>
356                                                                                                 <source>src/test/resources/acumosa.pkcs12</source>
357                                                                                                 <outputDirectory />
358                                                                                                 <destName>acumosa.pkcs12</destName>
359                                                                                         </file>
360                                                                                         <file>
361                                                                                                 <source>src/test/resources/acumosb.pkcs12</source>
362                                                                                                 <outputDirectory />
363                                                                                                 <destName>acumosb.pkcs12</destName>
364                                                                                         </file>
365                                                                                         <file>
366                                                                                                 <source>src/test/resources/acumosTrustStore.jks</source>
367                                                                                                 <outputDirectory />
368                                                                                                 <destName>acumosTrustStore.jks</destName>
369                                                                                         </file>
370                                                                                         <file>
371                                                                                                 <source>target/${project.artifactId}-${project.version}.${project.packaging}</source>
372                                                                                                 <outputDirectory />
373                                                                                         </file>
374                                                                                         <file>
375                                                                                                 <source>target/${project.artifactId}-${project.version}-tests.${project.packaging}</source>
376                                                                                                 <outputDirectory />
377                                                                                         </file>
378                                                                                 </files>
379                                                                                 <fileSets>
380                       <fileSet>
381                         <directory>${basedir}/target/deps/</directory>
382                         <outputDirectory>/libs/</outputDirectory>
383                         <includes>
384                           <include>*</include>
385                         </includes>
386                         <fileMode>0755</fileMode>
387                                                                                         </fileSet>
388                                                                                 </fileSets>
389                                                                         </inline>
390                                                                 </assembly>
391                                                                 <!-- This is the same CMD used in a Dockerfile -->
392                                                                 <cmd>
393                                                                         <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>
394
395 <!--
396                                                                         <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>
397 -->
398                                                                 </cmd>
399                                                         </build>
400                                                 </image>
401                                         </images>
402                                 </configuration>
403                                 <executions>
404                                         <execution>
405                                                 <goals>
406                                                         <!-- build is bound to install phase -->
407                                                         <goal>build</goal>
408                                                         <!-- push is bound to deploy phase -->
409                                                         <goal>push</goal>
410                                                 </goals>
411                                         </execution>
412                                 </executions>
413                         </plugin>
414                         <plugin>
415                                 <groupId>org.codehaus.mojo</groupId>
416                                 <artifactId>license-maven-plugin</artifactId>
417                                 <version>1.14</version>
418                                 <configuration>
419                                         <licenseName>acumos</licenseName>
420                                         <licenseResolver>${project.baseUri}/src/license</licenseResolver>
421                                         <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
422                                         <processStartTag>===============LICENSE_START=======================================================</processStartTag>
423                                         <processEndTag>===============LICENSE_END=========================================================</processEndTag>
424                                         <sectionDelimiter>===================================================================================</sectionDelimiter>
425                                         <inceptionYear>2017</inceptionYear>
426                                         <organizationName>AT&amp;T Intellectual Property &amp; Tech Mahindra. All rights reserved.</organizationName>
427                                         <projectName>Acumos</projectName>
428                                         <canUpdateCopyright>true</canUpdateCopyright>
429                                         <canUpdateDescription>true</canUpdateDescription>
430                                         <canUpdateLicense>true</canUpdateLicense>
431                                         <emptyLineAfterHeader>true</emptyLineAfterHeader>
432                                         <includes>
433                                                 <include>**/*.java</include>
434                                         </includes>
435                                 </configuration>
436 <!--
437                                 <executions>
438                                         <execution>
439                                                 <id>first</id>
440                                                 <goals>
441                                                         <goal>update-file-header</goal>
442                                                 </goals>
443                                                 <phase>process-sources</phase>
444                                         </execution>
445                                 </executions>
446 -->
447                         </plugin>
448                         <plugin>
449                                 <groupId>org.jacoco</groupId>
450                                 <artifactId>jacoco-maven-plugin</artifactId>
451                                 <version>0.7.6.201602180812</version>
452                                 <executions>
453                                         <execution>
454                                                 <id>default-prepare-agent</id>
455                                                 <goals>
456                                                         <goal>prepare-agent</goal>
457                                                 </goals>
458                                         </execution>
459                                         <execution>
460                                                 <id>default-report</id>
461                                                 <phase>prepare-package</phase>
462                                                 <goals>
463                                                         <goal>report</goal>
464                                                 </goals>
465                                         </execution>
466                                 </executions>
467                         </plugin>
468
469                 </plugins>
470         </build>
471         <distributionManagement>
472                 <snapshotRepository>
473                         <!-- must match ID in Jenkins settings -->
474                         <id>acumos-nexus</id>
475                         <name>acumos-repository-snapshots</name>
476                         <url>${acumos.nexus.url}/${acumos.nexus.snapshot.path}</url>
477                 </snapshotRepository>
478                 <repository>
479                         <!-- must match ID in Jenkins settings -->
480                         <id>acumos-nexus</id>
481                         <name>acumos-repository-releases</name>
482                         <url>${acumos.nexus.url}/${acumos.nexus.release.path}</url>
483                 </repository>
484         </distributionManagement>
485 </project>