9fb9444b6284bca1efd534eea48b6a10784e809f
[policy/apex-pdp.git] / packages / apex-pdp-package-full / pom.xml
1 <!--
2   ============LICENSE_START=======================================================
3    Copyright (C) 2018 Ericsson. All rights reserved.
4   ================================================================================
5   Licensed under the Apache License, Version 2.0 (the "License");
6   you may not use this file except in compliance with the License.
7   You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11   Unless required by applicable law or agreed to in writing, software
12   distributed under the License is distributed on an "AS IS" BASIS,
13   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   See the License for the specific language governing permissions and
15   limitations under the License.
16
17   SPDX-License-Identifier: Apache-2.0
18   ============LICENSE_END=========================================================
19 -->
20 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22     <modelVersion>4.0.0</modelVersion>
23     <parent>
24         <groupId>org.onap.policy.apex-pdp.packages</groupId>
25         <artifactId>packages</artifactId>
26         <version>2.2.0-SNAPSHOT</version>
27     </parent>
28
29     <artifactId>apex-pdp-package-full</artifactId>
30     <name>${project.artifactId}</name>
31     <description>[${project.parent.artifactId}] packaging, with all optional functionality, clients, servlets, and examples included</description>
32
33     <properties>
34         <install.package.name>${project.artifactId}</install.package.name>
35     </properties>
36
37     <dependencies>
38         <dependency>
39             <groupId>org.onap.policy.apex-pdp.services</groupId>
40             <artifactId>services-engine</artifactId>
41             <version>${project.version}</version>
42         </dependency>
43         <dependency>
44             <groupId>org.onap.policy.apex-pdp.services</groupId>
45             <artifactId>services-onappf</artifactId>
46             <version>${project.version}</version>
47         </dependency>
48         <!-- Client Servlet applications -->
49         <dependency>
50             <groupId>org.onap.policy.apex-pdp.client</groupId>
51             <artifactId>client-full</artifactId>
52             <type>war</type>
53             <version>${project.version}</version>
54         </dependency>
55         <dependency>
56             <groupId>org.onap.policy.apex-pdp.client</groupId>
57             <artifactId>client-editor</artifactId>
58             <type>war</type>
59             <version>${project.version}</version>
60         </dependency>
61         <dependency>
62             <groupId>org.onap.policy.apex-pdp.client</groupId>
63             <artifactId>client-deployment</artifactId>
64             <type>war</type>
65             <version>${project.version}</version>
66         </dependency>
67         <dependency>
68             <groupId>org.onap.policy.apex-pdp.client</groupId>
69             <artifactId>client-monitoring</artifactId>
70             <type>war</type>
71             <version>${project.version}</version>
72         </dependency>
73         
74         <!-- Plugins for Context Distribution -->
75         <dependency>
76             <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-distribution</groupId>
77             <artifactId>plugins-context-distribution-hazelcast</artifactId>
78             <version>${project.version}</version>
79         </dependency>
80         <dependency>
81             <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-distribution</groupId>
82             <artifactId>plugins-context-distribution-infinispan</artifactId>
83             <version>${project.version}</version>
84         </dependency>
85
86         <!-- Plugins for Context Locking -->
87         <dependency>
88             <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-locking</groupId>
89             <artifactId>plugins-context-locking-hazelcast</artifactId>
90             <version>${project.version}</version>
91         </dependency>
92         <dependency>
93             <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-locking</groupId>
94             <artifactId>plugins-context-locking-curator</artifactId>
95             <version>${project.version}</version>
96         </dependency>
97
98         <!-- Plugins for Context Schemas -->
99         <dependency>
100             <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
101             <artifactId>plugins-context-schema-avro</artifactId>
102             <version>${project.version}</version>
103         </dependency>
104
105         <!-- Plugins for Executors -->
106         <dependency>
107             <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
108             <artifactId>plugins-executor-java</artifactId>
109             <version>${project.version}</version>
110         </dependency>
111         <dependency>
112             <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
113             <artifactId>plugins-executor-javascript</artifactId>
114             <version>${project.version}</version>
115         </dependency>
116         <dependency>
117             <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
118             <artifactId>plugins-executor-jruby</artifactId>
119             <version>${project.version}</version>
120         </dependency>
121         <dependency>
122             <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
123             <artifactId>plugins-executor-jython</artifactId>
124             <version>${project.version}</version>
125         </dependency>
126         <dependency>
127             <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
128             <artifactId>plugins-executor-mvel</artifactId>
129             <version>${project.version}</version>
130         </dependency>
131
132         <!-- Plugins for Persistence of Models over JPA -->
133         <dependency>
134             <groupId>org.onap.policy.apex-pdp.plugins.plugins-persistence.plugins-persistence-jpa</groupId>
135             <artifactId>plugins-persistence-jpa-eclipselink</artifactId>
136             <version>${project.version}</version>
137         </dependency>
138
139         <!-- Plugins for event carrier technologies -->
140         <dependency>
141             <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
142             <artifactId>plugins-event-carrier-kafka</artifactId>
143             <version>${project.version}</version>
144         </dependency>
145         <dependency>
146             <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
147             <artifactId>plugins-event-carrier-websocket</artifactId>
148             <version>${project.version}</version>
149         </dependency>
150         <dependency>
151             <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
152             <artifactId>plugins-event-carrier-jms</artifactId>
153             <version>${project.version}</version>
154         </dependency>
155         <dependency>
156             <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
157             <artifactId>plugins-event-carrier-restclient</artifactId>
158             <version>${project.version}</version>
159         </dependency>
160         <dependency>
161             <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
162             <artifactId>plugins-event-carrier-restserver</artifactId>
163             <version>${project.version}</version>
164         </dependency>
165         <dependency>
166             <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
167             <artifactId>plugins-event-carrier-restrequestor</artifactId>
168             <version>${project.version}</version>
169         </dependency>
170         
171         <!-- Benchmark test event generator -->
172         <dependency>
173             <groupId>org.onap.policy.apex-pdp.testsuites.performance</groupId>
174             <artifactId>performance-benchmark-test</artifactId>
175             <version>${project.version}</version>
176         </dependency>
177
178         <!-- Plugins for event protocols -->
179         <dependency>
180             <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-protocol</groupId>
181             <artifactId>plugins-event-protocol-xml</artifactId>
182             <version>${project.version}</version>
183         </dependency>
184         <dependency>
185             <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-protocol</groupId>
186             <artifactId>plugins-event-protocol-jms</artifactId>
187             <version>${project.version}</version>
188         </dependency>
189
190         <!-- Authoring and Editors -->
191         <dependency>
192             <groupId>org.onap.policy.apex-pdp.auth</groupId>
193             <artifactId>cli-editor</artifactId>
194             <version>${project.version}</version>
195         </dependency>
196         
197         <!-- Tools -->
198         <dependency>
199             <groupId>org.onap.policy.apex-pdp.tools</groupId>
200             <artifactId>simple-wsclient</artifactId>
201             <version>${project.version}</version>
202         </dependency>
203         <dependency>
204             <groupId>org.onap.policy.apex-pdp.tools</groupId>
205             <artifactId>model-generator</artifactId>
206             <version>${project.version}</version>
207         </dependency>
208         
209         <!-- Test Data used by examples -->
210         <dependency>
211             <groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
212             <artifactId>integration-common</artifactId>
213             <version>${project.version}</version>
214         </dependency>
215         
216         <!-- Sample Examples -->
217         <dependency>
218             <groupId>org.onap.policy.apex-pdp.examples</groupId>
219             <artifactId>examples-aadm</artifactId>
220             <version>${project.version}</version>
221         </dependency>
222         <dependency>
223             <groupId>org.onap.policy.apex-pdp.examples</groupId>
224             <artifactId>examples-adaptive</artifactId>
225             <version>${project.version}</version>
226         </dependency>
227         <dependency>
228             <groupId>org.onap.policy.apex-pdp.examples</groupId>
229             <artifactId>examples-myfirstpolicy</artifactId>
230             <version>${project.version}</version>
231         </dependency>
232         <dependency>
233             <groupId>org.onap.policy.apex-pdp.examples</groupId>
234             <artifactId>examples-pcvs</artifactId>
235             <version>${project.version}</version>
236         </dependency>
237         <dependency>
238             <groupId>org.onap.policy.apex-pdp.examples</groupId>
239             <artifactId>examples-decisionmaker</artifactId>
240             <version>${project.version}</version>
241         </dependency>
242         <dependency>
243             <groupId>org.onap.policy.apex-pdp.examples</groupId>
244             <artifactId>examples-periodic</artifactId>
245             <version>${project.version}</version>
246         </dependency>
247         <dependency>
248             <groupId>org.onap.policy.apex-pdp.examples</groupId>
249             <artifactId>examples-onap-vcpe</artifactId>
250             <version>${project.version}</version>
251         </dependency>
252         <dependency>
253             <groupId>org.onap.policy.apex-pdp.examples</groupId>
254             <artifactId>examples-servlet</artifactId>
255             <type>war</type>
256             <version>${project.version}</version>
257         </dependency>
258         <dependency>
259             <groupId>org.onap.policy.apex-pdp.examples</groupId>
260             <artifactId>examples-onap-bbs</artifactId>
261             <version>${project.version}</version>
262         </dependency>
263     </dependencies>
264
265     <build>
266         <plugins>
267             <!-- Copy required resources and examples -->
268             <plugin>
269                 <groupId>org.apache.maven.plugins</groupId>
270                 <artifactId>maven-dependency-plugin</artifactId>
271                 <executions>
272                     <execution>
273                         <id>unpack-etc-examples</id>
274                         <phase>package</phase>
275                         <goals>
276                             <goal>unpack</goal>
277                         </goals>
278                         <configuration>
279                             <artifactItems>
280                                 <artifactItem>
281                                     <groupId>org.onap.policy.apex-pdp.services</groupId>
282                                     <artifactId>services-onappf</artifactId>
283                                     <version>${project.version}</version>
284                                     <type>jar</type>
285                                     <overWrite>false</overWrite>
286                                     <outputDirectory>${project.build.directory}/etc/onappf</outputDirectory>
287                                     <includes>config/*</includes>
288                                 </artifactItem>
289                                 <artifactItem>
290                                     <groupId>org.onap.policy.apex-pdp.auth</groupId>
291                                     <artifactId>cli-editor</artifactId>
292                                     <version>${project.version}</version>
293                                     <type>jar</type>
294                                     <overWrite>false</overWrite>
295                                     <outputDirectory>${project.build.directory}</outputDirectory>
296                                     <includes>etc/**/*,examples/**/*</includes>
297                                 </artifactItem>
298                                 <artifactItem>
299                                     <groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
300                                     <artifactId>integration-common</artifactId>
301                                     <version>${project.version}</version>
302                                     <type>jar</type>
303                                     <overWrite>false</overWrite>
304                                     <outputDirectory>${project.build.directory}</outputDirectory>
305                                     <includes>etc/**/*,examples/**/*</includes>
306                                 </artifactItem>
307                                 <artifactItem>
308                                     <groupId>org.onap.policy.apex-pdp.testsuites.performance</groupId>
309                                     <artifactId>performance-benchmark-test</artifactId>
310                                     <version>${project.version}</version>
311                                     <type>jar</type>
312                                     <overWrite>false</overWrite>
313                                     <outputDirectory>${project.build.directory}</outputDirectory>
314                                     <includes>examples/**/*</includes>
315                                 </artifactItem>
316                                 <artifactItem>
317                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
318                                     <artifactId>examples-aadm</artifactId>
319                                     <version>${project.version}</version>
320                                     <type>jar</type>
321                                     <overWrite>false</overWrite>
322                                     <outputDirectory>${project.build.directory}</outputDirectory>
323                                     <includes>etc/**/*,examples/**/*</includes>
324                                 </artifactItem>
325                                 <artifactItem>
326                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
327                                     <artifactId>examples-adaptive</artifactId>
328                                     <version>${project.version}</version>
329                                     <type>jar</type>
330                                     <overWrite>false</overWrite>
331                                     <outputDirectory>${project.build.directory}</outputDirectory>
332                                     <includes>etc/**/*,examples/**/*</includes>
333                                 </artifactItem>
334                                 <artifactItem>
335                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
336                                     <artifactId>examples-myfirstpolicy</artifactId>
337                                     <version>${project.version}</version>
338                                     <type>jar</type>
339                                     <overWrite>false</overWrite>
340                                     <outputDirectory>${project.build.directory}</outputDirectory>
341                                     <includes>etc/**/*,examples/**/*</includes>
342                                 </artifactItem>
343                                 <artifactItem>
344                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
345                                     <artifactId>examples-pcvs</artifactId>
346                                     <version>${project.version}</version>
347                                     <type>jar</type>
348                                     <overWrite>false</overWrite>
349                                     <outputDirectory>${project.build.directory}</outputDirectory>
350                                     <includes>etc/**/*,examples/**/*</includes>
351                                 </artifactItem>
352                                 <artifactItem>
353                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
354                                     <artifactId>examples-decisionmaker</artifactId>
355                                     <version>${project.version}</version>
356                                     <type>jar</type>
357                                     <overWrite>false</overWrite>
358                                     <outputDirectory>${project.build.directory}</outputDirectory>
359                                     <includes>etc/**/*,examples/**/*</includes>
360                                 </artifactItem>
361                                 <artifactItem>
362                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
363                                     <artifactId>examples-decisionmaker</artifactId>
364                                     <version>${project.version}</version>
365                                     <type>jar</type>
366                                     <overWrite>false</overWrite>
367                                     <outputDirectory>${project.build.directory}/examples/models/DecisionMaker</outputDirectory>
368                                     <includes>*PolicyModel.json</includes>
369                                 </artifactItem>
370                                 <artifactItem>
371                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
372                                     <artifactId>examples-periodic</artifactId>
373                                     <version>${project.version}</version>
374                                     <type>jar</type>
375                                     <overWrite>false</overWrite>
376                                     <outputDirectory>${project.build.directory}</outputDirectory>
377                                     <includes>etc/**/*,examples/**/*</includes>
378                                 </artifactItem>
379                                 <artifactItem>
380                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
381                                     <artifactId>examples-periodic</artifactId>
382                                     <version>${project.version}</version>
383                                     <type>jar</type>
384                                     <overWrite>false</overWrite>
385                                     <outputDirectory>${project.build.directory}/examples/models/Periodic</outputDirectory>
386                                     <includes>PeriodicPolicyModel.json</includes>
387                                 </artifactItem>
388                                 <artifactItem>
389                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
390                                     <artifactId>examples-onap-vcpe</artifactId>
391                                     <version>${project.version}</version>
392                                     <type>jar</type>
393                                     <overWrite>false</overWrite>
394                                     <outputDirectory>${project.build.directory}</outputDirectory>
395                                     <includes>etc/**/*,examples/**/*</includes>
396                                 </artifactItem>
397                                 <artifactItem>
398                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
399                                     <artifactId>examples-onap-vcpe</artifactId>
400                                     <version>${project.version}</version>
401                                     <type>jar</type>
402                                     <overWrite>false</overWrite>
403                                     <outputDirectory>${project.build.directory}/examples/models/ONAPvCPE</outputDirectory>
404                                     <includes>ONAPvCPEPolicyModel.json</includes>
405                                 </artifactItem>
406                                 <artifactItem>
407                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
408                                  <artifactId>examples-onap-bbs</artifactId>
409                                     <version>${project.version}</version>
410                                     <type>jar</type>
411                                     <overWrite>false</overWrite>
412                                     <outputDirectory>${project.build.directory}</outputDirectory>
413                                     <includes>etc/**/*,examples/**/*</includes>
414                                 </artifactItem>
415                                 <artifactItem>
416                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
417                                     <artifactId>examples-onap-bbs</artifactId>
418                                     <version>${project.version}</version>
419                                     <type>jar</type>
420                                     <overWrite>false</overWrite>
421                                     <outputDirectory>${project.build.directory}/examples/models/ONAPBBS</outputDirectory>
422                                     <includes>NomadicONTPolicyModel.json</includes>
423                                 </artifactItem>
424                                 <artifactItem>
425                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
426                                     <artifactId>examples-servlet</artifactId>
427                                     <version>${project.version}</version>
428                                     <type>war</type>
429                                     <overWrite>false</overWrite>
430                                     <outputDirectory>${project.build.directory}/examples/servlet</outputDirectory>
431                                     <includes>readme_examples-servlet.txt</includes>
432                                 </artifactItem>
433                                 <artifactItem>
434                                     <groupId>org.onap.policy.apex-pdp.tools</groupId>
435                                     <artifactId>tools-common</artifactId>
436                                     <version>${project.version}</version>
437                                     <type>jar</type>
438                                     <overWrite>false</overWrite>
439                                     <outputDirectory>${project.build.directory}/etc</outputDirectory>
440                                     <includes>/app-version.txt</includes>
441                                 </artifactItem>
442                             </artifactItems>
443                             <overWriteReleases>true</overWriteReleases>
444                             <overWriteSnapshots>true</overWriteSnapshots>
445                         </configuration>
446                     </execution>
447                     <execution>
448                         <id>copy-fat-jars</id>
449                         <phase>package</phase>
450                         <goals>
451                             <goal>copy</goal>
452                         </goals>
453                         <configuration>
454                             <artifactItems>
455                                 <artifactItem>
456                                     <groupId>org.onap.policy.apex-pdp.tools</groupId>
457                                     <artifactId>simple-wsclient</artifactId>
458                                     <version>${project.version}</version>
459                                     <type>jar</type>
460                                     <classifier>jar-with-dependencies</classifier>
461                                     <outputDirectory>${project.build.directory}/lib/applications</outputDirectory>
462                                 </artifactItem>
463                                 <artifactItem>
464                                     <groupId>org.onap.policy.apex-pdp.client</groupId>
465                                     <artifactId>client-monitoring</artifactId>
466                                     <version>${project.version}</version>
467                                     <classifier>monitoring</classifier>
468                                     <outputDirectory>${project.build.directory}/lib/applications</outputDirectory>
469                                 </artifactItem>
470                                 <artifactItem>
471                                     <groupId>org.onap.policy.apex-pdp.client</groupId>
472                                     <artifactId>client-editor</artifactId>
473                                     <version>${project.version}</version>
474                                     <classifier>editor</classifier>
475                                     <outputDirectory>${project.build.directory}/lib/applications</outputDirectory>
476                                 </artifactItem>
477                                 <artifactItem>
478                                     <groupId>org.onap.policy.apex-pdp.client</groupId>
479                                     <artifactId>client-deployment</artifactId>
480                                     <version>${project.version}</version>
481                                     <classifier>deployment</classifier>
482                                     <outputDirectory>${project.build.directory}/lib/applications</outputDirectory>
483                                 </artifactItem>
484                                 <artifactItem>
485                                     <groupId>org.onap.policy.apex-pdp.client</groupId>
486                                     <artifactId>client-full</artifactId>
487                                     <version>${project.version}</version>
488                                     <classifier>full</classifier>
489                                     <outputDirectory>${project.build.directory}/lib/applications</outputDirectory>
490                                 </artifactItem>
491                             </artifactItems>
492                             <overWriteReleases>true</overWriteReleases>
493                             <overWriteSnapshots>true</overWriteSnapshots>
494                         </configuration>
495                     </execution>
496
497                 </executions>
498             </plugin>
499  
500             <!-- Build the tar ball -->
501             <plugin>
502                 <groupId>org.apache.maven.plugins</groupId>
503                 <artifactId>maven-assembly-plugin</artifactId>
504                 <executions>
505                     <execution>
506                         <id>generate-complete-tar</id>
507                         <phase>package</phase>
508                         <goals>
509                             <goal>single</goal>
510                         </goals>
511                         <configuration>
512                             <descriptors>
513                                 <descriptor>src/main/package/tarball/assembly.xml</descriptor>
514                             </descriptors>
515                             <finalName>${project.artifactId}-${project.version}</finalName>
516                         </configuration>
517                     </execution>
518                 </executions>
519             </plugin>
520             <plugin>
521                 <artifactId>maven-antrun-plugin</artifactId>
522                 <executions>
523                     <execution>
524                         <phase>package</phase>
525                         <configuration>
526                             <tasks>
527                                 <untar
528                                     src="${project.build.directory}/${project.artifactId}-${project.version}-tarball.tar.gz"
529                                     dest="${project.build.directory}/install_hierarchy" compression="gzip" />
530                             </tasks>
531                         </configuration>
532                         <goals>
533                             <goal>run</goal>
534                         </goals>
535                     </execution>
536                     <execution>
537                         <id>fix-permissions</id>
538                         <phase>package</phase>
539                         <configuration>
540                             <tasks>
541                                 <chmod file="${project.build.directory}/install_hierarchy/bin/*" perm="755" />
542                             </tasks>
543                         </configuration>
544                         <goals>
545                             <goal>run</goal>
546                         </goals>
547                     </execution>
548                 </executions>
549             </plugin>
550             <!-- Build the dpkg distribution -->
551             <plugin>
552                 <groupId>org.vafer</groupId>
553                 <artifactId>jdeb</artifactId>
554                 <version>1.5</version>
555                 <executions>
556                     <execution>
557                         <phase>package</phase>
558                         <goals>
559                             <goal>jdeb</goal>
560                         </goals>
561                         <configuration>
562                             <deb>${project.build.directory}/${project.artifactId}-${project.version}.deb</deb>
563                             <controlDir>${basedir}/src/main/package/control</controlDir>
564                             <dataSet>
565                                 <!-- Copy the Apex run time configuration -->
566                                 <data>
567                                     <src>${project.build.directory}/install_hierarchy/lib</src>
568                                     <type>directory</type>
569                                     <dst>lib</dst>
570                                     <mapper>
571                                         <type>perm</type>
572                                         <prefix>/opt/app/policy/${project.artifactId}-${project.version}/lib</prefix>
573                                         <filemode>755</filemode>
574                                     </mapper>
575                                 </data>
576                                 <data>
577                                     <src>${project.build.directory}/install_hierarchy/bin</src>
578                                     <type>directory</type>
579                                     <dst>etc</dst>
580                                     <mapper>
581                                         <type>perm</type>
582                                         <prefix>/opt/app/policy/${project.artifactId}-${project.version}/bin</prefix>
583                                     </mapper>
584                                 </data>
585                                 <data>
586                                     <src>${project.build.directory}/install_hierarchy/etc</src>
587                                     <type>directory</type>
588                                     <dst>etc</dst>
589                                     <mapper>
590                                         <type>perm</type>
591                                         <prefix>/opt/app/policy/${project.artifactId}-${project.version}/etc</prefix>
592                                     </mapper>
593                                 </data>
594                                 <data>
595                                     <src>${project.build.directory}/install_hierarchy/war</src>
596                                     <type>directory</type>
597                                     <dst>etc</dst>
598                                     <mapper>
599                                         <type>perm</type>
600                                         <prefix>/opt/app/policy/${install.package.name}-${project.version}/war</prefix>
601                                     </mapper>
602                                 </data>
603                                 <data>
604                                     <src>${project.build.directory}/install_hierarchy/examples</src>
605                                     <type>directory</type>
606                                     <dst>etc</dst>
607                                     <mapper>
608                                         <type>perm</type>
609                                         <prefix>/opt/app/policy/${project.artifactId}-${project.version}/examples</prefix>
610                                     </mapper>
611                                 </data>
612                             </dataSet>
613                         </configuration>
614                     </execution>
615                 </executions>
616             </plugin>
617         </plugins>
618     </build>
619     <profiles>
620         <profile>
621             <id>Linux</id>
622             <activation>
623                 <os>
624                     <family>Linux</family>
625                 </os>
626             </activation>
627             <build>
628                 <plugins>
629                     <!-- Build the rpm distribution -->
630                     <!-- Skiping RPM Build for now, due to rpmbuild package not available on Jenkins servers -->
631  <!--                    <plugin>
632                         <groupId>org.codehaus.mojo</groupId>
633                         <artifactId>rpm-maven-plugin</artifactId>
634                         <version>2.2.0</version>
635                         <extensions>true</extensions>
636                         <executions>
637                             <execution>
638                                 <phase>package</phase>
639                                 <goals>
640                                     <goal>rpm</goal>
641                                 </goals>
642                             </execution>
643                         </executions>
644                         <configuration>
645                             <name>${project.artifactId}</name>
646                             <copyright>2015 Ericsson AB All rights reserved</copyright>
647                             <distribution>${project.parent.artifactId}</distribution>
648                             <group>ERI-APEX</group>
649                             <packager>Ericsson</packager>
650                             <prefix>/opt/app/policy/apex-pdp</prefix>
651                             <changelogFile>src/rpm/changelog</changelogFile>
652                             <needarch>noarch</needarch>
653                             <targetVendor>redhat</targetVendor>
654                             <targetOS>linux</targetOS>
655                             <version>${project.version}</version>
656                             <defineStatements>
657                                 <defineStatement>install_dir /opt/app/policy/apex-pdp</defineStatement>
658                             </defineStatements>
659                             <mappings>
660                                 <mapping>
661                                     <directory>/opt/app/policy/${project.artifactId}-${project.version}/lib</directory>
662                                     <username>root</username>
663                                     <groupname>root</groupname>
664                                     <sources>
665                                         <source>
666                                             <location>${project.build.directory}/install_hierarchy/lib</location>
667                                         </source>
668                                     </sources>
669                                 </mapping>
670                                 <mapping>
671                                     <directory>/opt/app/policy/${project.artifactId}-${project.version}/bin</directory>
672                                     <username>root</username>
673                                     <groupname>root</groupname>
674                                     <sources>
675                                         <source>
676                                             <location>${project.build.directory}/install_hierarchy/bin</location>
677                                         </source>
678                                     </sources>
679                                 </mapping>
680                                 <mapping>
681                                     <directory>/opt/app/policy/${project.artifactId}-${project.version}/etc</directory>
682                                     <username>root</username>
683                                     <groupname>root</groupname>
684                                     <sources>
685                                         <source>
686                                             <location>${project.build.directory}/install_hierarchy/etc</location>
687                                         </source>
688                                     </sources>
689                                 </mapping>
690                                 <mapping>
691                                     <directory>/opt/app/policy/${install.package.name}-${project.version}/war</directory>
692                                     <username>root</username>
693                                     <groupname>root</groupname>
694                                     <sources>
695                                         <source>
696                                             <location>${project.build.directory}/install_hierarchy/war</location>
697                                         </source>
698                                     </sources>
699                                 </mapping>
700                                 <mapping>
701                                     <directory>/opt/app/policy/${project.artifactId}-${project.version}/examples</directory>
702                                     <username>root</username>
703                                     <groupname>root</groupname>
704                                     <sources>
705                                         <source>
706                                             <location>${project.build.directory}/install_hierarchy/examples</location>
707                                         </source>
708                                     </sources>
709                                 </mapping>
710                             </mappings>
711                             <preinstallScriptlet>
712                                 <scriptFile>src/main/package/control/preinst</scriptFile>
713                             </preinstallScriptlet>
714                             <postinstallScriptlet>
715                                 <scriptFile>src/main/package/control/postinst</scriptFile>
716                             </postinstallScriptlet>
717                             <preremoveScriptlet>
718                                 <scriptFile>src/main/package/control/prerm</scriptFile>
719                             </preremoveScriptlet>
720                             <postremoveScriptlet>
721                                 <scriptFile>src/main/package/control/postrm</scriptFile>
722                             </postremoveScriptlet>
723                         </configuration>
724                     </plugin>
725                     <plugin>
726                         <groupId>org.codehaus.mojo</groupId>
727                         <artifactId>exec-maven-plugin</artifactId>
728                         <executions>
729                             <execution>
730                                 <phase>package</phase>
731                                 <goals>
732                                     <goal>exec</goal>
733                                 </goals>
734                             </execution>
735                         </executions>
736                         <configuration>
737                             <executable>sh</executable>
738                             <arguments>
739                                 <argument>-c</argument>
740                                 <argument>cp \
741                                     ${project.build.directory}/rpm/${project.artifactId}/RPMS/noarch/${project.artifactId}-${project.version}*.noarch.rpm \
742                                     \
743                                     ${project.build.directory}/${project.artifactId}-${project.version}.rpm</argument>
744                             </arguments>
745                         </configuration>
746                     </plugin>
747                     <plugin>
748                         <groupId>org.codehaus.mojo</groupId>
749                         <artifactId>build-helper-maven-plugin</artifactId>
750                         <version>3.0.0</version>
751                         <executions>
752                             <execution>
753                                 <id>attach-artifacts</id>
754                                 <phase>package</phase>
755                                 <goals>
756                                     <goal>attach-artifact</goal>
757                                 </goals>
758                                 <configuration>
759                                     <artifacts>
760                                         <artifact>
761                                             <file>${project.build.directory}/${project.artifactId}-${project.version}.rpm</file>
762                                             <type>rpm</type>
763                                         </artifact>
764                                     </artifacts>
765                                 </configuration>
766                             </execution>
767                         </executions>
768                     </plugin> -->
769                 </plugins>
770             </build>
771         </profile>
772         <profile>
773             <id>only-eclipse</id>
774             <activation>
775                 <property>
776                     <name>m2e.version</name>
777                 </property>
778             </activation>
779             <build>
780                 <pluginManagement>
781                     <plugins>
782                         <plugin>
783                             <groupId>org.eclipse.m2e</groupId>
784                             <artifactId>lifecycle-mapping</artifactId>
785                             <configuration>
786                                 <lifecycleMappingMetadata>
787                                     <pluginExecutions>
788                                         <pluginExecution>
789                                             <pluginExecutionFilter>
790                                                 <groupId>org.apache.maven.plugins</groupId>
791                                                 <artifactId>maven-dependency-plugin</artifactId>
792                                                 <versionRange>[2.0,)</versionRange>
793                                                 <goals>
794                                                     <goal>unpack</goal>
795                                                     <goal>copy</goal>
796                                                 </goals>
797                                             </pluginExecutionFilter>
798                                             <action>
799                                                 <ignore />
800                                             </action>
801                                         </pluginExecution>
802                                     </pluginExecutions>
803                                 </lifecycleMappingMetadata>
804                             </configuration>
805                         </plugin>
806                     </plugins>
807                 </pluginManagement>
808             </build>
809         </profile>
810
811         <profile>
812             <id>apexSite</id>
813             <activation>
814                 <property>
815                     <name>apexSite</name>
816                 </property>
817             </activation>
818             <distributionManagement>
819                 <site>
820                     <id>${project.artifactId}-site</id>
821                     <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
822                 </site>
823             </distributionManagement>
824         </profile>
825     </profiles>
826 </project>