Fix NexusIQ security vulnerabilities
[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.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.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.1</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-SNAPSHOT</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                                                 -DKEY_STORE_PASSWORD=${KEY_STORE_PASSWORD}
174                                         </jvmArguments>
175                                 </configuration>
176                                 <executions>
177                                         <execution>
178                                                 <goals>
179                                                         <goal>repackage</goal>
180                                                 </goals>
181                                         </execution>
182                                 </executions>
183                         </plugin>
184                         <plugin>
185                                 <groupId>org.apache.maven.plugins</groupId>
186                                 <artifactId>maven-dependency-plugin</artifactId>
187                                 <executions>
188                                         <execution>
189                                                 <id>unpack</id>
190                                                 <phase>initialize</phase>
191                                                 <goals>
192                                                         <goal>unpack</goal>
193                                                 </goals>
194                                                 <configuration>
195                                                         <artifactItems>
196                                                                 <artifactItem>
197                                                                         <groupId>${aai-schema.group.id}</groupId>
198                                                                         <artifactId>aai-schema</artifactId>
199                                                                         <version>${aai-schema.version}</version>
200                                                                         <type>jar</type>
201                                                                         <includes>${aai.schema.source.folder}/aai_schema_v**.xsd</includes>
202                                                                         <outputDirectory>${project.build.directory}/tmp</outputDirectory>
203                                                                 </artifactItem>
204                                                         </artifactItems>
205                                                 </configuration>
206                                         </execution>
207                                 </executions>
208                         </plugin>
209                         <plugin>
210                                 <groupId>org.apache.maven.plugins</groupId>
211                                 <artifactId>maven-antrun-plugin</artifactId>
212                                 <version>${antrun.version}</version>
213                                 <executions>
214                                         <execution>
215                                                 <id>Flatten XSDs</id>
216                                                 <phase>initialize</phase>
217                                                 <goals>
218                                                         <goal>run</goal>
219                                                 </goals>
220                                                 <configuration>
221                                                         <target>
222                                                                 <copy todir="${aai.schema.target.folder}" flatten="true">
223                                                                         <fileset dir="${project.build.directory}/tmp">
224                                                                                 <include name="**/*.xsd" />
225                                                                         </fileset>
226                                                                 </copy>
227                                                         </target>
228                                                 </configuration>
229                                         </execution>
230                                 </executions>
231                         </plugin>
232                         <plugin>
233                                 <groupId>org.jvnet.jaxb2.maven2</groupId>
234                                 <artifactId>maven-jaxb2-plugin</artifactId>
235                                 <version>${mvn.jaxb2.version}</version>
236                                 <executions>
237                                         <execution>
238                                                 <phase>process-sources</phase>
239                                                 <goals>
240                                                         <goal>generate</goal>
241                                                 </goals>
242                                         </execution>
243                                 </executions>
244                                 <configuration>
245                                         <schemaDirectory>${aai.schema.target.folder}</schemaDirectory>
246                                         <generatePackage>org.onap.aai.babel.xml.generator.xsd</generatePackage>
247                                         <generateDirectory>${project.build.directory}/generated-sources</generateDirectory>
248                                         <schemaIncludes>
249                                                 <include>aai_schema_latest.xsd</include>
250                                         </schemaIncludes>
251                                         <extension>true</extension>
252                                         <args>
253                                                 <arg>-Xannotate</arg>
254                                         </args>
255                                         <plugins>
256                                                 <plugin>
257                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
258                                                         <artifactId>jaxb2-basics-annotate</artifactId>
259                                                         <version>0.6.4</version>
260                                                 </plugin>
261                                                 <!-- Add the dependencies with your annotations as 'plugins' below -->
262                                                 <plugin>
263                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
264                                                         <artifactId>jaxb2-annotate-plugin-test-annox-annotations</artifactId>
265                                                         <version>1.0.0</version>
266                                                 </plugin>
267                                         </plugins>
268                                 </configuration>
269                         </plugin>
270                         <plugin>
271                                 <artifactId>exec-maven-plugin</artifactId>
272                                 <groupId>org.codehaus.mojo</groupId>
273                                 <version>1.5.0</version>
274                                 <executions>
275                                         <execution><!-- Run our script to get latest xsd version -->
276                                                 <id>Get latest xsd version</id>
277                                                 <phase>generate-sources</phase>
278                                                 <goals>
279                                                         <goal>exec</goal>
280                                                 </goals>
281                                                 <configuration>
282                                                         <workingDirectory>${basedir}/scripts</workingDirectory>
283                                                         <executable>bash</executable>
284                                                         <commandlineArgs>get-latest-xsd-version.sh ${basedir}</commandlineArgs>
285                                                 </configuration>
286                                         </execution>
287                                 </executions>
288                         </plugin>
289                         <plugin>
290                                 <groupId>com.mycila</groupId>
291                                 <artifactId>license-maven-plugin</artifactId>
292                                 <version>3.0</version>
293                                 <configuration>
294                                         <header>License.txt</header>
295                                         <includes>
296                                                 <include>src/main/java/**</include>
297                                                 <include>src/test/java/**</include>
298                                                 <include>pom.xml</include>
299                                         </includes>
300                                         <skipExistingHeaders>true</skipExistingHeaders>
301                                 </configuration>
302                                 <executions>
303                                         <execution>
304                                                 <goals>
305                                                         <!-- Set goal from "check" to "format" to auto update license headers -->
306                                                         <goal>check</goal>
307                                                 </goals>
308                                                 <phase>validate</phase>
309                                         </execution>
310                                 </executions>
311                         </plugin>
312                         <plugin>
313                                 <groupId>org.apache.maven.plugins</groupId>
314                                 <artifactId>maven-surefire-plugin</artifactId>
315                                 <configuration>
316                                         <reuseForks>false</reuseForks>
317                                         <forkCount>1</forkCount>
318                                         <environmentVariables>
319                                                 <APP_HOME>.</APP_HOME>
320                                                 <CONFIG_HOME>src/test/resources</CONFIG_HOME>
321                                         </environmentVariables>
322                                 </configuration>
323                         </plugin>
324                         <plugin>
325                                 <groupId>org.apache.maven.plugins</groupId>
326                                 <artifactId>maven-resources-plugin</artifactId>
327                                 <version>3.0.2</version>
328                                 <executions>
329                                         <execution>
330                                                 <id>copy-docker-file</id>
331                                                 <phase>package</phase>
332                                                 <goals>
333                                                         <goal>copy-resources</goal>
334                                                 </goals>
335                                                 <configuration>
336                                                         <outputDirectory>target</outputDirectory>
337                                                         <overwrite>true</overwrite>
338                                                         <resources>
339                                                                 <resource>
340                                                                         <directory>${basedir}/src/main/docker</directory>
341                                                                         <filtering>true</filtering>
342                                                                 </resource>
343                                                                 <resource>
344                                                                         <directory>${basedir}/src/main/bin/</directory>
345                                                                         <filtering>true</filtering>
346                                                                 </resource>
347                                                         </resources>
348                                                 </configuration>
349                                         </execution>
350                                 </executions>
351                         </plugin>
352                         <plugin>
353                                 <groupId>org.apache.maven.plugins</groupId>
354                                 <artifactId>maven-jar-plugin</artifactId>
355                                 <version>3.0.2</version>
356                                 <executions>
357                                         <execution>
358                                                 <phase>package</phase>
359                                                 <goals>
360                                                         <goal>jar</goal>
361                                                 </goals>
362                                                 <configuration>
363                                                         <classifier>client</classifier>
364                                                         <includes>
365                                                                 <include>**/babel/service/data/*</include>
366                                                         </includes>
367                                                 </configuration>
368                                         </execution>
369                                 </executions>
370                         </plugin>
371                         <plugin>
372                                 <groupId>org.apache.maven.plugins</groupId>
373                                 <artifactId>maven-deploy-plugin</artifactId>
374                                 <configuration>
375                                         <classifier>client</classifier>
376                                 </configuration>
377                         </plugin>
378                         <plugin>
379                                 <groupId>com.spotify</groupId>
380                                 <artifactId>docker-maven-plugin</artifactId>
381                                 <version>0.4.11</version>
382                                 <configuration>
383                                         <verbose>true</verbose>
384                                         <serverId>docker-hub</serverId>
385                                         <imageName>${docker.push.registry}/onap/${project.artifactId}</imageName>
386                                         <dockerDirectory>${docker.location}</dockerDirectory>
387                                         <imageTags>
388                                                 <imageTag>latest</imageTag>
389                                         </imageTags>
390                                         <forceTags>true</forceTags>
391                                 </configuration>
392                         </plugin>
393                 </plugins>
394         </build>
395
396 </project>