3acfd2fe0d06128bb756663d88fb6c26ae72d66b
[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                 </dependency>
82                 <dependency>
83                         <groupId>org.acumos.common-dataservice</groupId>
84                         <artifactId>cmn-data-svc-client</artifactId>
85                         <version>1.10.1-SNAPSHOT</version>
86                         <!-- <version>1.12.0-SNAPSHOT</version> -->
87                 </dependency>
88                 <dependency>
89               <groupId>org.json</groupId>
90               <artifactId>json</artifactId>
91               <version>20160212</version>
92             </dependency>
93                 <dependency>
94                         <groupId>org.slf4j</groupId>
95                         <artifactId>slf4j-api</artifactId>
96                         <version>${slf4j.version}</version>
97                 </dependency>
98                 <dependency>
99                         <groupId>ch.qos.logback</groupId>
100                         <artifactId>logback-classic</artifactId>
101                         <version>${logback.version}</version>
102                 </dependency>
103                 <dependency>
104                         <groupId>ch.qos.logback</groupId>
105                         <artifactId>logback-core</artifactId>
106                         <version>${logback.version}</version>
107                 </dependency>
108                 <dependency>
109         <groupId>org.springframework.boot</groupId>
110                 <artifactId>spring-boot-starter-security</artifactId>
111                         <version>${spring.boot.starter.security.version}</version>
112                 </dependency>
113                 <dependency>
114                         <groupId>org.springframework.boot</groupId>
115                         <artifactId>spring-boot-starter-web</artifactId>
116                         <version>${spring.boot.starter.web.version}</version>
117                 </dependency>
118                 <dependency>
119                         <groupId>org.springframework.boot</groupId>
120                         <artifactId>spring-boot-configuration-processor</artifactId>
121                         <version>${spring.boot.configuration.processor.version}</version>
122                         <optional>true</optional>
123                 </dependency>
124                 <dependency>
125                     <groupId>org.apache.httpcomponents</groupId>
126                     <artifactId>httpclient</artifactId>
127                     <version>4.5</version>
128                 </dependency>
129                 <dependency>
130         <groupId>org.springframework.shell</groupId>
131         <artifactId>spring-shell</artifactId>
132         <version>1.2.0.RELEASE</version>
133                 </dependency>
134                 <dependency>
135                         <groupId>io.springfox</groupId>
136                         <artifactId>springfox-swagger2</artifactId>
137                         <version>2.6.1</version>
138                 </dependency>
139                 <dependency>
140                         <groupId>io.springfox</groupId>
141                         <artifactId>springfox-swagger-ui</artifactId>
142                         <version>2.6.1</version>
143                 </dependency>
144                 <dependency>
145                         <groupId>com.att.eelf</groupId>
146                         <artifactId>eelf-core</artifactId>
147                         <version>${eelf.version}</version>
148                 </dependency>
149                 <dependency>
150                         <groupId>javax.inject</groupId>
151                         <artifactId>javax.inject</artifactId>
152                         <version>1</version>
153                 </dependency>
154                 <dependency>
155                         <groupId>io.jsonwebtoken</groupId>
156                         <artifactId>jjwt</artifactId>
157                         <version>0.6.0</version>
158                 </dependency>
159                 <dependency>
160                 <groupId>org.python</groupId>
161                 <artifactId>jython-standalone</artifactId>
162                 <version>2.7.1-rc3</version>
163                 </dependency>
164                 <dependency>
165                         <groupId>junit</groupId>
166                         <artifactId>junit</artifactId>
167                         <version>3.8.1</version>
168                         <scope>test</scope>
169                 </dependency>
170                 <dependency>
171                 <groupId>commons-cli</groupId>
172                 <artifactId>commons-cli</artifactId>
173                 <version>1.2</version>
174                 </dependency>
175                 <dependency>
176                 <groupId>org.apache.commons</groupId>
177                 <artifactId>commons-lang3</artifactId>
178                 <version>3.6</version>
179                 </dependency>
180
181                 <dependency>
182                         <groupId>junit</groupId>
183                         <artifactId>junit</artifactId>
184                         <version>4.12</version>
185                         <scope>test</scope>
186                 </dependency>
187                 <dependency>
188                         <groupId>org.assertj</groupId>
189                         <artifactId>assertj-core</artifactId>
190                         <version>3.8.0</version>
191                         <scope>test</scope>
192                 </dependency>
193                 <dependency>
194                         <groupId>org.springframework.boot</groupId>
195                         <artifactId>spring-boot-starter-test</artifactId>
196                         <version>${spring.boot.starter.test.version}</version>
197                         <scope>test</scope>
198                 </dependency>
199                 <dependency>
200         <groupId>org.aspectj</groupId>
201         <artifactId>aspectjweaver</artifactId>
202         <version>1.8.13</version>
203                         <scope>test</scope>
204                 </dependency>
205
206         </dependencies>
207         
208         <build>
209                 <plugins>
210                         <plugin>
211                                 <groupId>org.apache.maven.plugins</groupId>
212                                 <artifactId>maven-compiler-plugin</artifactId>
213                                 <version>3.0</version>
214                                 <configuration>
215                                         <source>1.8</source>
216                                         <target>1.8</target>
217                                 </configuration>
218                         </plugin>
219                         <plugin>
220                                 <groupId>org.apache.maven.plugins</groupId>
221                                 <artifactId>maven-jar-plugin</artifactId>
222                                 <configuration>
223                                         <archive>
224                                                 <manifest>
225                                                         <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
226                                                 </manifest>
227                                                 <manifestEntries>
228                                                         <Build-Number>${project.version}.${build.number}</Build-Number>
229                                                         <Build-Time>${maven.build.timestamp}</Build-Time>
230                                                 </manifestEntries>
231                                         </archive>
232                                 </configuration>
233                                 <executions>
234                                         <execution>
235                                                 <goals>
236                                                         <goal>test-jar</goal>
237                                                 </goals>
238                                         </execution>
239                                 </executions>
240                         </plugin>
241                         <plugin>
242                                 <groupId>org.springframework.boot</groupId>
243                                 <artifactId>spring-boot-maven-plugin</artifactId>
244                                 <executions>
245                                         <execution>
246                                                 <goals>
247                                                         <goal>repackage</goal>
248                                                 </goals>
249                                         </execution>
250                                 </executions>
251                         </plugin>
252      <!--  <plugin>
253         <groupId>org.apache.maven.plugins</groupId>
254         <artifactId>maven-dependency-plugin</artifactId>
255         <version>2.10</version>
256         <executions>
257           <execution>
258             <id>copy-dependencies</id>
259             <phase>package</phase>
260             <goals>
261               <goal>copy-dependencies</goal>
262             </goals>
263             <configuration>
264               <outputDirectory>${project.build.directory}/deps</outputDirectory>
265               <overWriteReleases>false</overWriteReleases>
266               <overWriteSnapshots>false</overWriteSnapshots>
267               <overWriteIfNewer>true</overWriteIfNewer>
268             </configuration>
269           </execution>
270         </executions>
271       </plugin> -->
272                         <plugin>
273                                 <groupId>io.fabric8</groupId>
274                                 <artifactId>docker-maven-plugin</artifactId>
275                                 <version>0.21.0</version>
276                                 <configuration>
277                                         <verbose>true</verbose>
278                                         <dockerHost>${docker.host.url}</dockerHost>
279                                         <registry>${docker.registry.url}</registry>
280                                         <authConfig>
281                                                 <username>${docker.registry.login}</username>
282                                                 <password>${docker.registry.password}</password>
283                                         </authConfig>
284                                         <images>
285                                                 <image>
286                                                         <name>federation-gateway:${project.version}</name>
287                                                         <build>
288                                                                 <!-- This is the same FROM used in a Dockerfile -->
289                                                                 <!-- <from>openjdk:8-jdk</from> -->
290                                                                 <from>frolvlad/alpine-oraclejdk8:slim</from>
291                                                                 <tags>
292                                                                 <tag>latest</tag>
293                                                         <tag>${project.version}</tag>
294                                                                 <tag>${maven.build.timestamp}</tag>
295                                                                 </tags>
296                                                                 <assembly>
297                                                                         <inline>
298                                                                                 <files>
299                                                                                         <file>
300                                                                                                 <source>application.properties.template</source>
301                                                                                                 <outputDirectory />
302                                                                                                 <destName>application.properties</destName>
303                                                                                         </file>
304                                                                                         <file>
305                                                                                                 <source>src/test/resources/ist-acumosa.pkcs12</source>
306                                                                                                 <outputDirectory />
307                                                                                                 <destName>ist-acumosa.pkcs12</destName>
308                                                                                         </file>
309                                                                                         <file>
310                                                                                                 <source>src/test/resources/ist-acumosb.pkcs12</source>
311                                                                                                 <outputDirectory />
312                                                                                                 <destName>ist-acumosb.pkcs12</destName>
313                                                                                         </file>
314                                                                                         <file>
315                                                                                                 <source>src/test/resources/acumosTrustStore.jks</source>
316                                                                                                 <outputDirectory />
317                                                                                                 <destName>acumosTrustStore.jks</destName>
318                                                                                         </file>
319                                                                                         <file>
320                                                                                                 <source>target/${project.artifactId}-${project.version}.${project.packaging}</source>
321                                                                                                 <outputDirectory />
322                                                                                         </file>
323                                                                                 </files>
324                                                                         </inline>
325                                                                 </assembly>
326                                                                 <!-- This is the same CMD used in a Dockerfile -->
327                                                                 <cmd>
328                                                                         <shell><![CDATA[        cd /maven; java -Djava.security.egd=file:/dev/./urandom -jar ${project.artifactId}-${project.version}.${project.packaging}]]></shell>
329                                                                 </cmd>
330                                                         </build>
331                                                 </image>
332                                                 <image>
333                                                         <name>federation-gateway-test:${project.version}</name>
334                                                         <build>
335                                                                 <!-- This is the same FROM used in a Dockerfile -->
336                                                                 <!-- <from>openjdk:8-jdk</from> -->
337                                                                 <from>frolvlad/alpine-oraclejdk8:slim</from>
338                                                                 <tags>
339                                                                 <tag>latest</tag>
340                                                         <tag>${project.version}</tag>
341                                                                 <tag>${maven.build.timestamp}</tag>
342                                                                 </tags>
343                                                                 <assembly>
344                                                                         <inline>
345                                                                                 <files>
346                                                                                         <file>
347                                                                                                 <source>application.properties.template</source>
348                                                                                                 <outputDirectory />
349                                                                                                 <destName>application.properties</destName>
350                                                                                         </file>
351 <!--
352         need the following two for server config
353 -->
354                                                                                         <file>
355                                                                                                 <source>src/test/resources/acumosa.pkcs12</source>
356                                                                                                 <outputDirectory />
357                                                                                                 <destName>acumosa.pkcs12</destName>
358                                                                                         </file>
359                                                                                         <file>
360                                                                                                 <source>src/test/resources/acumosb.pkcs12</source>
361                                                                                                 <outputDirectory />
362                                                                                                 <destName>acumosb.pkcs12</destName>
363                                                                                         </file>
364                                                                                         <file>
365                                                                                                 <source>src/test/resources/acumosTrustStore.jks</source>
366                                                                                                 <outputDirectory />
367                                                                                                 <destName>acumosTrustStore.jks</destName>
368                                                                                         </file>
369                                                                                         <file>
370                                                                                                 <source>target/${project.artifactId}-${project.version}.${project.packaging}</source>
371                                                                                                 <outputDirectory />
372                                                                                         </file>
373                                                                                         <file>
374                                                                                                 <source>target/${project.artifactId}-${project.version}-tests.${project.packaging}</source>
375                                                                                                 <outputDirectory />
376                                                                                         </file>
377                                                                                 </files>
378                                                                                 <fileSets>
379                       <fileSet>
380                         <directory>${basedir}/target/deps/</directory>
381                         <outputDirectory>/libs/</outputDirectory>
382                         <includes>
383                           <include>*</include>
384                         </includes>
385                         <fileMode>0755</fileMode>
386                                                                                         </fileSet>
387                                                                                 </fileSets>
388                                                                         </inline>
389                                                                 </assembly>
390                                                                 <!-- This is the same CMD used in a Dockerfile -->
391                                                                 <cmd>
392                                                                         <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>
393
394 <!--
395                                                                         <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>
396 -->
397                                                                 </cmd>
398                                                         </build>
399                                                 </image>
400                                         </images>
401                                 </configuration>
402                                 <executions>
403                                         <execution>
404                                                 <goals>
405                                                         <!-- build is bound to install phase -->
406                                                         <goal>build</goal>
407                                                         <!-- push is bound to deploy phase -->
408                                                         <goal>push</goal>
409                                                 </goals>
410                                         </execution>
411                                 </executions>
412                         </plugin>
413                         <plugin>
414                                 <groupId>org.codehaus.mojo</groupId>
415                                 <artifactId>license-maven-plugin</artifactId>
416                                 <version>1.14</version>
417                                 <configuration>
418                                         <licenseName>acumos</licenseName>
419                                         <licenseResolver>${project.baseUri}/src/license</licenseResolver>
420                                         <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
421                                         <processStartTag>===============LICENSE_START=======================================================</processStartTag>
422                                         <processEndTag>===============LICENSE_END=========================================================</processEndTag>
423                                         <sectionDelimiter>===================================================================================</sectionDelimiter>
424                                         <inceptionYear>2017</inceptionYear>
425                                         <organizationName>AT&amp;T Intellectual Property &amp; Tech Mahindra. All rights reserved.</organizationName>
426                                         <projectName>Acumos</projectName>
427                                         <canUpdateCopyright>true</canUpdateCopyright>
428                                         <canUpdateDescription>true</canUpdateDescription>
429                                         <canUpdateLicense>true</canUpdateLicense>
430                                         <emptyLineAfterHeader>true</emptyLineAfterHeader>
431                                         <includes>
432                                                 <include>**/*.java</include>
433                                         </includes>
434                                 </configuration>
435 <!--
436                                 <executions>
437                                         <execution>
438                                                 <id>first</id>
439                                                 <goals>
440                                                         <goal>update-file-header</goal>
441                                                 </goals>
442                                                 <phase>process-sources</phase>
443                                         </execution>
444                                 </executions>
445 -->
446                         </plugin>
447                         <plugin>
448                                 <groupId>org.jacoco</groupId>
449                                 <artifactId>jacoco-maven-plugin</artifactId>
450                                 <version>0.7.6.201602180812</version>
451                                 <executions>
452                                         <execution>
453                                                 <id>default-prepare-agent</id>
454                                                 <goals>
455                                                         <goal>prepare-agent</goal>
456                                                 </goals>
457                                         </execution>
458                                         <execution>
459                                                 <id>default-report</id>
460                                                 <phase>prepare-package</phase>
461                                                 <goals>
462                                                         <goal>report</goal>
463                                                 </goals>
464                                         </execution>
465                                 </executions>
466                         </plugin>
467
468                 </plugins>
469         </build>
470         <distributionManagement>
471                 <snapshotRepository>
472                         <!-- must match ID in Jenkins settings -->
473                         <id>acumos-nexus</id>
474                         <name>acumos-repository-snapshots</name>
475                         <url>${acumos.nexus.url}/${acumos.nexus.snapshot.path}</url>
476                 </snapshotRepository>
477                 <repository>
478                         <!-- must match ID in Jenkins settings -->
479                         <id>acumos-nexus</id>
480                         <name>acumos-repository-releases</name>
481                         <url>${acumos.nexus.url}/${acumos.nexus.release.path}</url>
482                 </repository>
483         </distributionManagement>
484 </project>