Refactor for Sonar smells and code coverage
[aai/model-loader.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3     ============LICENSE_START=======================================================
4     org.onap.aai
5     ================================================================================
6     Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
7     Copyright © 2017-2018 European Software Marketing Ltd.
8     ================================================================================
9     Licensed under the Apache License, Version 2.0 (the "License");
10     you may not use this file except in compliance with the License.
11     You may obtain a copy of the License at
12
13           http://www.apache.org/licenses/LICENSE-2.0
14
15     Unless required by applicable law or agreed to in writing, software
16     distributed under the License is distributed on an "AS IS" BASIS,
17     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18     See the License for the specific language governing permissions and
19     limitations under the License.
20     ============LICENSE_END=========================================================
21 -->
22 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24         <modelVersion>4.0.0</modelVersion>
25
26         <parent>
27                 <groupId>org.onap.oparent</groupId>
28                 <artifactId>oparent</artifactId>
29                 <version>1.1.0</version>
30                 <relativePath />
31         </parent>
32
33         <groupId>org.onap.aai.model-loader</groupId>
34         <artifactId>model-loader</artifactId>
35         <version>1.3.0-SNAPSHOT</version>
36
37         <dependencyManagement>
38                 <dependencies>
39                         <dependency>
40                                 <groupId>org.springframework.boot</groupId>
41                                 <artifactId>spring-boot-dependencies</artifactId>
42                                 <version>${spring-boot.version}</version>
43                                 <type>pom</type>
44                                 <scope>import</scope>
45                         </dependency>
46                 </dependencies>
47         </dependencyManagement>
48
49         <properties>
50                 <start-class>org.onap.aai.modelloader.service.ModelLoaderApplication</start-class>
51                 <nexusproxy>https://nexus.onap.org</nexusproxy>
52                 <docker.location>${basedir}/target</docker.location>
53                 <spring-boot.version>1.5.12.RELEASE</spring-boot.version>
54                 <apache.commons-text.version>1.1</apache.commons-text.version>
55                 <hamcrest-all.version>1.3</hamcrest-all.version>
56                 <babel.version>1.2.0</babel.version>
57                 <aai.rest.client.version>1.2.1</aai.rest.client.version>
58                 <sdc-distribution-client.version>1.3.0</sdc-distribution-client.version>
59                 <logback.version>1.2.3</logback.version>
60         </properties>
61
62     <distributionManagement>
63         <repository>
64             <id>ecomp-releases</id>
65             <name>ECOMP Release Repository</name>
66             <url>${nexusproxy}/content/repositories/releases/</url>
67         </repository>
68         <snapshotRepository>
69             <id>ecomp-snapshots</id>
70             <name>ECOMP Snapshot Repository</name>
71             <url>${nexusproxy}/content/repositories/snapshots/</url>
72         </snapshotRepository>
73     </distributionManagement>
74
75         <dependencies>
76                 <dependency>
77                         <groupId>org.springframework.boot</groupId>
78                         <artifactId>spring-boot-starter-web</artifactId>
79                 </dependency>
80                 <dependency>
81                         <groupId>org.onap.aai</groupId>
82                         <artifactId>babel</artifactId>
83                         <version>${babel.version}</version>
84                         <classifier>client</classifier>
85                         <exclusions>
86                                 <exclusion>
87                                         <groupId>*</groupId>
88                                         <artifactId>*</artifactId>
89                                 </exclusion>
90                         </exclusions>
91                 </dependency>
92                 <dependency>
93                         <groupId>org.glassfish.jersey.core</groupId>
94                         <artifactId>jersey-common</artifactId>
95                         <scope>test</scope>
96                 </dependency>
97                 <dependency>
98                         <groupId>org.onap.aai</groupId>
99                         <artifactId>rest-client</artifactId>
100                         <version>${aai.rest.client.version}</version>
101                 </dependency>
102                 <dependency>
103                         <groupId>com.google.code.gson</groupId>
104                         <artifactId>gson</artifactId>
105                 </dependency>
106
107                 <!-- Test dependencies -->
108                 <!-- https://mvnrepository.com/artifact/com.mikesamuel/json-sanitizer -->
109                 <dependency>
110                         <groupId>com.mikesamuel</groupId>
111                         <artifactId>json-sanitizer</artifactId>
112                         <version>1.2.0</version>
113                 </dependency>
114
115                 <!-- Common logging framework -->
116                 <dependency>
117                         <groupId>org.onap.aai.logging-service</groupId>
118                         <artifactId>common-logging</artifactId>
119                         <version>1.2.2</version>
120                 </dependency>
121                 <dependency>
122                         <groupId>ch.qos.logback</groupId>
123                         <artifactId>logback-classic</artifactId>
124                         <version>${logback.version}</version><!--$NO-MVN-MAN-VER$-->
125                 </dependency>
126                 <dependency>
127                         <groupId>ch.qos.logback</groupId>
128                         <artifactId>logback-core</artifactId>
129                         <version>${logback.version}</version><!--$NO-MVN-MAN-VER$-->
130                 </dependency>
131                 <dependency>
132                         <groupId>org.onap.sdc.sdc-distribution-client</groupId>
133                         <artifactId>sdc-distribution-client</artifactId>
134                         <version>${sdc-distribution-client.version}</version>
135                 </dependency>
136                 <dependency>
137                         <groupId>org.json</groupId>
138                         <artifactId>json</artifactId>
139                         <version>20131018</version><!--$NO-MVN-MAN-VER$ -->
140                 </dependency>
141                 <dependency>
142                         <groupId>org.eclipse.jetty</groupId>
143                         <artifactId>jetty-security</artifactId>
144                 </dependency>
145                 <dependency>
146                         <groupId>org.springframework</groupId>
147                         <artifactId>spring-webmvc</artifactId>
148                 </dependency>
149                 <dependency>
150                         <groupId>jline</groupId>
151                         <artifactId>jline</artifactId>
152                         <version>2.12.1</version>
153                 </dependency>
154                 <dependency>
155                         <groupId>commons-io</groupId>
156                         <artifactId>commons-io</artifactId>
157                         <version>2.4</version>
158                 </dependency>
159                 <dependency>
160                         <groupId>org.apache.commons</groupId>
161                         <artifactId>commons-text</artifactId>
162                         <version>${apache.commons-text.version}</version>
163                 </dependency>
164                 
165         <!-- Test dependencies -->
166         <dependency>
167             <groupId>junit</groupId>
168             <artifactId>junit</artifactId>
169             <scope>test</scope>
170         </dependency>
171         <dependency>
172             <groupId>org.hamcrest</groupId>
173             <artifactId>hamcrest-all</artifactId>
174             <version>${hamcrest-all.version}</version>
175             <scope>test</scope>
176         </dependency>
177         <dependency>
178             <groupId>org.mockito</groupId>
179             <artifactId>mockito-core</artifactId>
180             <scope>test</scope>
181         </dependency>
182         <dependency>
183             <groupId>org.springframework.boot</groupId>
184             <artifactId>spring-boot-starter-test</artifactId>
185             <scope>test</scope>
186         </dependency>
187         </dependencies>
188
189     <!-- Plugins and repositories -->
190     <pluginRepositories>
191         <pluginRepository>
192             <id>central</id>
193             <url>http://repo1.maven.org/maven2</url>
194         </pluginRepository>
195         <pluginRepository>
196             <id>EvoSuite</id>
197             <name>EvoSuite Repository</name>
198             <url>http://www.evosuite.org/m2</url>
199         </pluginRepository>
200     </pluginRepositories>
201
202     <repositories>
203         <repository>
204             <id>central</id>
205             <name>Maven 2 repository 2</name>
206             <url>http://repo2.maven.org/maven2/</url>
207         </repository>
208         <repository>
209             <id>ecomp-releases</id>
210             <name>ECOMP Release Repository</name>
211             <url>${nexusproxy}/content/repositories/releases/</url>
212         </repository>
213         <repository>
214             <id>ecomp-snapshots</id>
215             <name>ECOMP Snapshot Repository</name>
216             <url>${nexusproxy}/content/repositories/snapshots/</url>
217         </repository>
218         <repository>
219             <id>ecomp-staging</id>
220             <name>ECOMP Staging Repository</name>
221             <url>${nexusproxy}/content/repositories/staging/</url>
222         </repository>
223     </repositories>
224
225         <build>
226                 <finalName>model-loader</finalName>
227                 <plugins>
228                         <plugin>
229                                 <groupId>org.springframework.boot</groupId>
230                                 <artifactId>spring-boot-maven-plugin</artifactId>
231                                 <version>${spring-boot.version}</version>
232                                 <configuration>
233                                         <executable>true</executable>
234                                 </configuration>
235                                 <executions>
236                                         <execution>
237                                                 <goals>
238                                                         <goal>repackage</goal>
239                                                 </goals>
240                                         </execution>
241                                 </executions>
242                         </plugin>
243                         <plugin>
244                                 <groupId>org.apache.maven.plugins</groupId>
245                                 <artifactId>maven-resources-plugin</artifactId>
246                                 <version>2.7</version>
247                                 <executions>
248                                         <execution>
249                                                 <id>copy-docker-file</id>
250                                                 <phase>package</phase>
251                                                 <goals>
252                                                         <goal>copy-resources</goal>
253                                                 </goals>
254                                                 <configuration>
255                                                         <outputDirectory>target</outputDirectory>
256                                                         <overwrite>true</overwrite>
257                                                         <resources>
258                                                                 <resource>
259                                                                         <directory>${basedir}/src/main/docker</directory>
260                                                                         <filtering>true</filtering>
261                                                                         <includes>
262                                                                                 <include>**/*</include>
263                                                                         </includes>
264                                                                 </resource>
265                                                                 <resource>
266                                                                         <directory>${basedir}/src/main/bin/</directory>
267                                                                 </resource>
268                                                         </resources>
269                                                 </configuration>
270                                         </execution>
271                                 </executions>
272                         </plugin>
273             <plugin>
274                 <groupId>com.mycila</groupId>
275                 <artifactId>license-maven-plugin</artifactId>
276                 <version>3.0</version>
277                 <configuration>
278                     <header>License.txt</header>
279                     <includes>
280                         <include>src/main/java/**</include>
281                         <include>src/test/java/**</include>
282                         <include>version/properties</include>
283                         <include>pom.xml</include>
284                     </includes>
285                     <skipExistingHeaders>true</skipExistingHeaders>
286                 </configuration>
287                 <executions>
288                     <execution>
289                         <goals>
290                             <!-- Set goal to "format" to auto update license headers -->
291                             <goal>check</goal>
292                         </goals>
293                         <phase>process-sources</phase>
294                     </execution>
295                 </executions>
296             </plugin>
297                         <plugin>
298                                 <groupId>com.spotify</groupId>
299                                 <artifactId>docker-maven-plugin</artifactId>
300                                 <version>0.4.11</version>
301                                 <dependencies>
302                                         <dependency>
303                                                 <groupId>com.github.jnr</groupId>
304                                                 <artifactId>jnr-unixsocket</artifactId>
305                                                 <version>0.13</version>
306                                         </dependency>
307                                 </dependencies>
308                                 <configuration>
309                                         <verbose>true</verbose>
310                                         <serverId>docker-hub</serverId>
311                                         <imageName>${docker.push.registry}/onap/${project.artifactId}</imageName>
312                                         <dockerDirectory>${docker.location}</dockerDirectory>
313                                         <imageTags>
314                                                 <imageTag>latest</imageTag>
315                                         </imageTags>
316                                         <forceTags>true</forceTags>
317                                 </configuration>
318                         </plugin>
319                         <plugin>
320                                 <groupId>org.apache.maven.plugins</groupId>
321                                 <artifactId>maven-deploy-plugin</artifactId>
322                                 <configuration>
323                                         <skip>true</skip>
324                                 </configuration>
325                         </plugin>
326                 </plugins>
327         </build>
328 </project>