Port champ-microservice project restructure
[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>org.jacoco</groupId>
179                 <artifactId>jacoco-maven-plugin</artifactId>
180                 <version>0.7.9</version>
181                 <executions>
182                     <execution>
183                         <id>default-prepare-agent</id>
184                         <goals>
185                             <goal>prepare-agent</goal>
186                         </goals>
187                     </execution>
188                     <execution>
189                         <id>default-report</id>
190                         <phase>prepare-package</phase>
191                         <goals>
192                             <goal>report</goal>
193                         </goals>
194                     </execution>
195                     <execution>
196                         <id>default-check</id>
197                         <goals>
198                             <goal>check</goal>
199                         </goals>
200                         <configuration>
201                             <rules>
202                                 <!--  implementation is needed only for Maven 2  -->
203                                 <rule implementation="org.jacoco.maven.RuleConfiguration">
204                                     <element>BUNDLE</element>
205                                     <limits>
206                                         <!--  implementation is needed only for Maven 2  -->
207                                         <limit implementation="org.jacoco.report.check.Limit">
208                                             <counter>INSTRUCTION</counter>
209                                             <value>COVEREDRATIO</value>
210                                             <minimum>.15</minimum>
211                                         </limit>
212                                         <limit implementation="org.jacoco.report.check.Limit">
213                                             <counter>BRANCH</counter>
214                                             <value>COVEREDRATIO</value>
215                                             <minimum>.12</minimum>
216                                         </limit>
217                                         <limit implementation="org.jacoco.report.check.Limit">
218                                             <counter>COMPLEXITY</counter>
219                                             <value>COVEREDRATIO</value>
220                                             <minimum>.15</minimum>
221                                         </limit>
222                                         <limit implementation="org.jacoco.report.check.Limit">
223                                             <counter>LINE</counter>
224                                             <value>COVEREDRATIO</value>
225                                             <minimum>.10</minimum>
226                                         </limit>
227                                         <limit implementation="org.jacoco.report.check.Limit">
228                                             <counter>METHOD</counter>
229                                             <value>COVEREDRATIO</value>
230                                             <minimum>.17</minimum>
231                                         </limit>
232                                         <limit implementation="org.jacoco.report.check.Limit">
233                                             <counter>CLASS</counter>
234                                             <value>MISSEDCOUNT</value>
235                                             <maximum>5</maximum>
236                                         </limit>
237                                     </limits>
238                                 </rule>
239                             </rules>
240                         </configuration>
241                     </execution>
242                 </executions>
243             </plugin>
244         </plugins>
245     </build>
246
247     <profiles>
248         <profile>
249             <id>runAjsc</id>
250             <build>
251                 <defaultGoal>initialize</defaultGoal>
252                 <plugins>
253                     <plugin>
254                         <groupId>org.codehaus.mojo</groupId>
255                         <artifactId>exec-maven-plugin</artifactId>
256                         <version>1.3.2</version>
257                         <executions>
258                             <execution>
259                                 <phase>initialize</phase>
260                                 <goals>
261                                     <goal>java</goal>
262                                 </goals>
263                                 <configuration>
264                                     <includeProjectDependencies>false</includeProjectDependencies>
265                                     <includePluginDependencies>true</includePluginDependencies>
266                                     <executable>java</executable>
267                                     <mainClass>com.att.ajsc.runner.Runner</mainClass>
268                                     <executableDependency>
269                                         <groupId>com.att.ajsc</groupId>
270                                         <artifactId>ajsc-runner</artifactId>
271                                     </executableDependency>
272                                     <additionalClasspathElements>
273                                         <additionalClasspathElement>${basedir}/ajsc-shared-config/etc</additionalClasspathElement>
274                                     </additionalClasspathElements>
275
276                                     <environmentVariables>
277                                         <AJSC_HOME>${runAjscHome}</AJSC_HOME>
278                                     </environmentVariables>
279
280                                     <!-- Main AJSC System Properties below (necessary for proper startup) -->
281                                     <systemProperties>
282                                         <systemProperty>
283                                             <key>AJSC_HOME</key>
284                                             <value>${runAjscHome}</value>
285                                         </systemProperty>
286                                         <systemProperty>
287                                             <key>CONFIG_HOME</key>
288                                             <value>${basedir}/appconfig-local/</value>
289                                         </systemProperty>
290                                         <systemProperty>
291                                             <key>AJSC_CONF_HOME</key>
292                                             <value>${basedir}/bundleconfig-local</value>
293                                         </systemProperty>
294                                         <systemProperty>
295                                             <key>logback.configurationFile</key>
296                                             <value>${basedir}/ajsc-shared-config/etc/logback.xml</value>
297                                         </systemProperty>
298                                         <systemProperty>
299                                             <key>AJSC_SHARED_CONFIG</key>
300                                             <value>${basedir}/ajsc-shared-config</value>
301                                         </systemProperty>
302
303                                         <sysproperty>
304                                             <key>AJSC_EXTERNAL_LIB_FOLDERS</key>
305                                             <value>${basedir}/target/commonLibs</value>
306                                         </sysproperty>
307                                         <sysproperty>
308                                             <key>AJSC_EXTERNAL_PROPERTIES_FOLDERS</key>
309                                             <value>${basedir}/ajsc-shared-config/etc</value>
310                                         </sysproperty>
311
312                                         <systemProperty>
313                                             <key>AJSC_SERVICE_NAMESPACE</key>
314                                             <value>${module.ajsc.namespace.name}</value>
315                                         </systemProperty>
316                                         <systemProperty>
317                                             <key>AJSC_SERVICE_VERSION</key>
318                                             <value>${module.ajsc.namespace.version}</value>
319                                         </systemProperty>
320                                         <systemProperty>
321                                             <key>SOACLOUD_SERVICE_VERSION</key>
322                                             <value>${project.version}</value>
323                                         </systemProperty>
324                                         <systemProperty>
325                                             <key>server.port</key>
326                                             <value>${serverPort}</value>
327                                         </systemProperty>
328                                     </systemProperties>
329
330                                     <!-- Command Line Arguments to add to the java command. Here, you
331                                         can specify the port as well as the Context you want your service to run
332                                         in. Use context=/ to run in an unnamed Context (Root Context). The default
333                                         configuration of the AJSC is to run under the / Context. Setting the port
334                                         here can aid during the development phase of your service. However, you can
335                                         leave this argument out entirely, and the AJSC will default to using an Ephemeral
336                                         port. -->
337                                     <arguments>
338                                         <argument>context=/</argument>
339                                         <argument>port=${serverPort}</argument>
340                                         <argument>sslport=${sslport}</argument>
341                                     </arguments>
342                                 </configuration>
343                             </execution>
344                         </executions>
345                         <configuration>
346                             <executable>java</executable>
347                         </configuration>
348                         <dependencies>
349                             <dependency>
350                                 <groupId>com.att.ajsc</groupId>
351                                 <artifactId>ajsc-runner</artifactId>
352                                 <version>${ajscRuntimeVersion}</version>
353                             </dependency>
354                         </dependencies>
355                     </plugin>
356                 </plugins>
357             </build>
358         </profile>
359     </profiles>
360 </project>