Use release versions
[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                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
22                 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
23                 <!-- Stand-alone RESTFul application -->
24                 <start-class>org.acumos.federation.gateway.Application</start-class>
25                 <!-- Jenkins invokes mvn with argument -Dbuild.number=${BUILD_NUMBER} -->
26                 <build.number>0</build.number>
27                 <!-- tests require database to be running -->
28                 <skipTests>false</skipTests>
29                 <!-- dependencies versions -->
30                 <slf4j.version>1.7.25</slf4j.version>
31                 <logback.version>1.2.3</logback.version>
32                 <spring.boot.devtools.version>1.5.8.RELEASE</spring.boot.devtools.version>
33                 <spring.boot.starter.web.version>1.5.8.RELEASE</spring.boot.starter.web.version>
34                 <spring.boot.starter.security.version>1.5.8.RELEASE</spring.boot.starter.security.version>
35                 <spring.boot.starter.test.version>1.5.8.RELEASE</spring.boot.starter.test.version>
36                 <spring.boot.configuration.processor.version>1.5.8.RELEASE</spring.boot.configuration.processor.version>
37                 <!-- Not supplied to all jobs; e.g., Javadoc -->
38                 <docker.pull.registry>nexus3.acumos.org:10001</docker.pull.registry>
39                 <!-- Supplied by Jenkins -->
40                 <docker.push.registry>${env.NEXUS3_PUSH_REGISTRY}</docker.push.registry>
41                 <maven.build.timestamp.format>yyyy.MM.dd_HH.mm</maven.build.timestamp.format>
42         </properties>
43
44         <!-- Some dependencies are specific to Acumos, but this POM defines no repositories 
45                 section. The Jenkins server specifies Acumos repositories. Developers should 
46                 ensure their ~/.m2/settings.xml file has the following URLs in both the repositories 
47                 and pluginRepositories sections or in a profile: https://nexus.acumos.org/content/repositories/snapshots/ 
48                 https://nexus.acumos.org/content/repositories/releases/ -->
49
50         <dependencies>
51                 <dependency>
52                         <groupId>org.acumos.acumos-nexus-client</groupId>
53                         <artifactId>acumos-nexus-client</artifactId>
54                         <version>2.0.0</version>
55                 </dependency>
56                 <dependency>
57                         <groupId>org.acumos.common-dataservice</groupId>
58                         <artifactId>cmn-data-svc-client</artifactId>
59                         <version>1.12.0</version>
60                 </dependency>
61                 <dependency>
62                         <groupId>org.json</groupId>
63                         <artifactId>json</artifactId>
64                         <version>20160212</version>
65                 </dependency>
66                 <dependency>
67                         <groupId>org.slf4j</groupId>
68                         <artifactId>slf4j-api</artifactId>
69                         <!-- spring sets the <version>${slf4j.version}</version> -->
70                 </dependency>
71                 <dependency>
72                         <groupId>ch.qos.logback</groupId>
73                         <artifactId>logback-classic</artifactId>
74                         <!-- spring sets the <version>${logback.version}</version> -->
75                 </dependency>
76                 <dependency>
77                         <groupId>ch.qos.logback</groupId>
78                         <artifactId>logback-core</artifactId>
79                         <!-- spring sets the <version>${logback.version}</version> -->
80                 </dependency>
81                 <dependency>
82                         <groupId>org.springframework.boot</groupId>
83                         <artifactId>spring-boot-starter-security</artifactId>
84                         <!-- spring sets the ${spring.boot.starter.security.version}</version> -->
85                 </dependency>
86                 <dependency>
87                         <groupId>org.springframework.boot</groupId>
88                         <artifactId>spring-boot-starter-web</artifactId>
89                         <!-- spring sets the <version>${spring.boot.starter.web.version}</version> -->
90                 </dependency>
91                 <dependency>
92                         <groupId>org.springframework.boot</groupId>
93                         <artifactId>spring-boot-configuration-processor</artifactId>
94                         <!-- spring sets the <version>${spring.boot.configuration.processor.version}</version> -->
95                         <optional>true</optional>
96                 </dependency>
97                 <dependency>
98                         <groupId>org.apache.httpcomponents</groupId>
99                         <artifactId>httpclient</artifactId>
100                         <!-- spring sets the <version>4.5</version> -->
101                 </dependency>
102                 <dependency>
103                         <groupId>org.springframework.shell</groupId>
104                         <artifactId>spring-shell</artifactId>
105                         <version>1.2.0.RELEASE</version>
106                 </dependency>
107                 <dependency>
108                         <groupId>io.springfox</groupId>
109                         <artifactId>springfox-swagger2</artifactId>
110                         <version>2.6.1</version>
111                 </dependency>
112                 <dependency>
113                         <groupId>io.springfox</groupId>
114                         <artifactId>springfox-swagger-ui</artifactId>
115                         <version>2.6.1</version>
116                 </dependency>
117                 <dependency>
118                         <groupId>com.att.eelf</groupId>
119                         <artifactId>eelf-core</artifactId>
120                         <version>1.0.0</version>
121                 </dependency>
122                 <dependency>
123                         <groupId>javax.inject</groupId>
124                         <artifactId>javax.inject</artifactId>
125                         <version>1</version>
126                 </dependency>
127                 <dependency>
128                         <groupId>io.jsonwebtoken</groupId>
129                         <artifactId>jjwt</artifactId>
130                         <version>0.6.0</version>
131                 </dependency>
132                 <dependency>
133                         <groupId>org.python</groupId>
134                         <artifactId>jython-standalone</artifactId>
135                         <version>2.7.1-rc3</version>
136                 </dependency>
137                 <dependency>
138                         <groupId>junit</groupId>
139                         <artifactId>junit</artifactId>
140                         <!-- spring sets the <version>3.8.1</version> -->
141                         <scope>test</scope>
142                 </dependency>
143                 <dependency>
144                         <groupId>commons-cli</groupId>
145                         <artifactId>commons-cli</artifactId>
146                         <version>1.2</version>
147                 </dependency>
148                 <dependency>
149                         <groupId>org.apache.commons</groupId>
150                         <artifactId>commons-lang3</artifactId>
151                         <version>3.6</version>
152                 </dependency>
153                 <dependency>
154                         <groupId>org.aspectj</groupId>
155                         <artifactId>aspectjweaver</artifactId>
156                         <version>1.8.13</version>
157                 </dependency>
158                 <dependency>
159                         <groupId>org.assertj</groupId>
160                         <artifactId>assertj-core</artifactId>
161                         <!-- spring sets the <version>3.8.0</version> -->
162                         <scope>test</scope>
163                 </dependency>
164                 <dependency>
165                         <groupId>org.springframework.boot</groupId>
166                         <artifactId>spring-boot-starter-test</artifactId>
167                         <!-- spring sets the <version>1.5.3.RELEASE</version> -->
168                         <scope>test</scope>
169                 </dependency>
170         </dependencies>
171
172         <build>
173                 <plugins>
174                         <plugin>
175                                 <groupId>org.apache.maven.plugins</groupId>
176                                 <artifactId>maven-compiler-plugin</artifactId>
177                                 <!-- spring sets the <version>3.0</version> -->
178                                 <configuration>
179                                         <source>1.8</source>
180                                         <target>1.8</target>
181                                 </configuration>
182                         </plugin>
183                         <!-- Add the build number to the jar manifest. Spring-Boot uses a complex 
184                                 packaging process that makes access to the original Manifest.MF very difficult. 
185                                 However, Java provides access to the implementation version for a package, 
186                                 so cram the build number into there. -->
187                         <plugin>
188                                 <groupId>org.apache.maven.plugins</groupId>
189                                 <artifactId>maven-jar-plugin</artifactId>
190                                 <configuration>
191                                         <archive>
192                                                 <manifest>
193                                                         <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
194                                                 </manifest>
195                                                 <manifestEntries>
196                                                         <Implementation-Version>${project.version}-b${build.number}</Implementation-Version>
197                                                 </manifestEntries>
198                                         </archive>
199                                 </configuration>
200                                 <executions>
201                                         <execution>
202                                                 <goals>
203                                                         <goal>test-jar</goal>
204                                                 </goals>
205                                         </execution>
206                                 </executions>
207                         </plugin>
208                         <plugin>
209                                 <groupId>org.springframework.boot</groupId>
210                                 <artifactId>spring-boot-maven-plugin</artifactId>
211                                 <executions>
212                                         <execution>
213                                                 <goals>
214                                                         <goal>repackage</goal>
215                                                 </goals>
216                                         </execution>
217                                 </executions>
218                         </plugin>
219                         <plugin>
220                                 <groupId>org.apache.maven.plugins</groupId>
221                                 <artifactId>maven-dependency-plugin</artifactId>
222                                 <version>2.10</version>
223                                 <executions>
224                                         <execution>
225                                                 <id>copy-dependencies</id>
226                                                 <phase>package</phase>
227                                                 <goals>
228                                                         <goal>copy-dependencies</goal>
229                                                 </goals>
230                                                 <configuration>
231                                                         <outputDirectory>${project.build.directory}/deps</outputDirectory>
232                                                         <overWriteReleases>true</overWriteReleases>
233                                                         <overWriteSnapshots>true</overWriteSnapshots>
234                                                         <overWriteIfNewer>true</overWriteIfNewer>
235                                                 </configuration>
236                                         </execution>
237                                 </executions>
238                         </plugin>
239                         <!-- No need to deploy Spring super-boot -->
240                         <plugin>
241                                 <groupId>org.apache.maven.plugins</groupId>
242                                 <artifactId>maven-deploy-plugin</artifactId>
243                                 <!-- Spring sets the <version>2.8</version> -->
244                                 <configuration>
245                                         <skip>true</skip>
246                                 </configuration>
247                         </plugin>
248                         <plugin>
249                                 <groupId>io.fabric8</groupId>
250                                 <artifactId>docker-maven-plugin</artifactId>
251                                 <version>0.23.0</version>
252                                 <configuration>
253                                         <verbose>true</verbose>
254                                         <dockerHost>${docker.host.url}</dockerHost>
255                                         <registry>${docker.registry.url}</registry>
256                                         <authConfig>
257                                                 <username>${docker.registry.login}</username>
258                                                 <password>${docker.registry.password}</password>
259                                         </authConfig>
260                                         <images>
261                                                 <image>
262                                                         <!-- Specify a tag to avoid default tag "latest" -->
263                                                         <name>federation-gateway:${project.version}</name>
264                                                         <build>
265                                                                 <from>frolvlad/alpine-oraclejdk8:slim</from>
266                                                                 <tags>
267                                                                         <!-- Add tag with build number -->
268                                                                         <tag>${project.version}-b${build.number}</tag>
269                                                                 </tags>
270                                                                 <assembly>
271                                                                         <inline>
272                                                                                 <files>
273                                                                                         <file>
274                                                                                                 <source>application.properties.template</source>
275                                                                                                 <outputDirectory />
276                                                                                                 <destName>application.properties</destName>
277                                                                                         </file>
278                                                                                         <file>
279                                                                                                 <source>src/test/resources/ist-acumosa.pkcs12</source>
280                                                                                                 <outputDirectory />
281                                                                                                 <destName>ist-acumosa.pkcs12</destName>
282                                                                                         </file>
283                                                                                         <file>
284                                                                                                 <source>src/test/resources/ist-acumosb.pkcs12</source>
285                                                                                                 <outputDirectory />
286                                                                                                 <destName>ist-acumosb.pkcs12</destName>
287                                                                                         </file>
288                                                                                         <file>
289                                                                                                 <source>src/test/resources/acumosTrustStore.jks</source>
290                                                                                                 <outputDirectory />
291                                                                                                 <destName>acumosTrustStore.jks</destName>
292                                                                                         </file>
293                                                                                         <file>
294                                                                                                 <source>target/${project.artifactId}-${project.version}.${project.packaging}</source>
295                                                                                                 <outputDirectory />
296                                                                                         </file>
297                                                                                 </files>
298                                                                         </inline>
299                                                                 </assembly>
300                                                                 <!-- This is the same CMD used in a Dockerfile -->
301                                                                 <cmd>
302                                                                         <!-- CDATA prevents Eclipse formatter from breaking line -->
303                                                                         <shell><![CDATA[cd /maven; java -Djavax.net.debug=ssl -Djava.security.egd=file:/dev/./urandom -jar ${project.artifactId}-${project.version}.${project.packaging}]]></shell>
304                                                                 </cmd>
305                                                         </build>
306                                                 </image>
307                                                 <image>
308                                                         <!-- Specify a tag to avoid default tag "latest" -->
309                                                         <name>federation-gateway-test:${project.version}</name>
310                                                         <build>
311                                                                 <from>frolvlad/alpine-oraclejdk8:slim</from>
312                                                                 <tags>
313                                                                         <!-- Add tag with build number -->
314                                                                         <tag>${project.version}-b${build.number}</tag>
315                                                                 </tags>
316                                                                 <assembly>
317                                                                         <inline>
318                                                                                 <files>
319                                                                                         <file>
320                                                                                                 <source>application.properties.template</source>
321                                                                                                 <outputDirectory />
322                                                                                                 <destName>application.properties</destName>
323                                                                                         </file>
324                                                                                         <!-- need the following two for server config -->
325                                                                                         <file>
326                                                                                                 <source>src/test/resources/acumosa.pkcs12</source>
327                                                                                                 <outputDirectory />
328                                                                                                 <destName>acumosa.pkcs12</destName>
329                                                                                         </file>
330                                                                                         <file>
331                                                                                                 <source>src/test/resources/acumosb.pkcs12</source>
332                                                                                                 <outputDirectory />
333                                                                                                 <destName>acumosb.pkcs12</destName>
334                                                                                         </file>
335                                                                                         <file>
336                                                                                                 <source>src/test/resources/acumosTrustStore.jks</source>
337                                                                                                 <outputDirectory />
338                                                                                                 <destName>acumosTrustStore.jks</destName>
339                                                                                         </file>
340                                                                                         <file>
341                                                                                                 <source>target/${project.artifactId}-${project.version}.${project.packaging}</source>
342                                                                                                 <outputDirectory />
343                                                                                         </file>
344                                                                                         <file>
345                                                                                                 <source>target/${project.artifactId}-${project.version}-tests.${project.packaging}</source>
346                                                                                                 <outputDirectory />
347                                                                                         </file>
348                                                                                 </files>
349                                                                                 <fileSets>
350                                                                                         <fileSet>
351                                                                                                 <directory>${project.build.directory}/deps/</directory>
352                                                                                                 <outputDirectory>/libs/</outputDirectory>
353                                                                                                 <includes>
354                                                                                                         <include>*</include>
355                                                                                                 </includes>
356                                                                                                 <fileMode>0755</fileMode>
357                                                                                         </fileSet>
358                                                                                 </fileSets>
359                                                                         </inline>
360                                                                 </assembly>
361                                                                 <cmd>
362                                                                         <!-- CDATA prevents Eclipse formatter from breaking line -->
363                                                                         <shell><![CDATA[cd /maven; java -cp ${project.artifactId}-${project.version}.${project.packaging}:${project.artifactId}-${project.version}-tests.${project.packaging}:/libs/* -Djavax.net.debug=ssl:handshake -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>
364                                                                         <!-- <shell>cd /maven; java -cp ${project.artifactId}-${project.version}.${project.packaging}:${project.artifactId}-${project.version}-tests.${project.packaging}:/libs/* 
365                                                                                 -Djavax.net.debug=ssl:handshake -Djavax.net.ssl.trustStore=acumosTrustStore.jks 
366                                                                                 -Djavax.net.ssl.trustStorePassword=acumos -Djava.security.egd=file:/dev/./urandom 
367                                                                                 org.springframework.boot.loader.PropertiesLauncher</shell> -->
368                                                                 </cmd>
369                                                         </build>
370                                                 </image>
371                                         </images>
372                                 </configuration>
373                                 <executions>
374                                         <execution>
375                                                 <goals>
376                                                         <!-- build is bound to install phase -->
377                                                         <goal>build</goal>
378                                                         <!-- push is bound to deploy phase -->
379                                                         <goal>push</goal>
380                                                 </goals>
381                                         </execution>
382                                 </executions>
383                         </plugin>
384                         <plugin>
385                                 <groupId>org.codehaus.mojo</groupId>
386                                 <artifactId>license-maven-plugin</artifactId>
387                                 <version>1.14</version>
388                                 <configuration>
389                                         <licenseName>acumos</licenseName>
390                                         <licenseResolver>${project.baseUri}/src/license</licenseResolver>
391                                         <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
392                                         <processStartTag>===============LICENSE_START=======================================================</processStartTag>
393                                         <processEndTag>===============LICENSE_END=========================================================</processEndTag>
394                                         <sectionDelimiter>===================================================================================</sectionDelimiter>
395                                         <inceptionYear>2017</inceptionYear>
396                                         <organizationName>AT&amp;T Intellectual Property &amp; Tech
397                                                 Mahindra. All rights reserved.</organizationName>
398                                         <projectName>Acumos</projectName>
399                                         <canUpdateCopyright>true</canUpdateCopyright>
400                                         <canUpdateDescription>true</canUpdateDescription>
401                                         <canUpdateLicense>true</canUpdateLicense>
402                                         <emptyLineAfterHeader>true</emptyLineAfterHeader>
403                                         <includes>
404                                                 <include>**/*.java</include>
405                                         </includes>
406                                 </configuration>
407                                 <!-- <executions> <execution> <id>first</id> <goals> <goal>update-file-header</goal> 
408                                         </goals> <phase>process-sources</phase> </execution> </executions> -->
409                         </plugin>
410                         <plugin>
411                                 <groupId>org.jacoco</groupId>
412                                 <artifactId>jacoco-maven-plugin</artifactId>
413                                 <version>0.7.9</version>
414                                 <executions>
415                                         <execution>
416                                                 <id>default-prepare-agent</id>
417                                                 <goals>
418                                                         <goal>prepare-agent</goal>
419                                                 </goals>
420                                         </execution>
421                                         <execution>
422                                                 <id>default-report</id>
423                                                 <phase>prepare-package</phase>
424                                                 <goals>
425                                                         <goal>report</goal>
426                                                 </goals>
427                                         </execution>
428                                 </executions>
429                         </plugin>
430
431                 </plugins>
432         </build>
433 </project>