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