871a3530a8ef0a096edf298657edf38edc002b06
[appc.git] / appc-oam / appc-oam-installer / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ============LICENSE_START=======================================================
4   ONAP : APPC
5   ================================================================================
6   Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
7   ================================================================================
8   Copyright (C) 2017 Amdocs
9   =============================================================================
10   Licensed under the Apache License, Version 2.0 (the "License");
11   you may not use this file except in compliance with the License.
12   You may obtain a copy of the License at
13
14        http://www.apache.org/licenses/LICENSE-2.0
15
16   Unless required by applicable law or agreed to in writing, software
17   distributed under the License is distributed on an "AS IS" BASIS,
18   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19   See the License for the specific language governing permissions and
20   limitations under the License.
21
22   ECOMP is a trademark and service mark of AT&T Intellectual Property.
23   ============LICENSE_END=========================================================
24   -->
25 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
26   <modelVersion>4.0.0</modelVersion>
27   <parent>
28     <artifactId>appc-oam</artifactId>
29     <groupId>org.onap.appc</groupId>
30     <version>1.4.0-SNAPSHOT</version>
31   </parent>
32   
33   <artifactId>appc-oam-installer</artifactId>
34   <name>APPC OAM - Karaf Installer</name>
35   <packaging>pom</packaging>
36
37   <properties>
38     <application.name>appc-oam</application.name>
39     <features.boot>appc-oam</features.boot>
40     <features.repositories>mvn:org.onap.appc/appc-oam-features/${project.version}/xml/features</features.repositories>
41     <include.transitive.dependencies>false</include.transitive.dependencies>
42   </properties>
43
44   <dependencies>
45
46     <dependency>
47       <groupId>org.onap.appc</groupId>
48       <artifactId>appc-oam-features</artifactId>
49       <version>${project.version}</version>
50       <classifier>features</classifier>
51       <type>xml</type>
52       <exclusions>
53         <exclusion>
54           <groupId>*</groupId>
55           <artifactId>*</artifactId>
56         </exclusion>
57       </exclusions>
58     </dependency>
59
60     <dependency>
61       <groupId>org.onap.appc</groupId>
62       <artifactId>appc-oam-bundle</artifactId>
63       <version>${project.version}</version>
64     </dependency>
65
66     <dependency>
67       <groupId>org.onap.appc</groupId>
68       <artifactId>appc-oam-bundle</artifactId>
69       <version>${project.version}</version>
70       <classifier>config</classifier>
71       <type>xml</type>
72     </dependency>
73
74   </dependencies>
75
76   <build>
77     <plugins>
78       <plugin>
79         <artifactId>maven-assembly-plugin</artifactId>
80         <executions>
81           <execution>
82             <id>maven-repo-zip</id>
83             <goals>
84               <goal>single</goal>
85             </goals>
86             <phase>package</phase>
87             <configuration>
88               <appendAssemblyId>false</appendAssemblyId>
89               <attach>false</attach>
90               <finalName>stage/${application.name}-${project.version}</finalName>
91               <descriptors>
92                 <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
93               </descriptors>
94             </configuration>
95           </execution>
96           <execution>
97             <id>installer-zip</id>
98             <goals>
99               <goal>single</goal>
100             </goals>
101             <phase>package</phase>
102             <configuration>
103               <appendAssemblyId>false</appendAssemblyId>
104               <attach>true</attach>
105               <finalName>${application.name}-${project.version}</finalName>
106               <descriptors>
107                 <descriptor>src/assembly/assemble_installer_zip.xml</descriptor>
108               </descriptors>
109             </configuration>
110           </execution>
111         </executions>
112       </plugin>
113       <plugin>
114         <groupId>org.apache.maven.plugins</groupId>
115         <artifactId>maven-dependency-plugin</artifactId>
116         <executions>
117           <execution>
118             <id>copy-dependencies</id>
119             <goals>
120               <goal>copy-dependencies</goal>
121             </goals>
122             <phase>prepare-package</phase>
123             <configuration>
124               <transitive>false</transitive>
125               <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
126               <overWriteReleases>false</overWriteReleases>
127               <overWriteSnapshots>true</overWriteSnapshots>
128               <overWriteIfNewer>true</overWriteIfNewer>
129               <useRepositoryLayout>true</useRepositoryLayout>
130               <addParentPoms>false</addParentPoms>
131               <copyPom>false</copyPom>
132               <excludeGroupIds>org.opendaylight</excludeGroupIds>
133               <scope>provided</scope>
134             </configuration>
135           </execution>
136         </executions>
137       </plugin>
138       <plugin>
139         <artifactId>maven-resources-plugin</artifactId>
140         <executions>
141           <execution>
142             <id>copy-version</id>
143             <goals>
144               <goal>copy-resources</goal>
145             </goals>
146             <!-- here the phase you need -->
147             <phase>validate</phase>
148             <configuration>
149               <outputDirectory>${basedir}/target/stage</outputDirectory>
150               <resources>
151                 <resource>
152                   <directory>src/main/resources/scripts</directory>
153                   <includes>
154                     <include>install-feature.sh</include>
155                   </includes>
156                   <filtering>true</filtering>
157                 </resource>
158               </resources>
159             </configuration>
160           </execution>
161         </executions>
162       </plugin>
163     </plugins>
164   </build>
165
166 </project>