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