Initial search service commit
[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.0.0</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
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>8080</serverPort>
37         <sslport>9509</sslport>
38
39         <testRouteOffer>workstation</testRouteOffer>
40         <testEnv>DEV</testEnv>
41         <generatedSourceDir>${basedir}/src/main/java-gen</generatedSourceDir>
42         <checkstyle.config.location>google_checks.xml</checkstyle.config.location>
43     </properties>
44
45     <dependencies>
46
47         <dependency>
48             <groupId>com.googlecode.json-simple</groupId>
49             <artifactId>json-simple</artifactId>
50             <version>1.1.1</version>
51         </dependency>
52         <dependency>
53             <groupId>dom4j</groupId>
54             <artifactId>dom4j</artifactId>
55             <version>1.6.1</version>
56             <scope>provided</scope>
57         </dependency>
58
59         <dependency>
60             <groupId>com.att.aft</groupId>
61             <artifactId>dme2</artifactId>
62             <version>3.1.200</version>
63             <scope>provided</scope>
64         </dependency>
65
66
67         <dependency>
68             <groupId>org.elasticsearch</groupId>
69             <artifactId>elasticsearch</artifactId>
70             <version>2.3.1</version>
71         </dependency>
72         <dependency>
73             <groupId>commons-io</groupId>
74             <artifactId>commons-io</artifactId>
75             <version>2.4</version>
76         </dependency>
77
78
79         <!-- Common logging framework -->
80         <dependency>
81           <groupId>org.openecomp.aai.logging-service</groupId>
82           <artifactId>common-logging</artifactId>
83           <version>1.0.0-SNAPSHOT</version>
84         </dependency>
85
86         <!--  Jersey Test Framework. -->
87         <dependency>
88             <groupId>org.glassfish.jersey.test-framework.providers</groupId>
89             <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
90             <version>2.23.2</version>
91             <scope>test</scope>
92         </dependency>
93
94         <!-- For JSON Mapping Support. -->
95         <dependency>
96             <groupId>com.fasterxml.jackson.core</groupId>
97             <artifactId>jackson-databind</artifactId>
98             <version>2.7.8</version>
99         </dependency>
100
101     </dependencies>
102
103     <profiles>
104         <profile>
105             <id>runAjsc</id>
106             <build>
107                 <defaultGoal>initialize</defaultGoal>
108                 <plugins>
109                     <plugin>
110                         <groupId>org.codehaus.mojo</groupId>
111                         <artifactId>exec-maven-plugin</artifactId>
112                         <version>1.3.2</version>
113                         <executions>
114                             <execution>
115                                 <phase>initialize</phase>
116                                 <goals>
117                                     <goal>java</goal>
118                                 </goals>
119                                 <configuration>
120                                     <includeProjectDependencies>false</includeProjectDependencies>
121                                     <includePluginDependencies>true</includePluginDependencies>
122                                     <executable>java</executable>
123                                     <mainClass>com.att.ajsc.runner.Runner</mainClass>
124                                     <executableDependency>
125                                         <groupId>com.att.ajsc</groupId>
126                                         <artifactId>ajsc-runner</artifactId>
127                                     </executableDependency>
128                                     <additionalClasspathElements>
129                                         <additionalClasspathElement>${basedir}/ajsc-shared-config/etc
130                                         </additionalClasspathElement>
131                                     </additionalClasspathElements>
132
133                                     <environmentVariables>
134                                         <AJSC_HOME>${runAjscHome}</AJSC_HOME>
135                                     </environmentVariables>
136
137                                     <!-- Main AJSC System Properties below (necessary for proper startup) -->
138                                     <systemProperties>
139                                         <systemProperty>
140                                             <key>AJSC_HOME</key>
141                                             <value>${runAjscHome}</value>
142                                         </systemProperty>
143                                         <systemProperty>
144                                             <key>CONFIG_HOME</key>
145                                             <value>${basedir}/appconfig-local/</value>
146                                         </systemProperty>
147                                         <systemProperty>
148                                             <key>AJSC_CONF_HOME</key>
149                                             <value>${basedir}/bundleconfig-local</value>
150                                         </systemProperty>
151                                         <systemProperty>
152                                             <key>logback.configurationFile</key>
153                                             <value>${basedir}/ajsc-shared-config/etc/logback.xml</value>
154                                         </systemProperty>
155                                         <systemProperty>
156                                             <key>AJSC_SHARED_CONFIG</key>
157                                             <value>${basedir}/ajsc-shared-config</value>
158                                         </systemProperty>
159
160                                         <sysproperty>
161                                             <key>AJSC_EXTERNAL_LIB_FOLDERS</key>
162                                             <value>${basedir}/target/commonLibs</value>
163                                         </sysproperty>
164                                         <sysproperty>
165                                             <key>AJSC_EXTERNAL_PROPERTIES_FOLDERS</key>
166                                             <value>${basedir}/ajsc-shared-config/etc</value>
167                                         </sysproperty>
168
169                                         <systemProperty>
170                                             <key>AJSC_SERVICE_NAMESPACE</key>
171                                             <value>${module.ajsc.namespace.name}</value>
172                                         </systemProperty>
173                                         <systemProperty>
174                                             <key>AJSC_SERVICE_VERSION</key>
175                                             <value>${module.ajsc.namespace.version}</value>
176                                         </systemProperty>
177                                         <systemProperty>
178                                             <key>SOACLOUD_SERVICE_VERSION</key>
179                                             <value>${project.version}</value>
180                                         </systemProperty>
181                                         <systemProperty>
182                                             <key>server.port</key>
183                                             <value>${serverPort}</value>
184                                         </systemProperty>
185                                     </systemProperties>
186
187                                     <!-- Command Line Arguments to add to the java command. Here, you
188                                         can specify the port as well as the Context you want your service to run
189                                         in. Use context=/ to run in an unnamed Context (Root Context). The default
190                                         configuration of the AJSC is to run under the / Context. Setting the port
191                                         here can aid during the development phase of your service. However, you can
192                                         leave this argument out entirely, and the AJSC will default to using an Ephemeral
193                                         port. -->
194                                     <arguments>
195                                         <argument>context=//</argument>
196                                         <argument>port=${serverPort}</argument>
197                                         <argument>sslport=${sslport}</argument>
198                                     </arguments>
199                                 </configuration>
200                             </execution>
201                         </executions>
202                         <configuration>
203                             <executable>java</executable>
204                         </configuration>
205                         <dependencies>
206                             <dependency>
207                                 <groupId>com.att.ajsc</groupId>
208                                 <artifactId>ajsc-runner</artifactId>
209                                 <version>${ajscRuntimeVersion}</version>
210                             </dependency>
211                         </dependencies>
212                     </plugin>
213                 </plugins>
214             </build>
215         </profile>
216     </profiles>
217     <dependencyManagement>
218         <dependencies>
219             <dependency>
220                 <groupId>ch.qos.logback</groupId>
221                 <artifactId>logback-classic</artifactId>
222                 <version>1.1.1</version>
223             </dependency>
224             <dependency>
225                 <groupId>com.fasterxml.jackson.core</groupId>
226                 <artifactId>jackson-core</artifactId>
227                 <version>2.7.8</version>
228             </dependency>
229         </dependencies>
230     </dependencyManagement>
231
232     <build>
233         <plugins>
234             <!-- Checkstyle plugin - used to report on compliance with -->
235             <!-- the Google style guide. -->
236             <plugin>
237                 <groupId>org.apache.maven.plugins</groupId>
238                 <artifactId>maven-site-plugin</artifactId>
239                 <version>3.3</version>
240                 <configuration>
241                     <reportPlugins>
242                         <plugin>
243                             <groupId>org.apache.maven.plugins</groupId>
244                             <artifactId>maven-checkstyle-plugin</artifactId>
245                             <version>2.17</version>
246                             <reportSets>
247                                 <reportSet>
248                                     <reports>
249                                         <report>checkstyle</report>
250                                     </reports>
251                                 </reportSet>
252                             </reportSets>
253                         </plugin>
254                     </reportPlugins>
255                 </configuration>
256             </plugin>
257             <!-- This plugin overrides the compiler settings to use java 1.8 -->
258             <plugin>
259                 <groupId>org.apache.maven.plugins</groupId>
260                 <artifactId>maven-compiler-plugin</artifactId>
261                 <version>3.1</version>
262                 <configuration>
263                     <compilerId>groovy-eclipse-compiler</compilerId>
264                     <verbose>true</verbose>
265                     <source>1.8</source>
266                     <target>1.8</target>
267                 </configuration>
268                 <dependencies>
269                     <dependency>
270                         <groupId>org.codehaus.groovy</groupId>
271                         <artifactId>groovy-eclipse-compiler</artifactId>
272                         <version>2.9.0-01</version>
273                     </dependency>
274                     <dependency>
275                         <groupId>org.codehaus.groovy</groupId>
276                         <artifactId>groovy-eclipse-batch</artifactId>
277                         <version>2.3.4-01</version>
278                     </dependency>
279                 </dependencies>
280             </plugin>
281
282             <!-- This plugin is used to generate Java POJO's from json format schema
283                 file. -->
284             <plugin>
285                 <groupId>org.jsonschema2pojo</groupId>
286                 <artifactId>jsonschema2pojo-maven-plugin</artifactId>
287                 <version>0.4.26</version>
288                 <configuration>
289                     <addCompileSourceRoot>true</addCompileSourceRoot>
290                     <sourceDirectory>${basedir}/src/main/resources/json/schema</sourceDirectory>
291                     <outputDirectory>${generatedSourceDir}</outputDirectory>
292                     <targetPackage>org.openecomp.sa.rest</targetPackage>
293                 </configuration>
294                 <executions>
295                     <execution>
296                         <goals>
297                             <goal>generate</goal>
298                         </goals>
299                     </execution>
300                 </executions>
301             </plugin>
302
303             <plugin>
304                 <groupId>org.apache.maven.plugins</groupId>
305                 <artifactId>maven-resources-plugin</artifactId>
306                 <version>2.7</version>
307                 <executions>
308                     <execution>
309                         <id>copy-docker-file</id>
310                         <phase>package</phase>
311                         <goals>
312                             <goal>copy-resources</goal>
313                         </goals>
314                         <configuration>
315                             <outputDirectory>target</outputDirectory>
316                             <overwrite>true</overwrite>
317                             <resources>
318                                 <resource>
319                                     <directory>${basedir}/src/main/docker</directory>
320                                     <filtering>true</filtering>
321                                     <includes>
322                                         <include>**/*</include>
323                                     </includes>
324                                 </resource>
325                                 <resource>
326                                     <directory>${basedir}/src/main/bin/</directory>
327                                 </resource>
328                             </resources>
329                         </configuration>
330                     </execution>
331                 </executions>
332             </plugin>
333             <!-- license plugin -->
334             <plugin>
335                 <groupId>com.mycila</groupId>
336                 <artifactId>license-maven-plugin</artifactId>
337                 <version>3.0</version>
338                 <configuration>
339                     <header>License.txt</header>
340                     <includes>
341                         <include>src/main/java/**</include>
342                         <include>src/test/java/**</include>
343                     </includes>
344                 </configuration>
345                 <executions>
346                     <execution>
347                         <goals>
348                             <goal>format</goal>
349                         </goals>
350                         <phase>process-sources</phase>
351                     </execution>
352                 </executions>
353             </plugin>
354             <!-- This plugin adds the generated sources directory to the clean lifecycle
355                 so that automatically generated code will get cleaned up properly. -->
356             <plugin>
357                 <artifactId>maven-clean-plugin</artifactId>
358                 <version>3.0.0</version>
359                 <configuration>
360                     <filesets>
361                         <fileset>
362                             <directory>${generatedSourceDir}</directory>
363                         </fileset>
364                     </filesets>
365                 </configuration>
366             </plugin>
367         </plugins>
368     </build>
369 </project>