Merge "Catch IllegalArgumentException for error message"
[aai/champ.git] / champ-service / pom.xml
1 <!--
2 ============LICENSE_START=======================================================
3 org.onap.aai
4 ================================================================================
5 Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6 Copyright © 2017-2018 Amdocs
7 ================================================================================
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 ============LICENSE_END=========================================================
20 -->
21 <project xmlns="http://maven.apache.org/POM/4.0.0"
22          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>com.att.ajsc</groupId>
28         <artifactId>ajsc-archetype-parent</artifactId>
29         <version>2.0.0</version>
30     </parent>
31
32     <groupId>org.onap.aai</groupId>
33     <artifactId>champ-service</artifactId>
34     <version>1.2.0-SNAPSHOT</version>
35     <name>champ</name>
36
37     <properties>
38         <runAjscHome>${basedir}/target/swm/package/nix/dist_files${distFilesRoot}</runAjscHome>
39         <ajscRuntimeVersion>2.0.0</ajscRuntimeVersion>
40
41         <absoluteDistFilesRoot>/appl/${project.artifactId}</absoluteDistFilesRoot>
42
43         <!-- For NO Versioning, REMOVE the /${project.version} from the <distFilesRoot>
44             property, below. PLEASE, NOTE: If your ${project.version} is a "-SNAPSHOT"
45             version, THIS will be used as your directory structure. If you do NOT want
46             this, simply remove the "-SNAPSHOT" from your <version> declaration at the
47             top of pom.xml -->
48         <distFilesRoot>/appl/${project.artifactId}/${project.version}</distFilesRoot>
49
50         <common.logging.groupid>org.onap.aai.logging-service</common.logging.groupid>
51         <common.logging.version>1.2.2</common.logging.version>
52         <org.apache.httpcomponents.httpclient.version>4.5.2</org.apache.httpcomponents.httpclient.version>
53
54         <docker.location>${basedir}/target</docker.location>
55         <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
56     </properties>
57
58     <dependencies>
59         <dependency>
60             <groupId>com.sun.jersey</groupId>
61             <artifactId>jersey-core</artifactId>
62             <version>1.18.6</version>
63         </dependency>
64
65         <dependency>
66             <groupId>dom4j</groupId>
67             <artifactId>dom4j</artifactId>
68             <version>1.6.1</version>
69             <scope>provided</scope>
70         </dependency>
71
72         <dependency>
73             <groupId>com.att.aft</groupId>
74             <artifactId>dme2</artifactId>
75             <version>3.1.200</version>
76             <scope>provided</scope>
77         </dependency>
78
79         <dependency>
80             <groupId>org.json</groupId>
81             <artifactId>json</artifactId>
82             <version>20160212</version>
83         </dependency>
84
85         <dependency>
86             <groupId>org.glassfish.jersey.core</groupId>
87             <artifactId>jersey-client</artifactId>
88             <version>2.23</version>
89         </dependency>
90
91         <dependency>
92             <groupId>commons-io</groupId>
93             <artifactId>commons-io</artifactId>
94             <version>2.4</version>
95         </dependency>
96
97         <dependency>
98             <groupId>com.google.code.gson</groupId>
99             <artifactId>gson</artifactId>
100             <version>2.6.2</version>
101         </dependency>
102
103         <dependency>
104             <groupId>${common.logging.groupid}</groupId>
105             <artifactId>common-logging</artifactId>
106             <version>${common.logging.version}</version>
107         </dependency>
108
109         <dependency>
110             <groupId>ch.qos.logback</groupId>
111             <artifactId>logback-core</artifactId>
112             <version>1.1.7</version>
113         </dependency>
114
115         <dependency>
116             <groupId>org.eclipse.persistence</groupId>
117             <artifactId>eclipselink</artifactId>
118             <version>2.6.2</version>
119         </dependency>
120
121         <dependency>
122             <groupId>org.apache.httpcomponents</groupId>
123             <artifactId>httpclient</artifactId>
124             <version>${org.apache.httpcomponents.httpclient.version}</version>
125         </dependency>
126
127         <dependency>
128             <groupId>org.onap.aai</groupId>
129             <artifactId>champ-core</artifactId>
130             <version>1.2.0-SNAPSHOT</version>
131             <scope>compile</scope>
132             <exclusions>
133                 <exclusion>
134                     <groupId>org.apache.hbase</groupId>
135                     <artifactId>hbase-client</artifactId>
136                 </exclusion>
137             </exclusions>
138         </dependency>
139     </dependencies>
140
141     <distributionManagement>
142         <repository>
143             <id>ecomp-releases</id>
144             <name>ECOMP Release Repository</name>
145             <url>${onap.nexus.url}/content/repositories/releases/</url>
146         </repository>
147         <snapshotRepository>
148             <id>ecomp-snapshots</id>
149             <name>ECOMP Snapshot Repository</name>
150             <url>${onap.nexus.url}/content/repositories/snapshots/</url>
151         </snapshotRepository>
152     </distributionManagement>
153
154     <build>
155         <finalName>${project.artifactId}</finalName>
156         <plugins>
157             <plugin>
158                 <groupId>org.apache.maven.plugins</groupId>
159                 <artifactId>maven-resources-plugin</artifactId>
160                 <version>2.7</version>
161                 <executions>
162                     <execution>
163                         <id>copy-docker-file</id>
164                         <phase>package</phase>
165                         <goals>
166                             <goal>copy-resources</goal>
167                         </goals>
168                         <configuration>
169                             <outputDirectory>target</outputDirectory>
170                             <overwrite>true</overwrite>
171                             <resources>
172                                 <resource>
173                                     <directory>${basedir}/src/main/docker</directory>
174                                     <filtering>true</filtering>
175                                     <includes>
176                                         <include>**/*</include>
177                                     </includes>
178                                 </resource>
179                                 <resource>
180                                     <directory>${basedir}/src/main/bin/</directory>
181                                 </resource>
182                                 <resource>
183                                     <directory>../champ-service-deps-janus/target/</directory>
184                                 </resource>
185                                 <resource>
186                                     <directory>../champ-service-deps-titan/target/</directory>
187                                 </resource>
188                             </resources>
189                         </configuration>
190                     </execution>
191                 </executions>
192             </plugin>
193             <plugin>
194                 <groupId>org.apache.maven.plugins</groupId>
195                 <artifactId>maven-deploy-plugin</artifactId>
196                 <configuration>
197                     <skip>true</skip>
198                 </configuration>
199             </plugin>
200             <!--
201             <plugin>
202                 <groupId>com.mycila</groupId>
203                 <artifactId>license-maven-plugin</artifactId>
204                 <version>3.0</version>
205                 <configuration>
206                     <header>License.txt</header>
207                     <includes>
208                         <include>src/main/java/**</include>
209                     </includes>
210                 </configuration>
211                 <executions>
212                     <execution>
213                         <goals>
214                             <goal>format</goal>
215                         </goals>
216                         <phase>process-sources</phase>
217                     </execution>
218                 </executions>
219             </plugin>
220             -->
221             <plugin>
222                 <groupId>com.spotify</groupId>
223                 <artifactId>docker-maven-plugin</artifactId>
224                 <version>0.4.11</version>
225                 <configuration>
226                     <verbose>true</verbose>
227                     <serverId>docker-hub</serverId>
228                     <imageName>${docker.push.registry}/onap/${project.name}</imageName>
229                     <dockerDirectory>${docker.location}</dockerDirectory>
230                     <imageTags>
231                         <imageTag>latest</imageTag>
232                     </imageTags>
233                     <forceTags>true</forceTags>
234                 </configuration>
235             </plugin>
236             <plugin>
237                 <groupId>org.jacoco</groupId>
238                 <artifactId>jacoco-maven-plugin</artifactId>
239                 <version>0.7.9</version>
240                 <executions>
241                     <execution>
242                         <id>default-prepare-agent</id>
243                         <goals>
244                             <goal>prepare-agent</goal>
245                         </goals>
246                     </execution>
247                     <execution>
248                         <id>default-report</id>
249                         <phase>prepare-package</phase>
250                         <goals>
251                             <goal>report</goal>
252                         </goals>
253                     </execution>
254                     <execution>
255                         <id>default-check</id>
256                         <goals>
257                             <goal>check</goal>
258                         </goals>
259                         <configuration>
260                             <rules>
261                                 <!--  implementation is needed only for Maven 2  -->
262                                 <rule implementation="org.jacoco.maven.RuleConfiguration">
263                                     <element>BUNDLE</element>
264                                     <limits>
265                                         <!--  implementation is needed only for Maven 2  -->
266                                         <limit implementation="org.jacoco.report.check.Limit">
267                                             <counter>INSTRUCTION</counter>
268                                             <value>COVEREDRATIO</value>
269                                             <minimum>.15</minimum>
270                                         </limit>
271                                         <limit implementation="org.jacoco.report.check.Limit">
272                                             <counter>BRANCH</counter>
273                                             <value>COVEREDRATIO</value>
274                                             <minimum>.12</minimum>
275                                         </limit>
276                                         <limit implementation="org.jacoco.report.check.Limit">
277                                             <counter>COMPLEXITY</counter>
278                                             <value>COVEREDRATIO</value>
279                                             <minimum>.15</minimum>
280                                         </limit>
281                                         <limit implementation="org.jacoco.report.check.Limit">
282                                             <counter>LINE</counter>
283                                             <value>COVEREDRATIO</value>
284                                             <minimum>.10</minimum>
285                                         </limit>
286                                         <limit implementation="org.jacoco.report.check.Limit">
287                                             <counter>METHOD</counter>
288                                             <value>COVEREDRATIO</value>
289                                             <minimum>.17</minimum>
290                                         </limit>
291                                         <limit implementation="org.jacoco.report.check.Limit">
292                                             <counter>CLASS</counter>
293                                             <value>MISSEDCOUNT</value>
294                                             <maximum>5</maximum>
295                                         </limit>
296                                     </limits>
297                                 </rule>
298                             </rules>
299                         </configuration>
300                     </execution>
301                 </executions>
302             </plugin>
303         </plugins>
304     </build>
305
306     <profiles>
307         <profile>
308             <id>runAjsc</id>
309             <build>
310                 <defaultGoal>initialize</defaultGoal>
311                 <plugins>
312                     <plugin>
313                         <groupId>org.codehaus.mojo</groupId>
314                         <artifactId>exec-maven-plugin</artifactId>
315                         <version>1.3.2</version>
316                         <executions>
317                             <execution>
318                                 <phase>initialize</phase>
319                                 <goals>
320                                     <goal>java</goal>
321                                 </goals>
322                                 <configuration>
323                                     <includeProjectDependencies>false</includeProjectDependencies>
324                                     <includePluginDependencies>true</includePluginDependencies>
325                                     <executable>java</executable>
326                                     <mainClass>com.att.ajsc.runner.Runner</mainClass>
327                                     <executableDependency>
328                                         <groupId>com.att.ajsc</groupId>
329                                         <artifactId>ajsc-runner</artifactId>
330                                     </executableDependency>
331                                     <additionalClasspathElements>
332                                         <additionalClasspathElement>${basedir}/ajsc-shared-config/etc</additionalClasspathElement>
333                                     </additionalClasspathElements>
334
335                                     <environmentVariables>
336                                         <AJSC_HOME>${runAjscHome}</AJSC_HOME>
337                                     </environmentVariables>
338
339                                     <!-- Main AJSC System Properties below (necessary for proper startup) -->
340                                     <systemProperties>
341                                         <systemProperty>
342                                             <key>AJSC_HOME</key>
343                                             <value>${runAjscHome}</value>
344                                         </systemProperty>
345                                         <systemProperty>
346                                             <key>CONFIG_HOME</key>
347                                             <value>${basedir}/appconfig-local/</value>
348                                         </systemProperty>
349                                         <systemProperty>
350                                             <key>AJSC_CONF_HOME</key>
351                                             <value>${basedir}/bundleconfig-local</value>
352                                         </systemProperty>
353                                         <systemProperty>
354                                             <key>logback.configurationFile</key>
355                                             <value>${basedir}/ajsc-shared-config/etc/logback.xml</value>
356                                         </systemProperty>
357                                         <systemProperty>
358                                             <key>AJSC_SHARED_CONFIG</key>
359                                             <value>${basedir}/ajsc-shared-config</value>
360                                         </systemProperty>
361
362                                         <sysproperty>
363                                             <key>AJSC_EXTERNAL_LIB_FOLDERS</key>
364                                             <value>${basedir}/target/commonLibs</value>
365                                         </sysproperty>
366                                         <sysproperty>
367                                             <key>AJSC_EXTERNAL_PROPERTIES_FOLDERS</key>
368                                             <value>${basedir}/ajsc-shared-config/etc</value>
369                                         </sysproperty>
370
371                                         <systemProperty>
372                                             <key>AJSC_SERVICE_NAMESPACE</key>
373                                             <value>${module.ajsc.namespace.name}</value>
374                                         </systemProperty>
375                                         <systemProperty>
376                                             <key>AJSC_SERVICE_VERSION</key>
377                                             <value>${module.ajsc.namespace.version}</value>
378                                         </systemProperty>
379                                         <systemProperty>
380                                             <key>SOACLOUD_SERVICE_VERSION</key>
381                                             <value>${project.version}</value>
382                                         </systemProperty>
383                                         <systemProperty>
384                                             <key>server.port</key>
385                                             <value>${serverPort}</value>
386                                         </systemProperty>
387                                     </systemProperties>
388
389                                     <!-- Command Line Arguments to add to the java command. Here, you
390                                         can specify the port as well as the Context you want your service to run
391                                         in. Use context=/ to run in an unnamed Context (Root Context). The default
392                                         configuration of the AJSC is to run under the / Context. Setting the port
393                                         here can aid during the development phase of your service. However, you can
394                                         leave this argument out entirely, and the AJSC will default to using an Ephemeral
395                                         port. -->
396                                     <arguments>
397                                         <argument>context=/</argument>
398                                         <argument>port=${serverPort}</argument>
399                                         <argument>sslport=${sslport}</argument>
400                                     </arguments>
401                                 </configuration>
402                             </execution>
403                         </executions>
404                         <configuration>
405                             <executable>java</executable>
406                         </configuration>
407                         <dependencies>
408                             <dependency>
409                                 <groupId>com.att.ajsc</groupId>
410                                 <artifactId>ajsc-runner</artifactId>
411                                 <version>${ajscRuntimeVersion}</version>
412                             </dependency>
413                         </dependencies>
414                     </plugin>
415                 </plugins>
416             </build>
417         </profile>
418     </profiles>
419 </project>