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