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