Add test CSAR file for missing Service metadata
[aai/babel.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3
4     ============LICENSE_START=======================================================
5     org.onap.aai
6     ================================================================================
7     Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
8     Copyright © 2017-2018 European Software Marketing Ltd.
9     ================================================================================
10     Licensed under the Apache License, Version 2.0 (the "License");
11     you may not use this file except in compliance with the License.
12     You may obtain a copy of the License at
13
14           http://www.apache.org/licenses/LICENSE-2.0
15
16     Unless required by applicable law or agreed to in writing, software
17     distributed under the License is distributed on an "AS IS" BASIS,
18     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19     See the License for the specific language governing permissions and
20     limitations under the License.
21     ============LICENSE_END=========================================================
22
23 -->
24 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
26         <modelVersion>4.0.0</modelVersion>
27
28         <parent>
29                 <groupId>org.onap.oparent</groupId>
30                 <artifactId>oparent</artifactId>
31                 <version>1.1.0</version>
32                 <relativePath />
33         </parent>
34
35         <groupId>org.onap.aai</groupId>
36         <artifactId>babel</artifactId>
37         <version>1.3.0-SNAPSHOT</version>
38         <packaging>jar</packaging>
39
40         <name>aai-babel</name>
41         <description>ONAP AAI Babel Microservice</description>
42
43         <properties>
44                 <!-- Spring boot version -->
45                 <spring.boot.version>1.5.14.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.4.1</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.3.0-SNAPSHOT</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                 <guava.version>25.1-jre</guava.version>
66         </properties>
67
68         <dependencyManagement>
69                 <dependencies>
70                         <dependency>
71                                 <!-- Import dependency management from Spring Boot -->
72                                 <groupId>org.springframework.boot</groupId>
73                                 <artifactId>spring-boot-dependencies</artifactId>
74                                 <version>${spring.boot.version}</version>
75                                 <type>pom</type>
76                                 <scope>import</scope>
77                         </dependency>
78                 </dependencies>
79         </dependencyManagement>
80
81         <dependencies>
82                 <dependency>
83                         <groupId>org.springframework.boot</groupId>
84                         <artifactId>spring-boot-starter-jetty</artifactId>
85                 </dependency>
86                 <dependency>
87                         <groupId>org.springframework.boot</groupId>
88                         <artifactId>spring-boot-starter-jersey</artifactId>
89                 </dependency>
90                 <dependency>
91                         <groupId>org.onap.aai.logging-service</groupId>
92                         <artifactId>common-logging</artifactId>
93                         <version>${common.logging.version}</version>
94                 </dependency>
95                 <dependency>
96                         <groupId>ch.qos.logback</groupId>
97                         <artifactId>logback-classic</artifactId>
98                         <version>${logback.version}</version><!--$NO-MVN-MAN-VER$-->
99                 </dependency>
100                 <dependency>
101                         <groupId>ch.qos.logback</groupId>
102                         <artifactId>logback-core</artifactId>
103                         <version>${logback.version}</version><!--$NO-MVN-MAN-VER$-->
104                 </dependency>
105
106                 <dependency>
107                         <groupId>commons-codec</groupId>
108                         <artifactId>commons-codec</artifactId>
109                 </dependency>
110                 <dependency>
111                         <groupId>org.apache.commons</groupId>
112                         <artifactId>commons-compress</artifactId>
113                         <version>${commons.compress.version}</version>
114                 </dependency>
115                 <dependency>
116                         <groupId>org.apache.commons</groupId>
117                         <artifactId>commons-lang3</artifactId>
118                         <version>${apache.lang3.version}</version>
119                 </dependency>
120                 <dependency>
121                         <groupId>javax.ws.rs</groupId>
122                         <artifactId>javax.ws.rs-api</artifactId>
123                         <version>${javax.ws.rs.version}</version>
124                 </dependency>
125                 <dependency>
126                         <groupId>org.codehaus.groovy</groupId>
127                         <artifactId>groovy-all</artifactId>
128                 </dependency>
129
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>com.google.guava</groupId>
137                         <artifactId>guava</artifactId>
138                         <version>${guava.version}</version>
139                 </dependency>
140
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                                                 -Dartifactgenerator.config=./appconfig-local/artifact-generator.properties
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/aai_schema_v**.xsd</includes>
208                                                                         <outputDirectory>target/tmp</outputDirectory>
209                                                                 </artifactItem>
210                                                         </artifactItems>
211                                                 </configuration>
212                                         </execution>
213                                 </executions>
214                         </plugin>
215                         <plugin>
216                                 <groupId>org.jvnet.jaxb2.maven2</groupId>
217                                 <artifactId>maven-jaxb2-plugin</artifactId>
218                                 <version>${mvn.jaxb2.version}</version>
219                                 <executions>
220                                         <execution>
221                                                 <phase>process-sources</phase>
222                                                 <goals>
223                                                         <goal>generate</goal>
224                                                 </goals>
225                                         </execution>
226                                 </executions>
227                                 <configuration>
228                                         <schemaDirectory>target/tmp/aai_schema</schemaDirectory>
229                                         <generatePackage>org.onap.aai.babel.xml.generator.xsd</generatePackage>
230                                         <generateDirectory>target/generated-sources</generateDirectory>
231                                         <schemaIncludes>
232                                                 <include>aai_schema_latest.xsd</include>
233                                         </schemaIncludes>
234                                         <extension>true</extension>
235                                         <args>
236                                                 <arg>-Xannotate</arg>
237                                         </args>
238                                         <plugins>
239                                                 <plugin>
240                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
241                                                         <artifactId>jaxb2-basics-annotate</artifactId>
242                                                         <version>0.6.4</version>
243                                                 </plugin>
244                                                 <!-- Add the dependencies with your annotations as 'plugins' below -->
245                                                 <plugin>
246                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
247                                                         <artifactId>jaxb2-annotate-plugin-test-annox-annotations</artifactId>
248                                                         <version>1.0.0</version>
249                                                 </plugin>
250                                         </plugins>
251                                 </configuration>
252                         </plugin>
253                         <plugin>
254                                 <artifactId>exec-maven-plugin</artifactId>
255                                 <groupId>org.codehaus.mojo</groupId>
256                                 <version>1.5.0</version>
257                                 <executions>
258                                         <execution><!-- Run our script to get latest xsd version -->
259                                                 <id>Get latest xsd version</id>
260                                                 <phase>generate-sources</phase>
261                                                 <goals>
262                                                         <goal>exec</goal>
263                                                 </goals>
264                                                 <configuration>
265                                                         <workingDirectory>${basedir}/scripts</workingDirectory>
266                                                         <executable>bash</executable>
267                                                         <commandlineArgs>get-latest-xsd-version.sh ${basedir}</commandlineArgs>
268                                                 </configuration>
269                                         </execution>
270                                 </executions>
271                         </plugin>
272                         <plugin>
273                                 <groupId>com.mycila</groupId>
274                                 <artifactId>license-maven-plugin</artifactId>
275                                 <version>3.0</version>
276                                 <configuration>
277                                         <header>License.txt</header>
278                                         <includes>
279                                                 <include>src/main/java/**</include>
280                                                 <include>src/test/java/**</include>
281                                                 <include>pom.xml</include>
282                                         </includes>
283                                         <skipExistingHeaders>true</skipExistingHeaders>
284                                 </configuration>
285                                 <executions>
286                                         <execution>
287                                                 <goals>
288                                                         <!-- Set goal from "check" to "format" to auto update license headers -->
289                                                         <goal>check</goal>
290                                                 </goals>
291                                                 <phase>validate</phase>
292                                         </execution>
293                                 </executions>
294                         </plugin>
295                         <plugin>
296                                 <groupId>org.apache.maven.plugins</groupId>
297                                 <artifactId>maven-surefire-plugin</artifactId>
298                                 <configuration>
299                                         <reuseForks>false</reuseForks>
300                                         <forkCount>1</forkCount>
301                                         <environmentVariables>
302                                                 <APP_HOME>.</APP_HOME>
303                                                 <CONFIG_HOME>src/test/resources</CONFIG_HOME>
304                                         </environmentVariables>
305                                 </configuration>
306                         </plugin>
307                         <plugin>
308                                 <groupId>org.apache.maven.plugins</groupId>
309                                 <artifactId>maven-resources-plugin</artifactId>
310                                 <version>3.0.2</version>
311                                 <executions>
312                                         <execution>
313                                                 <id>copy-docker-file</id>
314                                                 <phase>package</phase>
315                                                 <goals>
316                                                         <goal>copy-resources</goal>
317                                                 </goals>
318                                                 <configuration>
319                                                         <outputDirectory>target</outputDirectory>
320                                                         <overwrite>true</overwrite>
321                                                         <resources>
322                                                                 <resource>
323                                                                         <directory>${basedir}/src/main/docker</directory>
324                                                                         <filtering>true</filtering>
325                                                                 </resource>
326                                                                 <resource>
327                                                                         <directory>${basedir}/src/main/bin/</directory>
328                                                                         <filtering>true</filtering>
329                                                                 </resource>
330                                                         </resources>
331                                                 </configuration>
332                                         </execution>
333                                 </executions>
334                         </plugin>
335                         <plugin>
336                                 <groupId>org.apache.maven.plugins</groupId>
337                                 <artifactId>maven-jar-plugin</artifactId>
338                                 <version>3.0.2</version>
339                                 <executions>
340                                         <execution>
341                                                 <phase>package</phase>
342                                                 <goals>
343                                                         <goal>jar</goal>
344                                                 </goals>
345                                                 <configuration>
346                                                         <classifier>client</classifier>
347                                                         <includes>
348                                                                 <include>**/babel/service/data/*</include>
349                                                         </includes>
350                                                 </configuration>
351                                         </execution>
352                                 </executions>
353                         </plugin>
354                         <plugin>
355                                 <groupId>org.apache.maven.plugins</groupId>
356                                 <artifactId>maven-deploy-plugin</artifactId>
357                                 <configuration>
358                                         <classifier>client</classifier>
359                                 </configuration>
360                         </plugin>
361                         <plugin>
362                                 <groupId>com.spotify</groupId>
363                                 <artifactId>docker-maven-plugin</artifactId>
364                                 <version>0.4.11</version>
365                                 <dependencies>
366                                         <dependency>
367                                                 <groupId>com.github.jnr</groupId>
368                                                 <artifactId>jnr-unixsocket</artifactId>
369                                                 <version>0.13</version>
370                                         </dependency>
371                                 </dependencies>
372                                 <configuration>
373                                         <verbose>true</verbose>
374                                         <serverId>docker-hub</serverId>
375                                         <imageName>${docker.push.registry}/onap/${project.artifactId}</imageName>
376                                         <dockerDirectory>${docker.location}</dockerDirectory>
377                                         <imageTags>
378                                                 <imageTag>latest</imageTag>
379                                         </imageTags>
380                                         <forceTags>true</forceTags>
381                                 </configuration>
382                         </plugin>
383                 </plugins>
384         </build>
385
386 </project>