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