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