[Babel] Use Spring Boot 1.5.15
[aai/babel.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3
4     ============LICENSE_START=======================================================
5     org.onap.aai
6     ================================================================================
7     Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
8     Copyright © 2017-2018 European Software Marketing Ltd.
9     ================================================================================
10     Licensed 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     Unless required by applicable law or agreed to in writing, software
17     distributed under the License is distributed on an "AS IS" BASIS,
18     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19     See the License for the specific language governing permissions and
20     limitations under the License.
21     ============LICENSE_END=========================================================
22
23 -->
24 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
26         <modelVersion>4.0.0</modelVersion>
27
28         <parent>
29                 <groupId>org.onap.oparent</groupId>
30                 <artifactId>oparent</artifactId>
31                 <version>1.1.0</version>
32                 <relativePath />
33         </parent>
34
35         <groupId>org.onap.aai</groupId>
36         <artifactId>babel</artifactId>
37         <version>1.3.0-SNAPSHOT</version>
38         <packaging>jar</packaging>
39
40         <name>aai-babel</name>
41         <description>ONAP AAI Babel Microservice</description>
42
43         <properties>
44                 <!-- Spring boot version -->
45                 <spring.boot.version>1.5.15.RELEASE</spring.boot.version>
46
47                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
48                 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
49                 <java.version>1.8</java.version>
50                 <docker.location>${basedir}/target</docker.location>
51                 <aai.schema.source.folder>onap/aai_schema</aai.schema.source.folder>
52                 <aai.schema.target.folder>${project.build.directory}/aai-schema</aai.schema.target.folder>
53
54                 <!-- Dependency Versions -->
55                 <common.logging.version>1.2.2</common.logging.version>
56                 <sdc.tosca.version>1.4.1</sdc.tosca.version>
57                 <commons.compress.version>1.16.1</commons.compress.version>
58                 <javax.ws.rs.version>2.1</javax.ws.rs.version>
59                 <mvn.jaxb2.version>0.13.2</mvn.jaxb2.version>
60                 <aai-schema.group.id>org.onap.aai.aai-common</aai-schema.group.id>
61                 <aai-schema.version>1.3.0-SNAPSHOT</aai-schema.version>
62                 <apache.lang3.version>3.7</apache.lang3.version>
63                 <aai.rest.client.version>1.2.1</aai.rest.client.version>
64                 <sdc.distribution.client.version>1.3.0</sdc.distribution.client.version>
65                 <xmlunit.version>1.6</xmlunit.version>
66                 <logback.version>1.2.3</logback.version>
67                 <guava.version>25.1-jre</guava.version>
68                 <antrun.version>1.8</antrun.version>
69         </properties>
70
71         <dependencyManagement>
72                 <dependencies>
73                         <dependency>
74                                 <!-- Import dependency management from Spring Boot -->
75                                 <groupId>org.springframework.boot</groupId>
76                                 <artifactId>spring-boot-dependencies</artifactId>
77                                 <version>${spring.boot.version}</version>
78                                 <type>pom</type>
79                                 <scope>import</scope>
80                         </dependency>
81                 </dependencies>
82         </dependencyManagement>
83
84         <dependencies>
85                 <dependency>
86                         <groupId>org.springframework.boot</groupId>
87                         <artifactId>spring-boot-starter-jetty</artifactId>
88                 </dependency>
89                 <dependency>
90                         <groupId>org.springframework.boot</groupId>
91                         <artifactId>spring-boot-starter-jersey</artifactId>
92                 </dependency>
93                 <dependency>
94                         <groupId>org.onap.aai.logging-service</groupId>
95                         <artifactId>common-logging</artifactId>
96                         <version>${common.logging.version}</version>
97                 </dependency>
98                 <dependency>
99                         <groupId>ch.qos.logback</groupId>
100                         <artifactId>logback-classic</artifactId>
101                         <version>${logback.version}</version><!--$NO-MVN-MAN-VER$-->
102                 </dependency>
103                 <dependency>
104                         <groupId>ch.qos.logback</groupId>
105                         <artifactId>logback-core</artifactId>
106                         <version>${logback.version}</version><!--$NO-MVN-MAN-VER$-->
107                 </dependency>
108
109                 <dependency>
110                         <groupId>commons-codec</groupId>
111                         <artifactId>commons-codec</artifactId>
112                 </dependency>
113                 <dependency>
114                         <groupId>org.apache.commons</groupId>
115                         <artifactId>commons-compress</artifactId>
116                         <version>${commons.compress.version}</version>
117                 </dependency>
118                 <dependency>
119                         <groupId>org.apache.commons</groupId>
120                         <artifactId>commons-lang3</artifactId>
121                         <version>${apache.lang3.version}</version>
122                 </dependency>
123                 <dependency>
124                         <groupId>javax.ws.rs</groupId>
125                         <artifactId>javax.ws.rs-api</artifactId>
126                         <version>${javax.ws.rs.version}</version>
127                 </dependency>
128                 <dependency>
129                         <groupId>org.codehaus.groovy</groupId>
130                         <artifactId>groovy-all</artifactId>
131                 </dependency>
132
133                 <dependency>
134                         <groupId>org.onap.sdc.sdc-tosca</groupId>
135                         <artifactId>sdc-tosca</artifactId>
136                         <version>${sdc.tosca.version}</version>
137                 </dependency>
138                 <dependency>
139                         <groupId>com.google.guava</groupId>
140                         <artifactId>guava</artifactId>
141                         <version>${guava.version}</version>
142                 </dependency>
143
144                 <dependency>
145                         <groupId>org.onap.aai</groupId>
146                         <artifactId>rest-client</artifactId>
147                         <version>${aai.rest.client.version}</version>
148                 </dependency>
149
150                 <!-- Testing -->
151                 <dependency>
152                         <groupId>org.springframework.boot</groupId>
153                         <artifactId>spring-boot-starter-test</artifactId>
154                         <scope>test</scope>
155                 </dependency>
156                 <dependency>
157                         <groupId>org.onap.sdc.sdc-distribution-client</groupId>
158                         <artifactId>sdc-distribution-client</artifactId>
159                         <version>${sdc.distribution.client.version}</version>
160                         <scope>test</scope>
161                 </dependency>
162                 <dependency>
163                         <groupId>xmlunit</groupId>
164                         <artifactId>xmlunit</artifactId>
165                         <version>${xmlunit.version}</version>
166                         <scope>test</scope>
167                 </dependency>
168         </dependencies>
169
170         <build>
171                 <finalName>babel</finalName>
172                 <plugins>
173                         <plugin>
174                                 <groupId>org.springframework.boot</groupId>
175                                 <artifactId>spring-boot-maven-plugin</artifactId>
176                                 <version>${spring.boot.version}</version>
177                                 <configuration>
178                                         <jvmArguments>
179                                                 -DCONFIG_HOME=./appconfig-local
180                                                 -DAPP_HOME=.
181                                                 -Dartifactgenerator.config=./appconfig-local/artifact-generator.properties
182                                                 -DKEY_STORE_PASSWORD=${KEY_STORE_PASSWORD}
183                                         </jvmArguments>
184                                 </configuration>
185                                 <executions>
186                                         <execution>
187                                                 <goals>
188                                                         <goal>repackage</goal>
189                                                 </goals>
190                                         </execution>
191                                 </executions>
192                         </plugin>
193                         <plugin>
194                                 <groupId>org.apache.maven.plugins</groupId>
195                                 <artifactId>maven-dependency-plugin</artifactId>
196                                 <executions>
197                                         <execution>
198                                                 <id>unpack</id>
199                                                 <phase>initialize</phase>
200                                                 <goals>
201                                                         <goal>unpack</goal>
202                                                 </goals>
203                                                 <configuration>
204                                                         <artifactItems>
205                                                                 <artifactItem>
206                                                                         <groupId>${aai-schema.group.id}</groupId>
207                                                                         <artifactId>aai-schema</artifactId>
208                                                                         <version>${aai-schema.version}</version>
209                                                                         <type>jar</type>
210                                                                         <includes>${aai.schema.source.folder}/aai_schema_v**.xsd</includes>
211                                                                         <outputDirectory>${project.build.directory}/tmp</outputDirectory>
212                                                                 </artifactItem>
213                                                         </artifactItems>
214                                                 </configuration>
215                                         </execution>
216                                 </executions>
217                         </plugin>
218                         <plugin>
219                                 <groupId>org.apache.maven.plugins</groupId>
220                                 <artifactId>maven-antrun-plugin</artifactId>
221                                 <version>${antrun.version}</version>
222                                 <executions>
223                                         <execution>
224                                                 <id>Flatten XSDs</id>
225                                                 <phase>initialize</phase>
226                                                 <goals>
227                                                         <goal>run</goal>
228                                                 </goals>
229                                                 <configuration>
230                                                         <target>
231                                                                 <copy todir="${aai.schema.target.folder}" flatten="true">
232                                                                         <fileset dir="${project.build.directory}/tmp">
233                                                                                 <include name="**/*.xsd" />
234                                                                         </fileset>
235                                                                 </copy>
236                                                         </target>
237                                                 </configuration>
238                                         </execution>
239                                 </executions>
240                         </plugin>
241                         <plugin>
242                                 <groupId>org.jvnet.jaxb2.maven2</groupId>
243                                 <artifactId>maven-jaxb2-plugin</artifactId>
244                                 <version>${mvn.jaxb2.version}</version>
245                                 <executions>
246                                         <execution>
247                                                 <phase>process-sources</phase>
248                                                 <goals>
249                                                         <goal>generate</goal>
250                                                 </goals>
251                                         </execution>
252                                 </executions>
253                                 <configuration>
254                                         <schemaDirectory>${aai.schema.target.folder}</schemaDirectory>
255                                         <generatePackage>org.onap.aai.babel.xml.generator.xsd</generatePackage>
256                                         <generateDirectory>${project.build.directory}/generated-sources</generateDirectory>
257                                         <schemaIncludes>
258                                                 <include>aai_schema_latest.xsd</include>
259                                         </schemaIncludes>
260                                         <extension>true</extension>
261                                         <args>
262                                                 <arg>-Xannotate</arg>
263                                         </args>
264                                         <plugins>
265                                                 <plugin>
266                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
267                                                         <artifactId>jaxb2-basics-annotate</artifactId>
268                                                         <version>0.6.4</version>
269                                                 </plugin>
270                                                 <!-- Add the dependencies with your annotations as 'plugins' below -->
271                                                 <plugin>
272                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
273                                                         <artifactId>jaxb2-annotate-plugin-test-annox-annotations</artifactId>
274                                                         <version>1.0.0</version>
275                                                 </plugin>
276                                         </plugins>
277                                 </configuration>
278                         </plugin>
279                         <plugin>
280                                 <artifactId>exec-maven-plugin</artifactId>
281                                 <groupId>org.codehaus.mojo</groupId>
282                                 <version>1.5.0</version>
283                                 <executions>
284                                         <execution><!-- Run our script to get latest xsd version -->
285                                                 <id>Get latest xsd version</id>
286                                                 <phase>generate-sources</phase>
287                                                 <goals>
288                                                         <goal>exec</goal>
289                                                 </goals>
290                                                 <configuration>
291                                                         <workingDirectory>${basedir}/scripts</workingDirectory>
292                                                         <executable>bash</executable>
293                                                         <commandlineArgs>get-latest-xsd-version.sh ${basedir}</commandlineArgs>
294                                                 </configuration>
295                                         </execution>
296                                 </executions>
297                         </plugin>
298                         <plugin>
299                                 <groupId>com.mycila</groupId>
300                                 <artifactId>license-maven-plugin</artifactId>
301                                 <version>3.0</version>
302                                 <configuration>
303                                         <header>License.txt</header>
304                                         <includes>
305                                                 <include>src/main/java/**</include>
306                                                 <include>src/test/java/**</include>
307                                                 <include>pom.xml</include>
308                                         </includes>
309                                         <skipExistingHeaders>true</skipExistingHeaders>
310                                 </configuration>
311                                 <executions>
312                                         <execution>
313                                                 <goals>
314                                                         <!-- Set goal from "check" to "format" to auto update license headers -->
315                                                         <goal>check</goal>
316                                                 </goals>
317                                                 <phase>validate</phase>
318                                         </execution>
319                                 </executions>
320                         </plugin>
321                         <plugin>
322                                 <groupId>org.apache.maven.plugins</groupId>
323                                 <artifactId>maven-surefire-plugin</artifactId>
324                                 <configuration>
325                                         <reuseForks>false</reuseForks>
326                                         <forkCount>1</forkCount>
327                                         <environmentVariables>
328                                                 <APP_HOME>.</APP_HOME>
329                                                 <CONFIG_HOME>src/test/resources</CONFIG_HOME>
330                                         </environmentVariables>
331                                 </configuration>
332                         </plugin>
333                         <plugin>
334                                 <groupId>org.apache.maven.plugins</groupId>
335                                 <artifactId>maven-resources-plugin</artifactId>
336                                 <version>3.0.2</version>
337                                 <executions>
338                                         <execution>
339                                                 <id>copy-docker-file</id>
340                                                 <phase>package</phase>
341                                                 <goals>
342                                                         <goal>copy-resources</goal>
343                                                 </goals>
344                                                 <configuration>
345                                                         <outputDirectory>target</outputDirectory>
346                                                         <overwrite>true</overwrite>
347                                                         <resources>
348                                                                 <resource>
349                                                                         <directory>${basedir}/src/main/docker</directory>
350                                                                         <filtering>true</filtering>
351                                                                 </resource>
352                                                                 <resource>
353                                                                         <directory>${basedir}/src/main/bin/</directory>
354                                                                         <filtering>true</filtering>
355                                                                 </resource>
356                                                         </resources>
357                                                 </configuration>
358                                         </execution>
359                                 </executions>
360                         </plugin>
361                         <plugin>
362                                 <groupId>org.apache.maven.plugins</groupId>
363                                 <artifactId>maven-jar-plugin</artifactId>
364                                 <version>3.0.2</version>
365                                 <executions>
366                                         <execution>
367                                                 <phase>package</phase>
368                                                 <goals>
369                                                         <goal>jar</goal>
370                                                 </goals>
371                                                 <configuration>
372                                                         <classifier>client</classifier>
373                                                         <includes>
374                                                                 <include>**/babel/service/data/*</include>
375                                                         </includes>
376                                                 </configuration>
377                                         </execution>
378                                 </executions>
379                         </plugin>
380                         <plugin>
381                                 <groupId>org.apache.maven.plugins</groupId>
382                                 <artifactId>maven-deploy-plugin</artifactId>
383                                 <configuration>
384                                         <classifier>client</classifier>
385                                 </configuration>
386                         </plugin>
387                         <plugin>
388                                 <groupId>com.spotify</groupId>
389                                 <artifactId>docker-maven-plugin</artifactId>
390                                 <version>0.4.11</version>
391                                 <configuration>
392                                         <verbose>true</verbose>
393                                         <serverId>docker-hub</serverId>
394                                         <imageName>${docker.push.registry}/onap/${project.artifactId}</imageName>
395                                         <dockerDirectory>${docker.location}</dockerDirectory>
396                                         <imageTags>
397                                                 <imageTag>latest</imageTag>
398                                         </imageTags>
399                                         <forceTags>true</forceTags>
400                                 </configuration>
401                         </plugin>
402                 </plugins>
403         </build>
404
405 </project>