Fix Security and Unit Test DB issues
[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         <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     </dependencies>
259
260     <build>
261         <plugins>
262             <!-- Copy required resources and examples -->
263             <plugin>
264                 <groupId>org.apache.maven.plugins</groupId>
265                 <artifactId>maven-dependency-plugin</artifactId>
266                 <executions>
267                     <execution>
268                         <id>unpack-etc-examples</id>
269                         <phase>package</phase>
270                         <goals>
271                             <goal>unpack</goal>
272                         </goals>
273                         <configuration>
274                             <artifactItems>
275                                 <artifactItem>
276                                     <groupId>org.onap.policy.apex-pdp.services</groupId>
277                                     <artifactId>services-onappf</artifactId>
278                                     <version>${project.version}</version>
279                                     <type>jar</type>
280                                     <overWrite>false</overWrite>
281                                     <outputDirectory>${project.build.directory}/etc/onappf</outputDirectory>
282                                     <includes>config/*</includes>
283                                 </artifactItem>
284                                 <artifactItem>
285                                     <groupId>org.onap.policy.apex-pdp.auth</groupId>
286                                     <artifactId>cli-editor</artifactId>
287                                     <version>${project.version}</version>
288                                     <type>jar</type>
289                                     <overWrite>false</overWrite>
290                                     <outputDirectory>${project.build.directory}</outputDirectory>
291                                     <includes>etc/**/*,examples/**/*</includes>
292                                 </artifactItem>
293                                 <artifactItem>
294                                     <groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
295                                     <artifactId>integration-common</artifactId>
296                                     <version>${project.version}</version>
297                                     <type>jar</type>
298                                     <overWrite>false</overWrite>
299                                     <outputDirectory>${project.build.directory}</outputDirectory>
300                                     <includes>etc/**/*,examples/**/*</includes>
301                                 </artifactItem>
302                                 <artifactItem>
303                                     <groupId>org.onap.policy.apex-pdp.testsuites.performance</groupId>
304                                     <artifactId>performance-benchmark-test</artifactId>
305                                     <version>${project.version}</version>
306                                     <type>jar</type>
307                                     <overWrite>false</overWrite>
308                                     <outputDirectory>${project.build.directory}</outputDirectory>
309                                     <includes>examples/**/*</includes>
310                                 </artifactItem>
311                                 <artifactItem>
312                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
313                                     <artifactId>examples-aadm</artifactId>
314                                     <version>${project.version}</version>
315                                     <type>jar</type>
316                                     <overWrite>false</overWrite>
317                                     <outputDirectory>${project.build.directory}</outputDirectory>
318                                     <includes>etc/**/*,examples/**/*</includes>
319                                 </artifactItem>
320                                 <artifactItem>
321                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
322                                     <artifactId>examples-adaptive</artifactId>
323                                     <version>${project.version}</version>
324                                     <type>jar</type>
325                                     <overWrite>false</overWrite>
326                                     <outputDirectory>${project.build.directory}</outputDirectory>
327                                     <includes>etc/**/*,examples/**/*</includes>
328                                 </artifactItem>
329                                 <artifactItem>
330                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
331                                     <artifactId>examples-myfirstpolicy</artifactId>
332                                     <version>${project.version}</version>
333                                     <type>jar</type>
334                                     <overWrite>false</overWrite>
335                                     <outputDirectory>${project.build.directory}</outputDirectory>
336                                     <includes>etc/**/*,examples/**/*</includes>
337                                 </artifactItem>
338                                 <artifactItem>
339                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
340                                     <artifactId>examples-pcvs</artifactId>
341                                     <version>${project.version}</version>
342                                     <type>jar</type>
343                                     <overWrite>false</overWrite>
344                                     <outputDirectory>${project.build.directory}</outputDirectory>
345                                     <includes>etc/**/*,examples/**/*</includes>
346                                 </artifactItem>
347                                 <artifactItem>
348                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
349                                     <artifactId>examples-decisionmaker</artifactId>
350                                     <version>${project.version}</version>
351                                     <type>jar</type>
352                                     <overWrite>false</overWrite>
353                                     <outputDirectory>${project.build.directory}</outputDirectory>
354                                     <includes>etc/**/*,examples/**/*</includes>
355                                 </artifactItem>
356                                 <artifactItem>
357                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
358                                     <artifactId>examples-decisionmaker</artifactId>
359                                     <version>${project.version}</version>
360                                     <type>jar</type>
361                                     <overWrite>false</overWrite>
362                                     <outputDirectory>${project.build.directory}/examples/models/DecisionMaker</outputDirectory>
363                                     <includes>*PolicyModel.json</includes>
364                                 </artifactItem>
365                                 <artifactItem>
366                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
367                                     <artifactId>examples-periodic</artifactId>
368                                     <version>${project.version}</version>
369                                     <type>jar</type>
370                                     <overWrite>false</overWrite>
371                                     <outputDirectory>${project.build.directory}</outputDirectory>
372                                     <includes>etc/**/*,examples/**/*</includes>
373                                 </artifactItem>
374                                 <artifactItem>
375                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
376                                     <artifactId>examples-periodic</artifactId>
377                                     <version>${project.version}</version>
378                                     <type>jar</type>
379                                     <overWrite>false</overWrite>
380                                     <outputDirectory>${project.build.directory}/examples/models/Periodic</outputDirectory>
381                                     <includes>PeriodicPolicyModel.json</includes>
382                                 </artifactItem>
383                                 <artifactItem>
384                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
385                                     <artifactId>examples-onap-vcpe</artifactId>
386                                     <version>${project.version}</version>
387                                     <type>jar</type>
388                                     <overWrite>false</overWrite>
389                                     <outputDirectory>${project.build.directory}</outputDirectory>
390                                     <includes>etc/**/*,examples/**/*</includes>
391                                 </artifactItem>
392                                 <artifactItem>
393                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
394                                     <artifactId>examples-onap-vcpe</artifactId>
395                                     <version>${project.version}</version>
396                                     <type>jar</type>
397                                     <overWrite>false</overWrite>
398                                     <outputDirectory>${project.build.directory}/examples/models/ONAPvCPE</outputDirectory>
399                                     <includes>ONAPvCPEPolicyModel.json</includes>
400                                 </artifactItem>
401                                 <artifactItem>
402                                     <groupId>org.onap.policy.apex-pdp.examples</groupId>
403                                     <artifactId>examples-servlet</artifactId>
404                                     <version>${project.version}</version>
405                                     <type>war</type>
406                                     <overWrite>false</overWrite>
407                                     <outputDirectory>${project.build.directory}/examples/servlet</outputDirectory>
408                                     <includes>readme_examples-servlet.txt</includes>
409                                 </artifactItem>
410                                 <artifactItem>
411                                     <groupId>org.onap.policy.apex-pdp.tools</groupId>
412                                     <artifactId>tools-common</artifactId>
413                                     <version>${project.version}</version>
414                                     <type>jar</type>
415                                     <overWrite>false</overWrite>
416                                     <outputDirectory>${project.build.directory}/etc</outputDirectory>
417                                     <includes>/app-version.txt</includes>
418                                 </artifactItem>
419                             </artifactItems>
420                             <overWriteReleases>true</overWriteReleases>
421                             <overWriteSnapshots>true</overWriteSnapshots>
422                         </configuration>
423                     </execution>
424                     <execution>
425                         <id>copy-fat-jars</id>
426                         <phase>package</phase>
427                         <goals>
428                             <goal>copy</goal>
429                         </goals>
430                         <configuration>
431                             <artifactItems>
432                                 <artifactItem>
433                                     <groupId>org.onap.policy.apex-pdp.tools</groupId>
434                                     <artifactId>simple-wsclient</artifactId>
435                                     <version>${project.version}</version>
436                                     <type>jar</type>
437                                     <classifier>jar-with-dependencies</classifier>
438                                     <outputDirectory>${project.build.directory}/lib/applications</outputDirectory>
439                                 </artifactItem>
440                                 <artifactItem>
441                                     <groupId>org.onap.policy.apex-pdp.client</groupId>
442                                     <artifactId>client-monitoring</artifactId>
443                                     <version>${project.version}</version>
444                                     <classifier>monitoring</classifier>
445                                     <outputDirectory>${project.build.directory}/lib/applications</outputDirectory>
446                                 </artifactItem>
447                                 <artifactItem>
448                                     <groupId>org.onap.policy.apex-pdp.client</groupId>
449                                     <artifactId>client-editor</artifactId>
450                                     <version>${project.version}</version>
451                                     <classifier>editor</classifier>
452                                     <outputDirectory>${project.build.directory}/lib/applications</outputDirectory>
453                                 </artifactItem>
454                                 <artifactItem>
455                                     <groupId>org.onap.policy.apex-pdp.client</groupId>
456                                     <artifactId>client-deployment</artifactId>
457                                     <version>${project.version}</version>
458                                     <classifier>deployment</classifier>
459                                     <outputDirectory>${project.build.directory}/lib/applications</outputDirectory>
460                                 </artifactItem>
461                                 <artifactItem>
462                                     <groupId>org.onap.policy.apex-pdp.client</groupId>
463                                     <artifactId>client-full</artifactId>
464                                     <version>${project.version}</version>
465                                     <classifier>full</classifier>
466                                     <outputDirectory>${project.build.directory}/lib/applications</outputDirectory>
467                                 </artifactItem>
468                             </artifactItems>
469                             <overWriteReleases>true</overWriteReleases>
470                             <overWriteSnapshots>true</overWriteSnapshots>
471                         </configuration>
472                     </execution>
473
474                 </executions>
475             </plugin>
476  
477             <!-- Build the tar ball -->
478             <plugin>
479                 <groupId>org.apache.maven.plugins</groupId>
480                 <artifactId>maven-assembly-plugin</artifactId>
481                 <executions>
482                     <execution>
483                         <id>generate-complete-tar</id>
484                         <phase>package</phase>
485                         <goals>
486                             <goal>single</goal>
487                         </goals>
488                         <configuration>
489                             <descriptors>
490                                 <descriptor>src/main/package/tarball/assembly.xml</descriptor>
491                             </descriptors>
492                             <finalName>${project.artifactId}-${project.version}</finalName>
493                         </configuration>
494                     </execution>
495                 </executions>
496             </plugin>
497             <plugin>
498                 <artifactId>maven-antrun-plugin</artifactId>
499                 <executions>
500                     <execution>
501                         <phase>package</phase>
502                         <configuration>
503                             <tasks>
504                                 <untar
505                                     src="${project.build.directory}/${project.artifactId}-${project.version}-tarball.tar.gz"
506                                     dest="${project.build.directory}/install_hierarchy" compression="gzip" />
507                             </tasks>
508                         </configuration>
509                         <goals>
510                             <goal>run</goal>
511                         </goals>
512                     </execution>
513                     <execution>
514                         <id>fix-permissions</id>
515                         <phase>package</phase>
516                         <configuration>
517                             <tasks>
518                                 <chmod file="${project.build.directory}/install_hierarchy/bin/*" perm="755" />
519                             </tasks>
520                         </configuration>
521                         <goals>
522                             <goal>run</goal>
523                         </goals>
524                     </execution>
525                 </executions>
526             </plugin>
527             <!-- Build the dpkg distribution -->
528             <plugin>
529                 <groupId>org.vafer</groupId>
530                 <artifactId>jdeb</artifactId>
531                 <version>1.5</version>
532                 <executions>
533                     <execution>
534                         <phase>package</phase>
535                         <goals>
536                             <goal>jdeb</goal>
537                         </goals>
538                         <configuration>
539                             <deb>${project.build.directory}/${project.artifactId}-${project.version}.deb</deb>
540                             <controlDir>${basedir}/src/main/package/control</controlDir>
541                             <dataSet>
542                                 <!-- Copy the Apex run time configuration -->
543                                 <data>
544                                     <src>${project.build.directory}/install_hierarchy/lib</src>
545                                     <type>directory</type>
546                                     <dst>lib</dst>
547                                     <mapper>
548                                         <type>perm</type>
549                                         <prefix>/opt/app/policy/${project.artifactId}-${project.version}/lib</prefix>
550                                         <filemode>755</filemode>
551                                     </mapper>
552                                 </data>
553                                 <data>
554                                     <src>${project.build.directory}/install_hierarchy/bin</src>
555                                     <type>directory</type>
556                                     <dst>etc</dst>
557                                     <mapper>
558                                         <type>perm</type>
559                                         <prefix>/opt/app/policy/${project.artifactId}-${project.version}/bin</prefix>
560                                     </mapper>
561                                 </data>
562                                 <data>
563                                     <src>${project.build.directory}/install_hierarchy/etc</src>
564                                     <type>directory</type>
565                                     <dst>etc</dst>
566                                     <mapper>
567                                         <type>perm</type>
568                                         <prefix>/opt/app/policy/${project.artifactId}-${project.version}/etc</prefix>
569                                     </mapper>
570                                 </data>
571                                 <data>
572                                     <src>${project.build.directory}/install_hierarchy/war</src>
573                                     <type>directory</type>
574                                     <dst>etc</dst>
575                                     <mapper>
576                                         <type>perm</type>
577                                         <prefix>/opt/app/policy/${install.package.name}-${project.version}/war</prefix>
578                                     </mapper>
579                                 </data>
580                                 <data>
581                                     <src>${project.build.directory}/install_hierarchy/examples</src>
582                                     <type>directory</type>
583                                     <dst>etc</dst>
584                                     <mapper>
585                                         <type>perm</type>
586                                         <prefix>/opt/app/policy/${project.artifactId}-${project.version}/examples</prefix>
587                                     </mapper>
588                                 </data>
589                             </dataSet>
590                         </configuration>
591                     </execution>
592                 </executions>
593             </plugin>
594         </plugins>
595     </build>
596     <profiles>
597         <profile>
598             <id>Linux</id>
599             <activation>
600                 <os>
601                     <family>Linux</family>
602                 </os>
603             </activation>
604             <build>
605                 <plugins>
606                     <!-- Build the rpm distribution -->
607                     <!-- Skiping RPM Build for now, due to rpmbuild package not available on Jenkins servers -->
608  <!--                    <plugin>
609                         <groupId>org.codehaus.mojo</groupId>
610                         <artifactId>rpm-maven-plugin</artifactId>
611                         <version>2.2.0</version>
612                         <extensions>true</extensions>
613                         <executions>
614                             <execution>
615                                 <phase>package</phase>
616                                 <goals>
617                                     <goal>rpm</goal>
618                                 </goals>
619                             </execution>
620                         </executions>
621                         <configuration>
622                             <name>${project.artifactId}</name>
623                             <copyright>2015 Ericsson AB All rights reserved</copyright>
624                             <distribution>${project.parent.artifactId}</distribution>
625                             <group>ERI-APEX</group>
626                             <packager>Ericsson</packager>
627                             <prefix>/opt/app/policy/apex-pdp</prefix>
628                             <changelogFile>src/rpm/changelog</changelogFile>
629                             <needarch>noarch</needarch>
630                             <targetVendor>redhat</targetVendor>
631                             <targetOS>linux</targetOS>
632                             <version>${project.version}</version>
633                             <defineStatements>
634                                 <defineStatement>install_dir /opt/app/policy/apex-pdp</defineStatement>
635                             </defineStatements>
636                             <mappings>
637                                 <mapping>
638                                     <directory>/opt/app/policy/${project.artifactId}-${project.version}/lib</directory>
639                                     <username>root</username>
640                                     <groupname>root</groupname>
641                                     <sources>
642                                         <source>
643                                             <location>${project.build.directory}/install_hierarchy/lib</location>
644                                         </source>
645                                     </sources>
646                                 </mapping>
647                                 <mapping>
648                                     <directory>/opt/app/policy/${project.artifactId}-${project.version}/bin</directory>
649                                     <username>root</username>
650                                     <groupname>root</groupname>
651                                     <sources>
652                                         <source>
653                                             <location>${project.build.directory}/install_hierarchy/bin</location>
654                                         </source>
655                                     </sources>
656                                 </mapping>
657                                 <mapping>
658                                     <directory>/opt/app/policy/${project.artifactId}-${project.version}/etc</directory>
659                                     <username>root</username>
660                                     <groupname>root</groupname>
661                                     <sources>
662                                         <source>
663                                             <location>${project.build.directory}/install_hierarchy/etc</location>
664                                         </source>
665                                     </sources>
666                                 </mapping>
667                                 <mapping>
668                                     <directory>/opt/app/policy/${install.package.name}-${project.version}/war</directory>
669                                     <username>root</username>
670                                     <groupname>root</groupname>
671                                     <sources>
672                                         <source>
673                                             <location>${project.build.directory}/install_hierarchy/war</location>
674                                         </source>
675                                     </sources>
676                                 </mapping>
677                                 <mapping>
678                                     <directory>/opt/app/policy/${project.artifactId}-${project.version}/examples</directory>
679                                     <username>root</username>
680                                     <groupname>root</groupname>
681                                     <sources>
682                                         <source>
683                                             <location>${project.build.directory}/install_hierarchy/examples</location>
684                                         </source>
685                                     </sources>
686                                 </mapping>
687                             </mappings>
688                             <preinstallScriptlet>
689                                 <scriptFile>src/main/package/control/preinst</scriptFile>
690                             </preinstallScriptlet>
691                             <postinstallScriptlet>
692                                 <scriptFile>src/main/package/control/postinst</scriptFile>
693                             </postinstallScriptlet>
694                             <preremoveScriptlet>
695                                 <scriptFile>src/main/package/control/prerm</scriptFile>
696                             </preremoveScriptlet>
697                             <postremoveScriptlet>
698                                 <scriptFile>src/main/package/control/postrm</scriptFile>
699                             </postremoveScriptlet>
700                         </configuration>
701                     </plugin>
702                     <plugin>
703                         <groupId>org.codehaus.mojo</groupId>
704                         <artifactId>exec-maven-plugin</artifactId>
705                         <executions>
706                             <execution>
707                                 <phase>package</phase>
708                                 <goals>
709                                     <goal>exec</goal>
710                                 </goals>
711                             </execution>
712                         </executions>
713                         <configuration>
714                             <executable>sh</executable>
715                             <arguments>
716                                 <argument>-c</argument>
717                                 <argument>cp \
718                                     ${project.build.directory}/rpm/${project.artifactId}/RPMS/noarch/${project.artifactId}-${project.version}*.noarch.rpm \
719                                     \
720                                     ${project.build.directory}/${project.artifactId}-${project.version}.rpm</argument>
721                             </arguments>
722                         </configuration>
723                     </plugin>
724                     <plugin>
725                         <groupId>org.codehaus.mojo</groupId>
726                         <artifactId>build-helper-maven-plugin</artifactId>
727                         <version>3.0.0</version>
728                         <executions>
729                             <execution>
730                                 <id>attach-artifacts</id>
731                                 <phase>package</phase>
732                                 <goals>
733                                     <goal>attach-artifact</goal>
734                                 </goals>
735                                 <configuration>
736                                     <artifacts>
737                                         <artifact>
738                                             <file>${project.build.directory}/${project.artifactId}-${project.version}.rpm</file>
739                                             <type>rpm</type>
740                                         </artifact>
741                                     </artifacts>
742                                 </configuration>
743                             </execution>
744                         </executions>
745                     </plugin> -->
746                 </plugins>
747             </build>
748         </profile>
749         <profile>
750             <id>only-eclipse</id>
751             <activation>
752                 <property>
753                     <name>m2e.version</name>
754                 </property>
755             </activation>
756             <build>
757                 <pluginManagement>
758                     <plugins>
759                         <plugin>
760                             <groupId>org.eclipse.m2e</groupId>
761                             <artifactId>lifecycle-mapping</artifactId>
762                             <configuration>
763                                 <lifecycleMappingMetadata>
764                                     <pluginExecutions>
765                                         <pluginExecution>
766                                             <pluginExecutionFilter>
767                                                 <groupId>org.apache.maven.plugins</groupId>
768                                                 <artifactId>maven-dependency-plugin</artifactId>
769                                                 <versionRange>[2.0,)</versionRange>
770                                                 <goals>
771                                                     <goal>unpack</goal>
772                                                     <goal>copy</goal>
773                                                 </goals>
774                                             </pluginExecutionFilter>
775                                             <action>
776                                                 <ignore />
777                                             </action>
778                                         </pluginExecution>
779                                     </pluginExecutions>
780                                 </lifecycleMappingMetadata>
781                             </configuration>
782                         </plugin>
783                     </plugins>
784                 </pluginManagement>
785             </build>
786         </profile>
787
788         <profile>
789             <id>apexSite</id>
790             <activation>
791                 <property>
792                     <name>apexSite</name>
793                 </property>
794             </activation>
795             <distributionManagement>
796                 <site>
797                     <id>${project.artifactId}-site</id>
798                     <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
799                 </site>
800             </distributionManagement>
801         </profile>
802     </profiles>
803 </project>