25500c3fb749644521344e92e27a157b06538fb5
[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         <common.logging.groupid>org.onap.aai.logging-service</common.logging.groupid>
31         <common.logging.version>1.2.0</common.logging.version>
32         <org.apache.httpcomponents.httpclient.version>4.5.2</org.apache.httpcomponents.httpclient.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         <dependency>
100             <groupId>org.apache.httpcomponents</groupId>
101             <artifactId>httpclient</artifactId>
102             <version>${org.apache.httpcomponents.httpclient.version}</version>
103         </dependency>
104
105         <!-- Champ graph database library. -->
106         <dependency>
107             <groupId>org.onap.aai</groupId>
108             <artifactId>champ-core</artifactId>
109             <version>1.2.0-SNAPSHOT</version>
110             <scope>compile</scope>
111             <exclusions>
112                 <exclusion>
113                     <groupId>org.apache.hbase</groupId>
114                     <artifactId>hbase-client</artifactId>
115                 </exclusion>
116             </exclusions>
117         </dependency>
118     </dependencies>
119
120     <build>
121         <finalName>${project.artifactId}</finalName>
122         <plugins>
123             <plugin>
124                 <groupId>org.apache.maven.plugins</groupId>
125                 <artifactId>maven-resources-plugin</artifactId>
126                 <version>2.7</version>
127                 <executions>
128                     <execution>
129                         <id>copy-docker-file</id>
130                         <phase>package</phase>
131                         <goals>
132                             <goal>copy-resources</goal>
133                         </goals>
134                         <configuration>
135                             <outputDirectory>target</outputDirectory>
136                             <overwrite>true</overwrite>
137                             <resources>
138                                 <resource>
139                                     <directory>${basedir}/src/main/docker</directory>
140                                     <filtering>true</filtering>
141                                     <includes>
142                                         <include>**/*</include>
143                                     </includes>
144                                 </resource>
145                                 <resource>
146                                     <directory>${basedir}/src/main/bin/</directory>
147                                 </resource>
148                             </resources>
149                         </configuration>
150                     </execution>
151                 </executions>
152             </plugin>
153
154             <plugin>
155                 <groupId>com.mycila</groupId>
156                 <artifactId>license-maven-plugin</artifactId>
157                 <version>3.0</version>
158                 <configuration>
159                     <header>License.txt</header>
160                     <includes>
161                         <include>src/main/java/**</include>
162                     </includes>
163                 </configuration>
164                 <executions>
165                     <execution>
166                         <goals>
167                             <goal>format</goal>
168                         </goals>
169                         <phase>process-sources</phase>
170                     </execution>
171                 </executions>
172             </plugin>
173
174             <plugin>
175                 <groupId>com.spotify</groupId>
176                 <artifactId>docker-maven-plugin</artifactId>
177                 <version>0.4.11</version>
178                 <configuration>
179                     <verbose>true</verbose>
180                     <serverId>docker-hub</serverId>
181                     <imageName>${docker.push.registry}/onap/${project.artifactId}</imageName>
182                     <dockerDirectory>${docker.location}</dockerDirectory>
183                     <imageTags>
184                         <imageTag>latest</imageTag>
185                     </imageTags>
186                     <forceTags>true</forceTags>
187                 </configuration>
188             </plugin>
189
190             <plugin>
191                 <groupId>org.jacoco</groupId>
192                 <artifactId>jacoco-maven-plugin</artifactId>
193                 <version>0.7.9</version>
194                 <executions>
195                     <execution>
196                         <id>default-prepare-agent</id>
197                         <goals>
198                             <goal>prepare-agent</goal>
199                         </goals>
200                     </execution>
201                     <execution>
202                         <id>default-report</id>
203                         <phase>prepare-package</phase>
204                         <goals>
205                             <goal>report</goal>
206                         </goals>
207                     </execution>
208                     <execution>
209                         <id>default-check</id>
210                         <goals>
211                             <goal>check</goal>
212                         </goals>
213                         <configuration>
214                             <rules>
215                                 <!--  implementation is needed only for Maven 2  -->
216                                 <rule implementation="org.jacoco.maven.RuleConfiguration">
217                                     <element>BUNDLE</element>
218                                     <limits>
219                                         <!--  implementation is needed only for Maven 2  -->
220                                         <limit implementation="org.jacoco.report.check.Limit">
221                                             <counter>INSTRUCTION</counter>
222                                             <value>COVEREDRATIO</value>
223                                             <minimum>.15</minimum>
224                                         </limit>
225                                         <limit implementation="org.jacoco.report.check.Limit">
226                                             <counter>BRANCH</counter>
227                                             <value>COVEREDRATIO</value>
228                                             <minimum>.12</minimum>
229                                         </limit>
230                                         <limit implementation="org.jacoco.report.check.Limit">
231                                             <counter>COMPLEXITY</counter>
232                                             <value>COVEREDRATIO</value>
233                                             <minimum>.15</minimum>
234                                         </limit>
235                                         <limit implementation="org.jacoco.report.check.Limit">
236                                             <counter>LINE</counter>
237                                             <value>COVEREDRATIO</value>
238                                             <minimum>.10</minimum>
239                                         </limit>
240                                         <limit implementation="org.jacoco.report.check.Limit">
241                                             <counter>METHOD</counter>
242                                             <value>COVEREDRATIO</value>
243                                             <minimum>.17</minimum>
244                                         </limit>
245                                         <limit implementation="org.jacoco.report.check.Limit">
246                                             <counter>CLASS</counter>
247                                             <value>MISSEDCOUNT</value>
248                                             <maximum>5</maximum>
249                                         </limit>
250                                     </limits>
251                                 </rule>
252                             </rules>
253                         </configuration>
254                     </execution>
255                 </executions>
256             </plugin>
257         </plugins>
258     </build>
259
260     <profiles>
261         <profile>
262             <id>runAjsc</id>
263             <build>
264                 <defaultGoal>initialize</defaultGoal>
265                 <plugins>
266                     <plugin>
267                         <groupId>org.codehaus.mojo</groupId>
268                         <artifactId>exec-maven-plugin</artifactId>
269                         <version>1.3.2</version>
270                         <executions>
271                             <execution>
272                                 <phase>initialize</phase>
273                                 <goals>
274                                     <goal>java</goal>
275                                 </goals>
276                                 <configuration>
277                                     <includeProjectDependencies>false</includeProjectDependencies>
278                                     <includePluginDependencies>true</includePluginDependencies>
279                                     <executable>java</executable>
280                                     <mainClass>com.att.ajsc.runner.Runner</mainClass>
281                                     <executableDependency>
282                                         <groupId>com.att.ajsc</groupId>
283                                         <artifactId>ajsc-runner</artifactId>
284                                     </executableDependency>
285                                     <additionalClasspathElements>
286                                         <additionalClasspathElement>${basedir}/ajsc-shared-config/etc</additionalClasspathElement>
287                                     </additionalClasspathElements>
288
289                                     <environmentVariables>
290                                         <AJSC_HOME>${runAjscHome}</AJSC_HOME>
291                                     </environmentVariables>
292
293                                     <!-- Main AJSC System Properties below (necessary for proper startup) -->
294                                     <systemProperties>
295                                         <systemProperty>
296                                             <key>AJSC_HOME</key>
297                                             <value>${runAjscHome}</value>
298                                         </systemProperty>
299                                         <systemProperty>
300                                             <key>CONFIG_HOME</key>
301                                             <value>${basedir}/appconfig-local/</value>
302                                         </systemProperty>
303                                         <systemProperty>
304                                             <key>AJSC_CONF_HOME</key>
305                                             <value>${basedir}/bundleconfig-local</value>
306                                         </systemProperty>
307                                         <systemProperty>
308                                             <key>logback.configurationFile</key>
309                                             <value>${basedir}/ajsc-shared-config/etc/logback.xml</value>
310                                         </systemProperty>
311                                         <systemProperty>
312                                             <key>AJSC_SHARED_CONFIG</key>
313                                             <value>${basedir}/ajsc-shared-config</value>
314                                         </systemProperty>
315
316                                         <sysproperty>
317                                             <key>AJSC_EXTERNAL_LIB_FOLDERS</key>
318                                             <value>${basedir}/target/commonLibs</value>
319                                         </sysproperty>
320                                         <sysproperty>
321                                             <key>AJSC_EXTERNAL_PROPERTIES_FOLDERS</key>
322                                             <value>${basedir}/ajsc-shared-config/etc</value>
323                                         </sysproperty>
324
325                                         <systemProperty>
326                                             <key>AJSC_SERVICE_NAMESPACE</key>
327                                             <value>${module.ajsc.namespace.name}</value>
328                                         </systemProperty>
329                                         <systemProperty>
330                                             <key>AJSC_SERVICE_VERSION</key>
331                                             <value>${module.ajsc.namespace.version}</value>
332                                         </systemProperty>
333                                         <systemProperty>
334                                             <key>SOACLOUD_SERVICE_VERSION</key>
335                                             <value>${project.version}</value>
336                                         </systemProperty>
337                                         <systemProperty>
338                                             <key>server.port</key>
339                                             <value>${serverPort}</value>
340                                         </systemProperty>
341                                     </systemProperties>
342
343                                     <!-- Command Line Arguments to add to the java command. Here, you
344                                         can specify the port as well as the Context you want your service to run
345                                         in. Use context=/ to run in an unnamed Context (Root Context). The default
346                                         configuration of the AJSC is to run under the / Context. Setting the port
347                                         here can aid during the development phase of your service. However, you can
348                                         leave this argument out entirely, and the AJSC will default to using an Ephemeral
349                                         port. -->
350                                     <arguments>
351                                         <argument>context=/</argument>
352                                         <argument>port=${serverPort}</argument>
353                                         <argument>sslport=${sslport}</argument>
354                                     </arguments>
355                                 </configuration>
356                             </execution>
357                         </executions>
358                         <configuration>
359                             <executable>java</executable>
360                         </configuration>
361                         <dependencies>
362                             <dependency>
363                                 <groupId>com.att.ajsc</groupId>
364                                 <artifactId>ajsc-runner</artifactId>
365                                 <version>${ajscRuntimeVersion}</version>
366                             </dependency>
367                         </dependencies>
368                     </plugin>
369                 </plugins>
370             </build>
371         </profile>
372     </profiles>
373 </project>