Make container parameters configurable
[aai/gizmo.git] / pom.xml
1 <project xmlns="http://maven.apache.org/POM/4.0.0"
2          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4     <modelVersion>4.0.0</modelVersion>
5
6     <parent>
7         <artifactId>ajsc-archetype-parent</artifactId>
8         <groupId>com.att.ajsc</groupId>
9         <version>2.0.0</version>
10     </parent>
11     <groupId>org.onap.aai.gizmo</groupId>
12     <artifactId>gizmo</artifactId>
13     <version>1.2.0-SNAPSHOT</version>
14     <name>aai-gizmo</name>
15
16     <properties>
17         <docker.location>${basedir}/target</docker.location>
18         <module.ajsc.namespace.name>crud-api</module.ajsc.namespace.name>
19         <module.ajsc.namespace.version>v1</module.ajsc.namespace.version>
20         <ajscRuntimeVersion>2.0.0</ajscRuntimeVersion>
21         <absoluteDistFilesRoot>/appl/${project.artifactId}</absoluteDistFilesRoot>
22         <nexusproxy>https://nexus.onap.org</nexusproxy>
23
24         <!-- For NO Versioning, REMOVE the /${project.version} from the <distFilesRoot>
25             property, below. PLEASE, NOTE: If your ${project.version} is a "-SNAPSHOT"
26             version, THIS will be used as your directory structure. If you do NOT want
27             this, simply remove the "-SNAPSHOT" from your <version> declaration at the
28             top of pom.xml -->
29         <distFilesRoot>/appl/${project.artifactId}/${project.version}</distFilesRoot>
30         <runAjscHome>${basedir}/target/swm/package/nix/dist_files${distFilesRoot}</runAjscHome>
31
32         <!-- Port Selection. A value of 0 will allow for dynamic port selection.
33             For local testing, you may choose to hardcode this value to something like
34             8080 -->
35         <serverPort>0</serverPort>
36         <sslport>9520</sslport>
37
38         <testRouteOffer>workstation</testRouteOffer>
39         <testEnv>DEV</testEnv>
40         <checkstyle.config.location>google_checks.xml</checkstyle.config.location>
41
42         <sonar.language>java</sonar.language>
43         <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
44         <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports
45         </sonar.surefire.reportsPath>
46         <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec
47         </sonar.jacoco.reportPath>
48         <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
49         <sonar.projectVersion>${project.version}</sonar.projectVersion>
50     </properties>
51
52     <dependencies>
53
54         <dependency>
55             <groupId>dom4j</groupId>
56             <artifactId>dom4j</artifactId>
57             <version>1.6.1</version>
58             <scope>provided</scope>
59         </dependency>
60
61         <dependency>
62             <groupId>com.att.aft</groupId>
63             <artifactId>dme2</artifactId>
64             <version>3.1.200</version>
65             <scope>provided</scope>
66         </dependency>
67         <dependency>
68             <groupId>commons-io</groupId>
69             <artifactId>commons-io</artifactId>
70             <version>2.4</version>
71         </dependency>
72
73         <dependency>
74             <groupId>com.google.code.gson</groupId>
75             <artifactId>gson</artifactId>
76             <version>2.6.2</version>
77         </dependency>
78
79         <!-- Common logging framework -->
80         <dependency>
81           <groupId>org.onap.aai.logging-service</groupId>
82           <artifactId>common-logging</artifactId>
83           <version>1.1.0</version>
84         </dependency>
85             <dependency>
86                   <groupId>org.glassfish.jersey.core</groupId>
87                   <artifactId>jersey-client</artifactId>
88                   <version>2.23</version>
89             </dependency>
90         <dependency>
91           <groupId>ch.qos.logback</groupId>
92           <artifactId>logback-core</artifactId>
93           <version>1.1.7</version>
94         </dependency>
95                 <dependency>
96           <groupId>org.onap.aai.event-client</groupId>
97           <artifactId>event-client-dmaap</artifactId>
98           <version>1.2.0</version>
99         </dependency>
100         <dependency>
101           <groupId>org.onap.aai.aai-common</groupId>
102           <artifactId>aai-schema</artifactId>
103           <version>1.2.1-SNAPSHOT</version>
104         </dependency>
105         <dependency>
106             <groupId>org.onap.aai.aai-common</groupId>
107             <artifactId>aai-utils</artifactId>
108             <version>1.2.0</version>
109         </dependency>
110         <dependency>
111             <groupId>org.onap.aai.aai-common</groupId>
112             <artifactId>aai-core</artifactId>
113             <version>1.2.1-SNAPSHOT</version>
114             <exclusions>
115                 <exclusion>
116                     <groupId>*</groupId>
117                     <artifactId>*</artifactId>
118                 </exclusion>
119             </exclusions>
120         </dependency>
121
122         <dependency>
123              <groupId>org.onap.aai.aai-common</groupId>
124              <artifactId>aai-auth</artifactId>
125              <version>1.2.0</version>
126         </dependency>
127
128         <dependency>
129           <groupId>org.eclipse.persistence</groupId>
130             <artifactId>eclipselink</artifactId>
131             <version>2.6.2</version>
132         </dependency>
133
134         <dependency>
135             <groupId>org.onap.aai</groupId>
136             <artifactId>rest-client</artifactId>
137             <version>1.1.0</version>
138         </dependency>
139                         <dependency>
140             <groupId>net.dongliu</groupId>
141             <artifactId>gson-java8-datatype</artifactId>
142             <version>1.0.3</version>
143         </dependency>
144         <dependency>
145             <groupId>com.jayway.jsonpath</groupId>
146             <artifactId>json-path</artifactId>
147             <version>2.2.0</version>
148         </dependency>
149                 
150                 <!-- AAI-CORE specific dependencies -->
151                 <dependency>
152                 <groupId>org.apache.tinkerpop</groupId>
153                 <artifactId>gremlin-core</artifactId> 
154                 <version>3.2.3</version>
155                 <scope>provided</scope>
156                 <exclusions>
157                     <exclusion>
158                         <groupId>org.slf4j</groupId>
159                         <artifactId>slf4j-log4j12</artifactId>
160                     </exclusion>
161                     <exclusion>
162                         <groupId>org.slf4j</groupId>
163                         <artifactId>jcl-over-slf4j</artifactId>
164                     </exclusion>
165                 </exclusions>
166      </dependency>
167
168        <dependency>
169             <groupId>org.apache.tinkerpop</groupId>
170             <artifactId>tinkergraph-gremlin</artifactId>
171             <version>3.2.3</version>
172             <scope>provided</scope>
173         </dependency>
174
175         <dependency>
176             <groupId>org.json</groupId>
177             <artifactId>json</artifactId>
178             <version>20160212</version>
179         </dependency>
180         <dependency>
181             <groupId>junit</groupId>
182             <artifactId>junit</artifactId>
183         </dependency>
184
185     </dependencies>
186
187
188     <repositories>
189       <repository>
190         <id>central</id>
191         <name>Maven 2 repository 2</name>
192         <url>http://repo2.maven.org/maven2/</url>
193       </repository>
194       <repository>
195         <id>ecomp-releases</id>
196         <name>ECOMP Release Repository</name>
197         <url>${nexusproxy}/content/repositories/releases/</url>
198       </repository>
199       <repository>
200         <id>ecomp-snapshots</id>
201         <name>ECOMP Snapshot Repository</name>
202         <url>${nexusproxy}/content/repositories/snapshots/</url>
203       </repository>
204       <repository>
205         <id>ecomp-staging</id>
206         <name>ECOMP Staging Repository</name>
207         <url>${nexusproxy}/content/repositories/staging/</url>
208       </repository>
209
210     </repositories>
211
212     <build>
213       <finalName>${project.artifactId}</finalName>
214         <plugins>
215             <plugin>
216                 <groupId>org.apache.maven.plugins</groupId>
217                 <artifactId>maven-resources-plugin</artifactId>
218                 <version>2.7</version>
219                 <executions>
220                     <execution>
221                         <id>copy-docker-file</id>
222                         <phase>package</phase>
223                         <goals>
224                             <goal>copy-resources</goal>
225                         </goals>
226                         <configuration>
227                             <outputDirectory>target</outputDirectory>
228                             <overwrite>true</overwrite>
229                             <resources>
230                                 <resource>
231                                     <directory>${basedir}/src/main/docker</directory>
232                                     <filtering>true</filtering>
233                                     <includes>
234                                         <include>**/*</include>
235                                     </includes>
236                                 </resource>
237                                 <resource>
238                                   <directory>${basedir}/src/main/bin/</directory>
239                                 </resource>
240                             </resources>
241                         </configuration>
242                     </execution>
243                 </executions>
244             </plugin>
245
246             <plugin>
247               <groupId>com.spotify</groupId>
248               <artifactId>docker-maven-plugin</artifactId>
249               <version>0.4.11</version>
250               <configuration>
251                 <verbose>true</verbose>
252                 <serverId>docker-hub</serverId>
253                 <imageName>${docker.push.registry}/onap/${project.artifactId}</imageName>
254                 <dockerDirectory>${docker.location}</dockerDirectory>
255                 <imageTags>
256                   <imageTag>latest</imageTag>
257                 </imageTags>
258                 <forceTags>true</forceTags>
259               </configuration>
260             </plugin>
261
262             <!-- license plugin -->
263             <plugin>
264                 <groupId>com.mycila</groupId>
265                 <artifactId>license-maven-plugin</artifactId>
266                 <version>3.0</version>
267                 <configuration>
268                     <header>License.txt</header>
269                     <includes>
270                         <include>src/main/java/**</include>
271                     </includes>
272                 </configuration>
273                 <executions>
274                     <execution>
275                         <goals>
276                             <goal>format</goal>
277                         </goals>
278                         <phase>process-sources</phase>
279                     </execution>
280                 </executions>
281             </plugin>
282
283             <plugin>
284                 <groupId>org.apache.maven.plugins</groupId>
285                 <artifactId>maven-site-plugin</artifactId>
286                 <version>3.3</version>
287                 <configuration>
288                     <reportPlugins>
289                         <plugin>
290                             <groupId>org.apache.maven.plugins</groupId>
291                             <artifactId>maven-checkstyle-plugin</artifactId>
292                             <version>2.17</version>
293                             <reportSets>
294                                 <reportSet>
295                                     <reports>
296                                       <report>checkstyle</report>
297                                     </reports>
298                                 </reportSet>
299                             </reportSets>
300                         </plugin>
301                     </reportPlugins>
302                 </configuration>
303             </plugin>
304
305             <plugin>
306               <groupId>org.apache.maven.plugins</groupId>
307               <artifactId>maven-deploy-plugin</artifactId>
308               <configuration>
309                 <skip>true</skip>
310               </configuration>
311             </plugin>
312
313             <plugin>
314               <groupId>org.codehaus.mojo</groupId>
315               <artifactId>sonar-maven-plugin</artifactId>
316               <version>3.2</version>
317             </plugin>
318
319             <plugin>
320               <groupId>org.jacoco</groupId>
321               <artifactId>jacoco-maven-plugin</artifactId>
322               <version>0.7.7.201606060606</version>
323               <configuration>
324                 <dumpOnExit>true</dumpOnExit>
325               </configuration>
326               <executions>
327                 <execution>
328                   <id>jacoco-initialize-unit-tests</id>
329                   <goals>
330                     <goal>prepare-agent</goal>
331                   </goals>
332                   <configuration>
333                     <destFile>${project.build.directory}/coverage-reports/jacoco.exec
334                     </destFile>
335                     <!-- <append>true</append> -->
336                   </configuration>
337                 </execution>
338               </executions>
339             </plugin>
340         </plugins>
341     </build>
342
343     <profiles>
344         <profile>
345             <id>runAjsc</id>
346             <build>
347                 <defaultGoal>initialize</defaultGoal>
348                 <plugins>
349                     <plugin>
350                         <groupId>org.codehaus.mojo</groupId>
351                         <artifactId>exec-maven-plugin</artifactId>
352                         <version>1.3.2</version>
353                         <executions>
354                             <execution>
355                                 <phase>initialize</phase>
356                                 <goals>
357                                     <goal>java</goal>
358                                 </goals>
359                                 <configuration>
360                                     <includeProjectDependencies>false</includeProjectDependencies>
361                                     <includePluginDependencies>true</includePluginDependencies>
362                                     <executable>java</executable>
363                                     <mainClass>com.att.ajsc.runner.Runner</mainClass>
364                                     <executableDependency>
365                                         <groupId>com.att.ajsc</groupId>
366                                         <artifactId>ajsc-runner</artifactId>
367                                     </executableDependency>
368                                     <additionalClasspathElements>
369                                         <additionalClasspathElement>
370                                             ${basedir}/ajsc-shared-config/etc
371                                         </additionalClasspathElement>
372                                     </additionalClasspathElements>
373
374                                     <environmentVariables>
375                                         <AJSC_HOME>${runAjscHome}</AJSC_HOME>
376                                     </environmentVariables>
377
378                                     <!-- Main AJSC System Properties below (necessary for proper startup) -->
379                                     <systemProperties>
380                                         <systemProperty>
381                                             <key>AJSC_HOME</key>
382                                             <value>${runAjscHome}</value>
383                                         </systemProperty>
384                                         <systemProperty>
385                                             <key>CONFIG_HOME</key>
386                                             <value>${basedir}/appconfig-local/</value>
387                                         </systemProperty>
388                                         <systemProperty>
389                                             <key>AJSC_CONF_HOME</key>
390                                             <value>${basedir}/bundleconfig-local</value>
391                                         </systemProperty>
392                                         <systemProperty>
393                                             <key>logback.configurationFile</key>
394                                             <value>${basedir}/ajsc-shared-config/etc/logback.xml
395                                             </value>
396                                         </systemProperty>
397                                         <systemProperty>
398                                             <key>AJSC_SHARED_CONFIG</key>
399                                             <value>${basedir}/ajsc-shared-config</value>
400                                         </systemProperty>
401
402                                         <sysproperty>
403                                             <key>AJSC_EXTERNAL_LIB_FOLDERS</key>
404                                             <value>${basedir}/target/commonLibs</value>
405                                         </sysproperty>
406                                         <sysproperty>
407                                             <key>AJSC_EXTERNAL_PROPERTIES_FOLDERS</key>
408                                             <value>${basedir}/ajsc-shared-config/etc</value>
409                                         </sysproperty>
410
411                                         <systemProperty>
412                                             <key>AJSC_SERVICE_NAMESPACE</key>
413                                             <value>${module.ajsc.namespace.name}</value>
414                                         </systemProperty>
415                                         <systemProperty>
416                                             <key>AJSC_SERVICE_VERSION</key>
417                                             <value>${module.ajsc.namespace.version}</value>
418                                         </systemProperty>
419                                         <systemProperty>
420                                             <key>SOACLOUD_SERVICE_VERSION</key>
421                                             <value>${project.version}</value>
422                                         </systemProperty>
423                                         <systemProperty>
424                                             <key>server.port</key>
425                                             <value>${serverPort}</value>
426                                         </systemProperty>
427                                     </systemProperties>
428
429                                     <!-- Command Line Arguments to add to the java command. Here, you
430                                         can specify the port as well as the Context you want your service to run
431                                         in. Use context=/ to run in an unnamed Context (Root Context). The default
432                                         configuration of the AJSC is to run under the / Context. Setting the port
433                                         here can aid during the development phase of your service. However, you can
434                                         leave this argument out entirely, and the AJSC will default to using an Ephemeral
435                                         port. -->
436                                     <arguments>
437                                         <argument>context=/</argument>
438                                         <argument>port=${serverPort}</argument>
439                                         <argument>sslport=${sslport}</argument>
440                                     </arguments>
441                                 </configuration>
442                             </execution>
443                         </executions>
444                         <configuration>
445                             <executable>java</executable>
446                         </configuration>
447                         <dependencies>
448                             <dependency>
449                                 <groupId>com.att.ajsc</groupId>
450                                 <artifactId>ajsc-runner</artifactId>
451                                 <version>${ajscRuntimeVersion}</version>
452                             </dependency>
453                         </dependencies>
454                     </plugin>
455                 </plugins>
456             </build>
457         </profile>
458     </profiles>
459
460     <dependencyManagement>
461         <dependencies>
462             <dependency>
463                 <groupId>org.apache.httpcomponents</groupId>
464                 <artifactId>httpclient</artifactId>
465                 <version>4.5</version>
466             </dependency>
467             <dependency>
468                 <groupId>org.apache.httpcomponents</groupId>
469                 <artifactId>httpcore</artifactId>
470                 <version>4.4.1</version>
471             </dependency>
472             <dependency>
473                 <groupId>org.json</groupId>
474                 <artifactId>json</artifactId>
475                 <version>20131018</version>
476             </dependency>
477         </dependencies>
478     </dependencyManagement>
479
480     <distributionManagement>
481       <repository>
482         <id>ecomp-releases</id>
483         <name>ECOMP Release Repository</name>
484         <url>${nexusproxy}/content/repositories/releases/</url>
485       </repository>
486       <snapshotRepository>
487         <id>ecomp-snapshots</id>
488         <name>ECOMP Snapshot Repository</name>
489         <url>${nexusproxy}/content/repositories/snapshots/</url>
490       </snapshotRepository>
491       <site>
492         <id>ecomp-javadoc</id>
493         <url>dav:https://ecomp-nexus:8443/repository/aai/gizmo-javadoc/${project.version}</url>
494       </site>
495     </distributionManagement>
496 </project>