05f918890485c78aeda12c12fd459fcf43ca8339
[lispflowmapping.git] / distribution-karaf / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
4
5  This program and the accompanying materials are made available under the
6  terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  and is available at http://www.eclipse.org/legal/epl-v10.html
8 -->
9 <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">
10   <modelVersion>4.0.0</modelVersion>
11   <parent>
12     <groupId>org.opendaylight.lispflowmapping</groupId>
13     <artifactId>lispflowmapping-all</artifactId>
14     <version>1.2.0-SNAPSHOT</version>
15   </parent>
16   <artifactId>distribution-karaf</artifactId>
17   <packaging>pom</packaging>
18   <name>LISP Flow Mapping Project - Karaf Distribution</name>
19   <prerequisites>
20     <maven>3.0</maven>
21   </prerequisites>
22
23   <dependencies>
24     <!-- Basic Karaf dependencies -->
25     <dependency>
26       <groupId>org.apache.karaf.features</groupId>
27       <artifactId>framework</artifactId>
28       <type>kar</type>
29     </dependency>
30
31     <!-- ODL Branding -->
32     <dependency>
33       <groupId>org.opendaylight.controller</groupId>
34       <artifactId>karaf.branding</artifactId>
35       <scope>compile</scope>
36     </dependency>
37
38     <!-- ODL Resources needed for karaf -->
39     <dependency>
40       <groupId>org.opendaylight.controller</groupId>
41       <artifactId>opendaylight-karaf-resources</artifactId>
42     </dependency>
43     <dependency>
44       <groupId>org.apache.karaf.features</groupId>
45       <artifactId>standard</artifactId>
46       <classifier>features</classifier>
47       <type>xml</type>
48       <scope>runtime</scope>
49     </dependency>
50
51     <!-- Project local feautures -->
52     <dependency>
53       <groupId>org.opendaylight.lispflowmapping</groupId>
54       <artifactId>features-lispflowmapping</artifactId>
55       <classifier>features</classifier>
56       <type>xml</type>
57       <scope>runtime</scope>
58     </dependency>
59   </dependencies>
60
61   <build>
62     <pluginManagement>
63       <plugins>
64         <plugin>
65           <groupId>org.eclipse.m2e</groupId>
66           <artifactId>lifecycle-mapping</artifactId>
67           <version>1.0.0</version>
68           <configuration>
69             <lifecycleMappingMetadata>
70               <pluginExecutions>
71                 <pluginExecution>
72                   <pluginExecutionFilter>
73                     <groupId>org.apache.felix</groupId>
74                     <artifactId>maven-bundle-plugin</artifactId>
75                     <versionRange>[0,)</versionRange>
76                     <goals>
77                       <goal>cleanVersions</goal>
78                     </goals>
79                   </pluginExecutionFilter>
80                   <action>
81                     <ignore></ignore>
82                   </action>
83                 </pluginExecution>
84                 <pluginExecution>
85                   <pluginExecutionFilter>
86                     <groupId>org.apache.maven.plugins</groupId>
87                     <artifactId>maven-dependency-plugin</artifactId>
88                     <versionRange>[0,)</versionRange>
89                     <goals>
90                       <goal>copy</goal>
91                       <goal>unpack</goal>
92                     </goals>
93                   </pluginExecutionFilter>
94                   <action>
95                     <ignore></ignore>
96                   </action>
97                 </pluginExecution>
98                 <pluginExecution>
99                   <pluginExecutionFilter>
100                     <groupId>org.apache.karaf.tooling</groupId>
101                     <artifactId>karaf-maven-plugin</artifactId>
102                     <versionRange>[0,)</versionRange>
103                     <goals>
104                       <goal>commands-generate-help</goal>
105                     </goals>
106                   </pluginExecutionFilter>
107                   <action>
108                     <ignore></ignore>
109                   </action>
110                 </pluginExecution>
111                 <pluginExecution>
112                   <pluginExecutionFilter>
113                     <groupId>org.fusesource.scalate</groupId>
114                     <artifactId>maven-scalate-plugin</artifactId>
115                     <versionRange>[0,)</versionRange>
116                     <goals>
117                       <goal>sitegen</goal>
118                     </goals>
119                   </pluginExecutionFilter>
120                   <action>
121                     <ignore></ignore>
122                   </action>
123                 </pluginExecution>
124                 <pluginExecution>
125                   <pluginExecutionFilter>
126                     <groupId>org.apache.servicemix.tooling</groupId>
127                     <artifactId>depends-maven-plugin</artifactId>
128                     <versionRange>[0,)</versionRange>
129                     <goals>
130                       <goal>generate-depends-file</goal>
131                     </goals>
132                   </pluginExecutionFilter>
133                   <action>
134                     <ignore></ignore>
135                   </action>
136                 </pluginExecution>
137               </pluginExecutions>
138             </lifecycleMappingMetadata>
139           </configuration>
140         </plugin>
141       </plugins>
142     </pluginManagement>
143     <plugins>
144       <plugin>
145         <groupId>org.apache.karaf.tooling</groupId>
146         <artifactId>karaf-maven-plugin</artifactId>
147         <extensions>true</extensions>
148         <configuration>
149           <bootFeatures>
150             <feature>standard</feature>
151             <feature>odl-restconf</feature>
152             <feature>odl-lispflowmapping-all</feature>
153           </bootFeatures>
154         </configuration>
155         <executions>
156           <execution>
157             <id>process-resources</id>
158             <goals>
159               <goal>install-kars</goal>
160             </goals>
161             <phase>process-resources</phase>
162           </execution>
163           <execution>
164             <id>package</id>
165             <goals>
166               <goal>instance-create-archive</goal>
167             </goals>
168           </execution>
169         </executions>
170       </plugin>
171       <plugin>
172         <groupId>org.apache.maven.plugins</groupId>
173         <artifactId>maven-antrun-plugin</artifactId>
174         <executions>
175           <execution>
176             <goals>
177               <goal>run</goal>
178             </goals>
179             <phase>prepare-package</phase>
180             <configuration>
181               <tasks>
182                 <chmod perm="755">
183                   <fileset dir="${project.build.directory}/assembly/bin">
184                     <include name="karaf"></include>
185                     <include name="instance"></include>
186                     <include name="start"></include>
187                     <include name="stop"></include>
188                     <include name="status"></include>
189                     <include name="client"></include>
190                     <include name="shell"></include>
191                   </fileset>
192                 </chmod>
193               </tasks>
194             </configuration>
195           </execution>
196         </executions>
197       </plugin>
198       <plugin>
199         <groupId>org.apache.maven.plugins</groupId>
200         <artifactId>maven-dependency-plugin</artifactId>
201         <executions>
202           <execution>
203             <id>copy</id>
204             <goals>
205               <goal>copy</goal>
206             </goals>
207             <phase>generate-resources</phase>
208             <configuration>
209               <artifactItems>
210                 <artifactItem>
211                   <groupId>org.opendaylight.controller</groupId>
212                   <artifactId>karaf.branding</artifactId>
213                   <version>${karaf.branding.version}</version>
214                   <outputDirectory>target/assembly/lib</outputDirectory>
215                   <destFileName>karaf.branding-${branding.version}.jar</destFileName>
216                 </artifactItem>
217               </artifactItems>
218             </configuration>
219           </execution>
220           <execution>
221             <id>unpack-karaf-resources</id>
222             <goals>
223               <goal>unpack-dependencies</goal>
224             </goals>
225             <phase>prepare-package</phase>
226             <configuration>
227               <outputDirectory>${project.build.directory}/assembly</outputDirectory>
228               <groupId>org.opendaylight.controller</groupId>
229               <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
230               <excludes>META-INF\/**</excludes>
231               <excludeTransitive>true</excludeTransitive>
232               <ignorePermissions>false</ignorePermissions>
233             </configuration>
234           </execution>
235         </executions>
236       </plugin>
237     </plugins>
238   </build>
239 </project>