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