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