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