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