Refactor the poms to clean up unused tags and move to odl parent
[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         <version>${karaf.version}</version>
148         <extensions>true</extensions>
149         <configuration>
150           <bootFeatures>
151             <feature>standard</feature>
152             <feature>odl-restconf</feature>
153             <feature>odl-lispflowmapping-all</feature>
154           </bootFeatures>
155         </configuration>
156         <executions>
157           <execution>
158             <id>process-resources</id>
159             <goals>
160               <goal>install-kars</goal>
161             </goals>
162             <phase>process-resources</phase>
163           </execution>
164           <execution>
165             <id>package</id>
166             <goals>
167               <goal>instance-create-archive</goal>
168             </goals>
169           </execution>
170         </executions>
171       </plugin>
172       <plugin>
173         <groupId>org.apache.maven.plugins</groupId>
174         <artifactId>maven-antrun-plugin</artifactId>
175         <executions>
176           <execution>
177             <goals>
178               <goal>run</goal>
179             </goals>
180             <phase>prepare-package</phase>
181             <configuration>
182               <tasks>
183                 <chmod perm="755">
184                   <fileset dir="${project.build.directory}/assembly/bin">
185                     <include name="karaf"></include>
186                     <include name="instance"></include>
187                     <include name="start"></include>
188                     <include name="stop"></include>
189                     <include name="status"></include>
190                     <include name="client"></include>
191                     <include name="shell"></include>
192                   </fileset>
193                 </chmod>
194               </tasks>
195             </configuration>
196           </execution>
197         </executions>
198       </plugin>
199       <plugin>
200         <groupId>org.apache.maven.plugins</groupId>
201         <artifactId>maven-dependency-plugin</artifactId>
202         <executions>
203           <execution>
204             <id>copy</id>
205             <goals>
206               <goal>copy</goal>
207             </goals>
208             <phase>generate-resources</phase>
209             <configuration>
210               <artifactItems>
211                 <artifactItem>
212                   <groupId>org.opendaylight.controller</groupId>
213                   <artifactId>karaf.branding</artifactId>
214                   <version>${karaf.branding.version}</version>
215                   <outputDirectory>target/assembly/lib</outputDirectory>
216                   <destFileName>karaf.branding-${branding.version}.jar</destFileName>
217                 </artifactItem>
218               </artifactItems>
219             </configuration>
220           </execution>
221           <execution>
222             <id>unpack-karaf-resources</id>
223             <goals>
224               <goal>unpack-dependencies</goal>
225             </goals>
226             <phase>prepare-package</phase>
227             <configuration>
228               <outputDirectory>${project.build.directory}/assembly</outputDirectory>
229               <groupId>org.opendaylight.controller</groupId>
230               <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
231               <excludes>META-INF\/**</excludes>
232               <excludeTransitive>true</excludeTransitive>
233               <ignorePermissions>false</ignorePermissions>
234             </configuration>
235           </execution>
236         </executions>
237       </plugin>
238     </plugins>
239   </build>
240 </project>