fix the docker image build
[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</groupId>
7         <artifactId>gateway</artifactId>
8         <version>1.0.0-SNAPSHOT</version>
9         <name>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>true</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                 <!-- dependencies versions -->
41                 <slf4j.version>1.7.25</slf4j.version>
42                 <logback.version>1.2.3</logback.version>
43                 <spring.boot.devtools.version>1.5.8.RELEASE</spring.boot.devtools.version>
44                 <spring.boot.starter.web.version>1.5.8.RELEASE</spring.boot.starter.web.version>
45                 <spring.boot.starter.security.version>1.5.8.RELEASE</spring.boot.starter.security.version>
46                 <spring.boot.starter.test.version>1.5.8.RELEASE</spring.boot.starter.test.version>
47                 <spring.boot.configuration.processor.version>1.5.8.RELEASE</spring.boot.configuration.processor.version>
48                 <!-- All acumos.nexus.* are overridden by Jenkins settings -->
49                 <acumos.nexus.url>http://cognita-nexus01.eastus.cloudapp.azure.com:8081</acumos.nexus.url>
50                 <acumos.nexus.snapshot.path>repository/repo_cognita_platform_maven_snapshots</acumos.nexus.snapshot.path>
51                 <acumos.nexus.release.path>repository/repo_cognita_platform_maven</acumos.nexus.release.path>
52         </properties>
53
54         <repositories>
55                 <repository>
56                         <id>acumos-snapshots</id>
57                         <name>acumos-repository-snapshots</name>
58                         <url>${acumos.nexus.url}/${acumos.nexus.snapshot.path}</url>
59                 </repository>
60                 <repository>
61                         <id>acumos-releases</id>
62                         <name>acumos-repository-releases</name>
63                         <url>${acumos.nexus.url}/${acumos.nexus.release.path}</url>
64                 </repository>
65                 <repository>
66                         <id>onap-snapshots</id>
67                         <name>ONAP Snapshot Repository</name>
68                         <url>${onap.nexus.url}/${onap.nexus.snapshot.path}</url>
69                 </repository>
70                 <repository>
71                         <id>onap-releases</id>
72                         <name>ONAP Release Repository</name>
73                         <url>${onap.nexus.url}/${onap.nexus.release.path}</url>
74                 </repository>
75         </repositories>
76
77         <dependencies>
78                 <dependency>
79               <groupId>org.json</groupId>
80               <artifactId>json</artifactId>
81               <version>20160212</version>
82             </dependency>
83                 <dependency>
84                         <groupId>org.slf4j</groupId>
85                         <artifactId>slf4j-api</artifactId>
86                         <version>${slf4j.version}</version>
87                 </dependency>
88                 <dependency>
89                         <groupId>ch.qos.logback</groupId>
90                         <artifactId>logback-classic</artifactId>
91                         <version>${logback.version}</version>
92                 </dependency>
93                 <dependency>
94                         <groupId>ch.qos.logback</groupId>
95                         <artifactId>logback-core</artifactId>
96                         <version>${logback.version}</version>
97                 </dependency>
98                 <!--
99                 <dependency>
100                         <groupId>org.acumos</groupId>
101                         <artifactId>acumos-docker-client</artifactId>
102                         <version>1.0.0-SNAPSHOT</version>
103                 </dependency>
104                 -->
105                 <dependency>
106                         <groupId>org.acumos</groupId>
107                         <artifactId>acumos-nexus-client</artifactId>
108                         <version>1.10.9</version>
109                 </dependency>
110                 <dependency>
111         <groupId>org.springframework.boot</groupId>
112                 <artifactId>spring-boot-starter-security</artifactId>
113                         <version>${spring.boot.starter.security.version}</version>
114                 </dependency>
115                 <dependency>
116                         <groupId>org.springframework.boot</groupId>
117                         <artifactId>spring-boot-starter-web</artifactId>
118                         <version>${spring.boot.starter.web.version}</version>
119                 </dependency>
120                 
121                 <dependency>
122                         <groupId>org.springframework.boot</groupId>
123                         <artifactId>spring-boot-starter-test</artifactId>
124                         <version>${spring.boot.starter.test.version}</version>
125                         <scope>test</scope>
126                 </dependency>
127                 <dependency>
128                         <groupId>org.springframework.boot</groupId>
129                         <artifactId>spring-boot-configuration-processor</artifactId>
130                         <version>${spring.boot.configuration.processor.version}</version>
131                         <optional>true</optional>
132                 </dependency>
133                 <dependency>
134                     <groupId>org.apache.httpcomponents</groupId>
135                     <artifactId>httpclient</artifactId>
136                     <version>4.5</version>
137                 </dependency>
138                 <dependency>
139         <groupId>org.springframework.shell</groupId>
140         <artifactId>spring-shell</artifactId>
141         <version>1.2.0.RELEASE</version>
142                 </dependency>
143                 <dependency>
144                         <groupId>org.acumos.common-dataservice</groupId>
145                         <artifactId>cmn-data-svc-client</artifactId>
146                         <version>1.9.0-SNAPSHOT</version>
147                 </dependency>
148                 <dependency>
149                         <groupId>io.springfox</groupId>
150                         <artifactId>springfox-swagger2</artifactId>
151                         <version>2.6.1</version>
152                 </dependency>
153                 <dependency>
154                         <groupId>io.springfox</groupId>
155                         <artifactId>springfox-swagger-ui</artifactId>
156                         <version>2.6.1</version>
157                 </dependency>
158                 <dependency>
159                         <groupId>com.att.eelf</groupId>
160                         <artifactId>eelf-core</artifactId>
161                         <version>${eelf.version}</version>
162                 </dependency>
163                 <dependency>
164                         <groupId>javax.inject</groupId>
165                         <artifactId>javax.inject</artifactId>
166                         <version>1</version>
167                 </dependency>
168                 <dependency>
169                         <groupId>io.jsonwebtoken</groupId>
170                         <artifactId>jjwt</artifactId>
171                         <version>0.6.0</version>
172                 </dependency>
173                 <dependency>
174                 <groupId>org.python</groupId>
175                 <artifactId>jython-standalone</artifactId>
176                 <version>2.7.1-rc3</version>
177                 </dependency>
178                 <dependency>
179                         <groupId>junit</groupId>
180                         <artifactId>junit</artifactId>
181                         <version>3.8.1</version>
182                         <scope>test</scope>
183                 </dependency>
184                 <dependency>
185                 <groupId>commons-cli</groupId>
186                 <artifactId>commons-cli</artifactId>
187                 <version>1.2</version>
188                 </dependency>
189                 <dependency>
190                 <groupId>org.apache.commons</groupId>
191                 <artifactId>commons-lang3</artifactId>
192                 <version>3.6</version>
193                 </dependency>
194         </dependencies>
195         
196         <build>
197                 <plugins>
198                         <plugin>
199                                 <groupId>org.apache.maven.plugins</groupId>
200                                 <artifactId>maven-compiler-plugin</artifactId>
201                                 <version>3.0</version>
202                                 <configuration>
203                                         <source>1.8</source>
204                                         <target>1.8</target>
205                                 </configuration>
206                         </plugin>
207                         <plugin>
208                                 <groupId>org.apache.maven.plugins</groupId>
209                                 <artifactId>maven-jar-plugin</artifactId>
210                                 <configuration>
211                                         <archive>
212                                                 <manifest>
213                                                         <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
214                                                 </manifest>
215                                                 <manifestEntries>
216                                                         <Build-Number>${project.version}.${build.number}</Build-Number>
217                                                         <Build-Time>${maven.build.timestamp}</Build-Time>
218                                                 </manifestEntries>
219                                         </archive>
220                                 </configuration>
221                         </plugin>
222                         <plugin>
223                                 <groupId>org.springframework.boot</groupId>
224                                 <artifactId>spring-boot-maven-plugin</artifactId>
225                                 <executions>
226                                         <execution>
227                                                 <goals>
228                                                         <goal>repackage</goal>
229                                                 </goals>
230                                         </execution>
231                                 </executions>
232                         </plugin>
233      <!--  <plugin>
234         <groupId>org.apache.maven.plugins</groupId>
235         <artifactId>maven-dependency-plugin</artifactId>
236         <version>2.10</version>
237         <executions>
238           <execution>
239             <id>copy-dependencies</id>
240             <phase>package</phase>
241             <goals>
242               <goal>copy-dependencies</goal>
243             </goals>
244             <configuration>
245               <outputDirectory>${project.build.directory}/deps</outputDirectory>
246               <overWriteReleases>false</overWriteReleases>
247               <overWriteSnapshots>false</overWriteSnapshots>
248               <overWriteIfNewer>true</overWriteIfNewer>
249             </configuration>
250           </execution>
251         </executions>
252       </plugin> -->
253                         <plugin>
254                                 <groupId>io.fabric8</groupId>
255                                 <artifactId>docker-maven-plugin</artifactId>
256                                 <version>0.21.0</version>
257                                 <configuration>
258                                         <verbose>true</verbose>
259                                         <dockerHost>${docker.host.url}</dockerHost>
260                                         <registry>${docker.registry.url}</registry>
261                                         <authConfig>
262                                                 <username>${docker.registry.login}</username>
263                                                 <password>${docker.registry.password}</password>
264                                         </authConfig>
265                                         <images>
266                                                 <image>
267                                                         <name>federation-gateway:${project.version}</name>
268                                                         <build>
269                                                                 <!-- This is the same FROM used in a Dockerfile -->
270                                                                 <!-- <from>openjdk:8-jdk</from> -->
271                                                                 <from>frolvlad/alpine-oraclejdk8:slim</from>
272                                                                 <assembly>
273                                                                         <inline>
274                                                                                 <files>
275                                                                                         <file>
276                                                                                                 <source>application.properties.template</source>
277                                                                                                 <outputDirectory />
278                                                                                                 <destName>application.properties</destName>
279                                                                                         </file>
280                                                                                         <file>
281                                                                                                 <source>src/test/resourcecs/acumosa.pkcs12</source>
282                                                                                                 <outputDirectory />
283                                                                                                 <destName>acumosa.pkcs12</destName>
284                                                                                         </file>
285                                                                                         <file>
286                                                                                                 <source>src/test/resources/acumosb.pkcs12</source>
287                                                                                                 <outputDirectory />
288                                                                                                 <destName>acumosb.pkcs12</destName>
289                                                                                         </file>
290                                                                                         <file>
291                                                                                                 <source>src/test/resources/acumosTrustStore.jks</source>
292                                                                                                 <outputDirectory />
293                                                                                                 <destName>acumosTrustStore.jks</destName>
294                                                                                         </file>
295                                                                                         <file>
296                                                                                                 <source>target/${project.artifactId}-${project.version}.${project.packaging}</source>
297                                                                                                 <outputDirectory />
298                                                                                         </file>
299                                                                                 </files>
300                                                                         </inline>
301                                                                 </assembly>
302                                                                 <!-- This is the same CMD used in a Dockerfile -->
303                                                                 <cmd>
304                                                                         <shell>cd /maven; java -Djava.security.egd=file:/dev/./urandom -jar ${project.artifactId}-${project.version}.${project.packaging}</shell>
305                                                                 </cmd>
306                                                         </build>
307                                                 </image>
308                                         </images>
309                                 </configuration>
310                         </plugin>
311                         <plugin>
312                                 <groupId>org.codehaus.mojo</groupId>
313                                 <artifactId>license-maven-plugin</artifactId>
314                                 <version>1.14</version>
315                                 <configuration>
316                                         <licenseName>acumos</licenseName>
317                                         <licenseResolver>${project.baseUri}/src/license</licenseResolver>
318                                         <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
319                                         <processStartTag>===============LICENSE_START=======================================================</processStartTag>
320                                         <processEndTag>===============LICENSE_END=========================================================</processEndTag>
321                                         <sectionDelimiter>===================================================================================</sectionDelimiter>
322                                         <inceptionYear>2017</inceptionYear>
323                                         <organizationName>AT&amp;T Intellectual Property &amp; Tech Mahindra. All rights reserved.</organizationName>
324                                         <projectName>Acumos</projectName>
325                                         <canUpdateCopyright>true</canUpdateCopyright>
326                                         <canUpdateDescription>true</canUpdateDescription>
327                                         <canUpdateLicense>true</canUpdateLicense>
328                                         <emptyLineAfterHeader>true</emptyLineAfterHeader>
329                                         <includes>
330                                                 <include>**/*.java</include>
331                                         </includes>
332                                 </configuration>
333 <!--
334                                 <executions>
335                                         <execution>
336                                                 <id>first</id>
337                                                 <goals>
338                                                         <goal>update-file-header</goal>
339                                                 </goals>
340                                                 <phase>process-sources</phase>
341                                         </execution>
342                                 </executions>
343 -->
344                         </plugin>
345                         <plugin>
346                                 <groupId>org.jacoco</groupId>
347                                 <artifactId>jacoco-maven-plugin</artifactId>
348                                 <version>0.7.6.201602180812</version>
349                                 <executions>
350                                         <execution>
351                                                 <id>default-prepare-agent</id>
352                                                 <goals>
353                                                         <goal>prepare-agent</goal>
354                                                 </goals>
355                                         </execution>
356                                         <execution>
357                                                 <id>default-report</id>
358                                                 <phase>prepare-package</phase>
359                                                 <goals>
360                                                         <goal>report</goal>
361                                                 </goals>
362                                         </execution>
363                                 </executions>
364                         </plugin>
365
366                 </plugins>
367         </build>
368         <distributionManagement>
369                 <snapshotRepository>
370                         <!-- must match ID in Jenkins settings -->
371                         <id>acumos-nexus</id>
372                         <name>acumos-repository-snapshots</name>
373                         <url>${acumos.nexus.url}/${acumos.nexus.snapshot.path}</url>
374                 </snapshotRepository>
375                 <repository>
376                         <!-- must match ID in Jenkins settings -->
377                         <id>acumos-nexus</id>
378                         <name>acumos-repository-releases</name>
379                         <url>${acumos.nexus.url}/${acumos.nexus.release.path}</url>
380                 </repository>
381         </distributionManagement>
382 </project>