7f6f3d8716204931f87ad39485028d4ad1736a11
[federation.git] / gateway / pom.xml
1 <?xml version="1.0"?>
2         <!--<![CDATA[
3         ===============LICENSE_START=======================================================
4         Acumos
5         ===================================================================================
6         Copyright (C) 2017-2020 AT&T Intellectual Property & Tech Mahindra. All rights reserved.
7         Modifications Copyright (C) 2020 Nordix Foundation.
8         ===================================================================================
9         This Acumos software file is distributed by AT&T and Tech Mahindra
10         under the Apache License, Version 2.0 (the "License");
11         you may not use this file except in compliance with the License.
12         You may obtain a copy of the License at
13
14         http://www.apache.org/licenses/LICENSE-2.0
15
16         This file is distributed on an "AS IS" BASIS,
17         WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18         See the License for the specific language governing permissions and
19         limitations under the License.
20         ===============LICENSE_END=========================================================
21         ]]>-->
22 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23         <modelVersion>4.0.0</modelVersion>
24         <parent>
25                 <groupId>org.acumos.federation</groupId>
26                 <artifactId>federation-parent</artifactId>
27                 <version>0</version>
28         </parent>
29         <groupId>org.acumos.federation</groupId>
30         <artifactId>gateway</artifactId>
31         <version>3.2.2-SNAPSHOT</version>
32         <name>Federation Gateway</name>
33         <description>Federated Acumos Interface for inter-acumos communication</description>
34         <properties>
35                 <!-- skip the deploy-jar-to-nexus step -->
36                 <maven.install.skip>true</maven.install.skip>
37                 <maven.deploy.skip>true</maven.deploy.skip>
38                 <!-- Stand-alone RESTFul application -->
39                 <start-class>org.acumos.federation.gateway.Application</start-class>
40                 <!-- dependencies version -->
41                 <acumos-fgw-client.version>${project.version}</acumos-fgw-client.version>
42                 <docker-java.version>3.1.2</docker-java.version>
43                 <springfox.version>2.9.2</springfox.version>
44                 <guava.version>20.0</guava.version>
45                 <!-- Not supplied to all jobs; e.g., Javadoc -->
46                 <docker.pull.registry>nexus3.acumos.org:10001</docker.pull.registry>
47                 <!-- Supplied by Jenkins -->
48                 <docker.push.registry>${env.NEXUS3_PUSH_REGISTRY}</docker.push.registry>
49                 <maven.compiler.release>11</maven.compiler.release>
50         </properties>
51         <!-- Dependency/plugin versions are inherited from parent pom -->
52         <dependencies>
53                 <dependency>
54                         <groupId>org.acumos.federation</groupId>
55                         <artifactId>acumos-fgw-client</artifactId>
56                         <version>${acumos-fgw-client.version}</version>
57                 </dependency>
58                 <dependency>
59                         <!-- resolve conflicting transitive dependencies -->
60                         <groupId>com.google.guava</groupId>
61                         <artifactId>guava</artifactId>
62                         <version>${guava.version}</version>
63                 </dependency>
64                 <dependency>
65                         <groupId>com.github.docker-java</groupId>
66                         <artifactId>docker-java</artifactId>
67                         <version>${docker-java.version}</version>
68                 </dependency>
69                 <dependency>
70                         <groupId>io.springfox</groupId>
71                         <artifactId>springfox-swagger2</artifactId>
72                         <version>${springfox.version}</version>
73                 </dependency>
74                 <dependency>
75                         <groupId>org.springframework.boot</groupId>
76                         <artifactId>spring-boot-starter</artifactId>
77                 </dependency>
78                 <dependency>
79                         <groupId>org.springframework.boot</groupId>
80                         <artifactId>spring-boot-starter-json</artifactId>
81                 </dependency>
82                 <dependency>
83                         <groupId>org.springframework.boot</groupId>
84                         <artifactId>spring-boot-starter-web</artifactId>
85                 </dependency>
86                 <dependency>
87                         <groupId>org.springframework.boot</groupId>
88                         <artifactId>spring-boot-configuration-processor</artifactId>
89                 </dependency>
90                 <dependency>
91                         <groupId>org.springframework.boot</groupId>
92                         <artifactId>spring-boot-starter-security</artifactId>
93                 </dependency>
94                 <dependency>
95                         <groupId>org.acumos.security-verification</groupId>
96                         <artifactId>security-verification-client</artifactId>
97                         <version>1.2.0</version>
98                 </dependency>
99                 <dependency>
100                         <groupId>org.acumos.license-manager</groupId>
101                         <artifactId>license-manager-client-library</artifactId>
102                         <version>1.4.4</version>
103                 </dependency>
104                 <dependency>
105                         <groupId>org.acumos.acumos-nexus-client</groupId>
106                         <artifactId>acumos-nexus-client</artifactId>
107                         <version>2.2.1</version>
108                 </dependency>
109                 <!-- Compile time only dependencies -->
110                 <dependency>
111                         <groupId>org.projectlombok</groupId>
112                         <artifactId>lombok</artifactId>
113                         <scope>provided</scope>
114                 </dependency>
115                 <!-- Test dependencies -->
116                 <dependency>
117                         <groupId>org.acumos.federation</groupId>
118                         <artifactId>acumos-fgw-client-test</artifactId>
119                         <scope>test</scope>
120                 </dependency>
121                 <dependency>
122                         <groupId>junit</groupId>
123                         <artifactId>junit</artifactId>
124                         <scope>test</scope>
125                 </dependency>
126                 <!-- Test runtime dependencies -->
127                 <dependency>
128                         <groupId>org.springframework.boot</groupId>
129                         <artifactId>spring-boot-starter-test</artifactId>
130                         <exclusions>
131                                 <exclusion>
132                                         <groupId>com.vaadin.external.google</groupId>
133                                         <artifactId>android-json</artifactId>
134                                 </exclusion>
135                         </exclusions>
136                         <scope>test</scope>
137                 </dependency>
138         </dependencies>
139         <build>
140                 <plugins>
141                         <plugin>
142                                 <groupId>org.projectlombok</groupId>
143                                 <artifactId>lombok-maven-plugin</artifactId>
144                         </plugin>
145                         <plugin>
146                                 <groupId>org.apache.maven.plugins</groupId>
147                                 <artifactId>maven-jar-plugin</artifactId>
148                                 <configuration>
149                                         <archive>
150                                                 <manifest>
151                                                         <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
152                                                 </manifest>
153                                                 <manifestEntries>
154                                                         <Implementation-Version>${project.version}-b${build.number}</Implementation-Version>
155                                                 </manifestEntries>
156                                         </archive>
157                                 </configuration>
158                         </plugin>
159                         <plugin>
160                                 <groupId>org.springframework.boot</groupId>
161                                 <artifactId>spring-boot-maven-plugin</artifactId>
162                                 <executions>
163                                         <execution>
164                                                 <goals>
165                                                         <goal>repackage</goal>
166                                                 </goals>
167                                         </execution>
168                                 </executions>
169                         </plugin>
170                         <plugin>
171                                 <groupId>org.apache.maven.plugins</groupId>
172                                 <artifactId>maven-deploy-plugin</artifactId>
173                                 <configuration>
174                                         <skip>true</skip>
175                                 </configuration>
176                         </plugin>
177                         <plugin>
178                                 <groupId>io.fabric8</groupId>
179                                 <artifactId>docker-maven-plugin</artifactId>
180                                 <version>0.28.0</version>
181                                 <configuration>
182                                         <verbose>true</verbose>
183                                         <pullRegistry>${docker.pull.registry}</pullRegistry>
184                                         <pushRegistry>${docker.push.registry}</pushRegistry>
185                                         <images>
186                                                 <image>
187                                                         <name>acumos/federation-gateway:${project.version}</name>
188                                                         <build>
189                                                                 <from>adoptopenjdk/openjdk11-openj9:alpine-jre</from>
190                                                                 <tags>
191                                                                         <tag>${project.version}-b${build.number}</tag>
192                                                                 </tags>
193                                                                 <assembly>
194                                                                         <descriptorRef>artifact</descriptorRef>
195                                                                 </assembly>
196                                                                 <runCmds>
197                                                                         <runCmd>mkdir /maven/logs</runCmd>
198                                                                         <runCmd>chmod -R 777 /maven</runCmd>
199                                                                 </runCmds>
200                                                                 <cmd>
201                                                                         <shell><![CDATA[cd /maven; java -Xms256m -Xmx2g -Djava.security.egd=file:/dev/./urandom -jar ${project.artifactId}-${project.version}.${project.packaging}]]></shell>
202                                                                 </cmd>
203                                                         </build>
204                                                 </image>
205                                         </images>
206                                 </configuration>
207                                 <executions>
208                                         <execution>
209                                                 <goals>
210                                                         <!-- build is bound to install phase -->
211                                                         <goal>build</goal>
212                                                         <!-- push is bound to deploy phase -->
213                                                         <goal>push</goal>
214                                                 </goals>
215                                         </execution>
216                                 </executions>
217                         </plugin>
218                         <plugin>
219                                 <groupId>org.jacoco</groupId>
220                                 <artifactId>jacoco-maven-plugin</artifactId>
221                         </plugin>
222                 </plugins>
223         </build>
224 </project>