Convert Babel from AJSC2 to Spring Boot 1.5.12
[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.2.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.12.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
52                 <!-- Dependency Versions -->
53                 <common.logging.version>1.2.2</common.logging.version>
54                 <sdc.tosca.version>1.3.0</sdc.tosca.version>
55                 <commons.compress.version>1.16.1</commons.compress.version>
56                 <javax.ws.rs.version>2.1</javax.ws.rs.version>
57                 <mvn.jaxb2.version>0.13.2</mvn.jaxb2.version>
58                 <aai-schema.group.id>org.onap.aai.aai-common</aai-schema.group.id>
59                 <aai-schema.version>1.2.3</aai-schema.version>
60                 <apache.lang3.version>3.7</apache.lang3.version>
61                 <aai.rest.client.version>1.2.1</aai.rest.client.version>
62                 <sdc.distribution.client.version>1.3.0</sdc.distribution.client.version>
63                 <xmlunit.version>1.6</xmlunit.version>
64         </properties>
65
66         <dependencyManagement>
67                 <dependencies>
68                         <dependency>
69                                 <!-- Import dependency management from Spring Boot -->
70                                 <groupId>org.springframework.boot</groupId>
71                                 <artifactId>spring-boot-dependencies</artifactId>
72                                 <version>${spring.boot.version}</version>
73                                 <type>pom</type>
74                                 <scope>import</scope>
75                         </dependency>
76                 </dependencies>
77         </dependencyManagement>
78
79         <dependencies>
80                 <dependency>
81                         <groupId>org.springframework.boot</groupId>
82                         <artifactId>spring-boot-starter-jetty</artifactId>
83                 </dependency>
84                 <dependency>
85                         <groupId>org.springframework.boot</groupId>
86                         <artifactId>spring-boot-starter-jersey</artifactId>
87                 </dependency>
88                 <dependency>
89                         <groupId>org.onap.aai.logging-service</groupId>
90                         <artifactId>common-logging</artifactId>
91                         <version>${common.logging.version}</version>
92                 </dependency>
93                 <dependency>
94                         <groupId>commons-codec</groupId>
95                         <artifactId>commons-codec</artifactId>
96                 </dependency>
97                 <dependency>
98                         <groupId>org.apache.commons</groupId>
99                         <artifactId>commons-compress</artifactId>
100                         <version>${commons.compress.version}</version>
101                 </dependency>
102                 <dependency>
103                         <groupId>org.apache.commons</groupId>
104                         <artifactId>commons-lang3</artifactId>
105                         <version>${apache.lang3.version}</version>
106                 </dependency>
107                 <dependency>
108                         <groupId>javax.ws.rs</groupId>
109                         <artifactId>javax.ws.rs-api</artifactId>
110                         <version>${javax.ws.rs.version}</version>
111                 </dependency>
112                 <dependency>
113                         <groupId>org.codehaus.groovy</groupId>
114                         <artifactId>groovy-all</artifactId>
115                 </dependency>
116                 <dependency>
117                         <groupId>javax</groupId>
118                         <artifactId>javaee-api</artifactId>
119                         <version>8.0</version>
120                         <scope>provided</scope>
121                 </dependency>
122
123                 <dependency>
124                         <groupId>org.onap.sdc.sdc-tosca</groupId>
125                         <artifactId>sdc-tosca</artifactId>
126                         <version>${sdc.tosca.version}</version>
127                 </dependency>
128                 <dependency>
129                         <groupId>org.onap.aai</groupId>
130                         <artifactId>rest-client</artifactId>
131                         <version>${aai.rest.client.version}</version>
132                 </dependency>
133
134                 <!-- Testing -->
135                 <dependency>
136                         <groupId>org.springframework.boot</groupId>
137                         <artifactId>spring-boot-starter-test</artifactId>
138                         <scope>test</scope>
139                 </dependency>
140                 <dependency>
141                         <groupId>org.onap.sdc.sdc-distribution-client</groupId>
142                         <artifactId>sdc-distribution-client</artifactId>
143                         <version>${sdc.distribution.client.version}</version>
144                         <scope>test</scope>
145                 </dependency>
146                 <dependency>
147                         <groupId>xmlunit</groupId>
148                         <artifactId>xmlunit</artifactId>
149                         <version>${xmlunit.version}</version>
150                         <scope>test</scope>
151                 </dependency>
152         </dependencies>
153
154         <build>
155                 <finalName>babel</finalName>
156                 <plugins>
157                         <plugin>
158                                 <groupId>org.springframework.boot</groupId>
159                                 <artifactId>spring-boot-maven-plugin</artifactId>
160                                 <version>${spring.boot.version}</version>
161                                 <configuration>
162                                         <jvmArguments>
163                                                 -DCONFIG_HOME=./appconfig-local
164                                                 -DAPP_HOME=.
165                                                 -Dartifactgenerator.config=./appconfig-local/artifact-generator.properties
166                                                 -DKEY_STORE_PASSWORD=${KEY_STORE_PASSWORD}
167                                         </jvmArguments>
168                                 </configuration>
169                                 <executions>
170                                         <execution>
171                                                 <goals>
172                                                         <goal>repackage</goal>
173                                                 </goals>
174                                         </execution>
175                                 </executions>
176                         </plugin>
177                         <plugin>
178                                 <groupId>org.apache.maven.plugins</groupId>
179                                 <artifactId>maven-dependency-plugin</artifactId>
180                                 <executions>
181                                         <execution>
182                                                 <id>unpack</id>
183                                                 <phase>initialize</phase>
184                                                 <goals>
185                                                         <goal>unpack</goal>
186                                                 </goals>
187                                                 <configuration>
188                                                         <artifactItems>
189                                                                 <artifactItem>
190                                                                         <groupId>${aai-schema.group.id}</groupId>
191                                                                         <artifactId>aai-schema</artifactId>
192                                                                         <version>${aai-schema.version}</version>
193                                                                         <type>jar</type>
194                                                                         <includes>aai_schema/aai_schema_v**.xsd</includes>
195                                                                         <outputDirectory>target/tmp</outputDirectory>
196                                                                 </artifactItem>
197                                                         </artifactItems>
198                                                 </configuration>
199                                         </execution>
200                                 </executions>
201                         </plugin>
202                         <plugin>
203                                 <groupId>org.jvnet.jaxb2.maven2</groupId>
204                                 <artifactId>maven-jaxb2-plugin</artifactId>
205                                 <version>${mvn.jaxb2.version}</version>
206                                 <executions>
207                                         <execution>
208                                                 <phase>process-sources</phase>
209                                                 <goals>
210                                                         <goal>generate</goal>
211                                                 </goals>
212                                         </execution>
213                                 </executions>
214                                 <configuration>
215                                         <schemaDirectory>target/tmp/aai_schema</schemaDirectory>
216                                         <generatePackage>org.onap.aai.babel.xml.generator.xsd</generatePackage>
217                                         <generateDirectory>target/generated-sources</generateDirectory>
218                                         <schemaIncludes>
219                                                 <include>aai_schema_latest.xsd</include>
220                                         </schemaIncludes>
221                                         <extension>true</extension>
222                                         <args>
223                                                 <arg>-Xannotate</arg>
224                                         </args>
225                                         <plugins>
226                                                 <plugin>
227                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
228                                                         <artifactId>jaxb2-basics-annotate</artifactId>
229                                                         <version>0.6.4</version>
230                                                 </plugin>
231                                                 <!-- Add the dependencies with your annotations as 'plugins' below -->
232                                                 <plugin>
233                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
234                                                         <artifactId>jaxb2-annotate-plugin-test-annox-annotations</artifactId>
235                                                         <version>1.0.0</version>
236                                                 </plugin>
237                                         </plugins>
238                                 </configuration>
239                         </plugin>
240                         <plugin>
241                                 <artifactId>exec-maven-plugin</artifactId>
242                                 <groupId>org.codehaus.mojo</groupId>
243                                 <version>1.5.0</version>
244                                 <executions>
245                                         <execution><!-- Run our script to get latest xsd version -->
246                                                 <id>Get latest xsd version</id>
247                                                 <phase>generate-sources</phase>
248                                                 <goals>
249                                                         <goal>exec</goal>
250                                                 </goals>
251                                                 <configuration>
252                                                         <workingDirectory>${basedir}/scripts</workingDirectory>
253                                                         <executable>bash</executable>
254                                                         <commandlineArgs>get-latest-xsd-version.sh ${basedir}</commandlineArgs>
255                                                 </configuration>
256                                         </execution>
257                                 </executions>
258                         </plugin>
259                         <plugin>
260                                 <groupId>com.mycila</groupId>
261                                 <artifactId>license-maven-plugin</artifactId>
262                                 <version>3.0</version>
263                                 <configuration>
264                                         <header>License.txt</header>
265                                         <includes>
266                                                 <include>src/main/java/**</include>
267                                                 <include>src/test/java/**</include>
268                                                 <include>pom.xml</include>
269                                         </includes>
270                                         <skipExistingHeaders>true</skipExistingHeaders>
271                                 </configuration>
272                                 <executions>
273                                         <execution>
274                                                 <goals>
275                                                         <!-- Set goal from "check" to "format" to auto update license headers -->
276                                                         <goal>check</goal>
277                                                 </goals>
278                                                 <phase>validate</phase>
279                                         </execution>
280                                 </executions>
281                         </plugin>
282                         <plugin>
283                                 <groupId>org.apache.maven.plugins</groupId>
284                                 <artifactId>maven-surefire-plugin</artifactId>
285                                 <configuration>
286                                         <reuseForks>false</reuseForks>
287                                         <forkCount>1</forkCount>
288                                         <environmentVariables>
289                                                 <APP_HOME>.</APP_HOME>
290                                                 <CONFIG_HOME>src/test/resources</CONFIG_HOME>
291                                         </environmentVariables>
292                                 </configuration>
293                         </plugin>
294                         <plugin>
295                                 <groupId>org.apache.maven.plugins</groupId>
296                                 <artifactId>maven-resources-plugin</artifactId>
297                                 <version>3.0.2</version>
298                                 <executions>
299                                         <execution>
300                                                 <id>copy-docker-file</id>
301                                                 <phase>package</phase>
302                                                 <goals>
303                                                         <goal>copy-resources</goal>
304                                                 </goals>
305                                                 <configuration>
306                                                         <outputDirectory>target</outputDirectory>
307                                                         <overwrite>true</overwrite>
308                                                         <resources>
309                                                                 <resource>
310                                                                         <directory>${basedir}/src/main/docker</directory>
311                                                                         <filtering>true</filtering>
312                                                                 </resource>
313                                                                 <resource>
314                                                                         <directory>${basedir}/src/main/bin/</directory>
315                                                                         <filtering>true</filtering>
316                                                                 </resource>
317                                                         </resources>
318                                                 </configuration>
319                                         </execution>
320                                 </executions>
321                         </plugin>
322                         <plugin>
323                                 <groupId>org.apache.maven.plugins</groupId>
324                                 <artifactId>maven-jar-plugin</artifactId>
325                                 <version>3.0.2</version>
326                                 <executions>
327                                         <execution>
328                                                 <phase>package</phase>
329                                                 <goals>
330                                                         <goal>jar</goal>
331                                                 </goals>
332                                                 <configuration>
333                                                         <classifier>client</classifier>
334                                                         <includes>
335                                                                 <include>**/babel/service/data/*</include>
336                                                         </includes>
337                                                 </configuration>
338                                         </execution>
339                                 </executions>
340                         </plugin>
341                         <plugin>
342                                 <groupId>org.apache.maven.plugins</groupId>
343                                 <artifactId>maven-deploy-plugin</artifactId>
344                                 <configuration>
345                                         <classifier>client</classifier>
346                                 </configuration>
347                         </plugin>
348                         <plugin>
349                                 <groupId>com.spotify</groupId>
350                                 <artifactId>docker-maven-plugin</artifactId>
351                                 <version>0.4.11</version>
352                                 <configuration>
353                                         <verbose>true</verbose>
354                                         <serverId>docker-hub</serverId>
355                                         <imageName>${docker.push.registry}/onap/${project.artifactId}</imageName>
356                                         <dockerDirectory>${docker.location}</dockerDirectory>
357                                         <imageTags>
358                                                 <imageTag>latest</imageTag>
359                                         </imageTags>
360                                         <forceTags>true</forceTags>
361                                 </configuration>
362                         </plugin>
363                 </plugins>
364         </build>
365
366 </project>