8f533dcd42c49392799356b964d8081d0fc58edf
[l2switch.git] / distribution / karaf / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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">
3   <modelVersion>4.0.0</modelVersion>
4   <parent>
5     <groupId>org.opendaylight.l2switch</groupId>
6     <artifactId>l2switch-parent</artifactId>
7     <version>0.2.2-SNAPSHOT</version>
8     <relativePath>../../parent</relativePath>
9   </parent>
10   <artifactId>distribution-karaf</artifactId>
11   <groupId>org.opendaylight.l2switch</groupId>
12   <packaging>pom</packaging>
13   <prerequisites>
14     <maven>3.0</maven>
15   </prerequisites>
16   <properties>
17     <branding.version>1.1.2-SNAPSHOT</branding.version>
18     <karaf.resources.version>1.5.2-SNAPSHOT</karaf.resources.version>
19     <karaf.version>3.0.1</karaf.version>
20   </properties>
21
22   <dependencies>
23     <!-- Basic Karaf dependencies -->
24     <dependency>
25       <groupId>org.apache.karaf.features</groupId>
26       <artifactId>framework</artifactId>
27       <version>${karaf.version}</version>
28       <type>kar</type>
29     </dependency>
30     <dependency>
31       <groupId>org.apache.karaf.features</groupId>
32       <artifactId>standard</artifactId>
33       <version>${karaf.version}</version>
34       <classifier>features</classifier>
35       <type>xml</type>
36       <scope>runtime</scope>
37     </dependency>
38
39     <!-- ODL Branding -->
40     <dependency>
41       <groupId>org.opendaylight.controller</groupId>
42       <artifactId>karaf.branding</artifactId>
43       <version>${branding.version}</version>
44       <scope>compile</scope>
45     </dependency>
46
47     <!-- ODL Resources needed for karaf -->
48     <dependency>
49       <groupId>org.opendaylight.controller</groupId>
50       <artifactId>opendaylight-karaf-resources</artifactId>
51       <version>${karaf.resources.version}</version>
52     </dependency>
53
54     <!-- dependencies on feature repos -->
55     <dependency>
56       <groupId>org.opendaylight.controller</groupId>
57       <artifactId>features-mdsal</artifactId>
58       <classifier>features</classifier>
59       <type>xml</type>
60       <scope>runtime</scope>
61     </dependency>
62     <dependency>
63       <groupId>org.opendaylight.l2switch</groupId>
64       <artifactId>features-l2switch</artifactId>
65       <version>${project.version}</version>
66       <classifier>features</classifier>
67       <type>xml</type>
68       <scope>runtime</scope>
69     </dependency>
70   </dependencies>
71
72   <build>
73     <pluginManagement>
74       <plugins>
75         <plugin>
76           <groupId>org.eclipse.m2e</groupId>
77           <artifactId>lifecycle-mapping</artifactId>
78           <version>1.0.0</version>
79           <configuration>
80             <lifecycleMappingMetadata>
81               <pluginExecutions>
82                 <pluginExecution>
83                   <pluginExecutionFilter>
84                     <groupId>org.apache.felix</groupId>
85                     <artifactId>maven-bundle-plugin</artifactId>
86                     <versionRange>[0,)</versionRange>
87                     <goals>
88                       <goal>cleanVersions</goal>
89                     </goals>
90                   </pluginExecutionFilter>
91                   <action>
92                     <ignore></ignore>
93                   </action>
94                 </pluginExecution>
95                 <pluginExecution>
96                   <pluginExecutionFilter>
97                     <groupId>org.apache.maven.plugins</groupId>
98                     <artifactId>maven-dependency-plugin</artifactId>
99                     <versionRange>[0,)</versionRange>
100                     <goals>
101                       <goal>copy</goal>
102                       <goal>unpack</goal>
103                     </goals>
104                   </pluginExecutionFilter>
105                   <action>
106                     <ignore></ignore>
107                   </action>
108                 </pluginExecution>
109                 <pluginExecution>
110                   <pluginExecutionFilter>
111                     <groupId>org.apache.karaf.tooling</groupId>
112                     <artifactId>karaf-maven-plugin</artifactId>
113                     <versionRange>[0,)</versionRange>
114                     <goals>
115                       <goal>commands-generate-help</goal>
116                     </goals>
117                   </pluginExecutionFilter>
118                   <action>
119                     <ignore></ignore>
120                   </action>
121                 </pluginExecution>
122                 <pluginExecution>
123                   <pluginExecutionFilter>
124                     <groupId>org.fusesource.scalate</groupId>
125                     <artifactId>maven-scalate-plugin</artifactId>
126                     <versionRange>[0,)</versionRange>
127                     <goals>
128                       <goal>sitegen</goal>
129                     </goals>
130                   </pluginExecutionFilter>
131                   <action>
132                     <ignore></ignore>
133                   </action>
134                 </pluginExecution>
135                 <pluginExecution>
136                   <pluginExecutionFilter>
137                     <groupId>org.apache.servicemix.tooling</groupId>
138                     <artifactId>depends-maven-plugin</artifactId>
139                     <versionRange>[0,)</versionRange>
140                     <goals>
141                       <goal>generate-depends-file</goal>
142                     </goals>
143                   </pluginExecutionFilter>
144                   <action>
145                     <ignore></ignore>
146                   </action>
147                 </pluginExecution>
148               </pluginExecutions>
149             </lifecycleMappingMetadata>
150           </configuration>
151         </plugin>
152       </plugins>
153     </pluginManagement>
154     <plugins>
155       <plugin>
156         <groupId>org.apache.karaf.tooling</groupId>
157         <artifactId>karaf-maven-plugin</artifactId>
158         <version>${karaf.version}</version>
159         <extensions>true</extensions>
160         <configuration>
161           <bootFeatures>
162             <feature>standard</feature>
163             <feature>odl-l2switch-switch-ui</feature>
164           </bootFeatures>
165         </configuration>
166         <executions>
167           <execution>
168             <id>process-resources</id>
169             <goals>
170               <goal>install-kars</goal>
171             </goals>
172             <phase>process-resources</phase>
173           </execution>
174           <execution>
175             <id>package</id>
176             <goals>
177               <goal>instance-create-archive</goal>
178             </goals>
179           </execution>
180         </executions>
181       </plugin>
182       <plugin>
183         <groupId>org.apache.maven.plugins</groupId>
184         <artifactId>maven-dependency-plugin</artifactId>
185         <version>2.6</version>
186         <executions>
187           <execution>
188             <id>copy</id>
189             <goals>
190               <goal>copy</goal>
191             </goals>
192             <!-- here the phase you need -->
193             <phase>generate-resources</phase>
194             <configuration>
195               <artifactItems>
196                 <artifactItem>
197                   <groupId>org.opendaylight.controller</groupId>
198                   <artifactId>karaf.branding</artifactId>
199                   <version>${karaf.branding.version}</version>
200                   <outputDirectory>target/assembly/lib</outputDirectory>
201                   <destFileName>karaf.branding-${branding.version}.jar</destFileName>
202                 </artifactItem>
203               </artifactItems>
204             </configuration>
205           </execution>
206           <execution>
207             <id>unpack-karaf-resources</id>
208             <goals>
209               <goal>unpack-dependencies</goal>
210             </goals>
211             <phase>prepare-package</phase>
212             <configuration>
213              <outputDirectory>${project.build.directory}/assembly</outputDirectory>
214              <groupId>org.opendaylight.controller</groupId>
215              <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
216              <excludes>META-INF\/**</excludes>
217              <excludeTransitive>true</excludeTransitive>
218              <ignorePermissions>false</ignorePermissions>
219             </configuration>
220           </execution>
221         </executions>
222       </plugin>
223       <plugin>
224         <groupId>org.apache.maven.plugins</groupId>
225         <artifactId>maven-antrun-plugin</artifactId>
226         <executions>
227             <execution>
228                 <phase>prepare-package</phase>
229                 <goals>
230                     <goal>run</goal>
231                 </goals>
232                 <configuration>
233                   <tasks>
234                     <chmod perm="755">
235                         <fileset dir="${project.build.directory}/assembly/bin">
236                           <include name="karaf" />
237                           <include name="instance" />
238                           <include name="start"/>
239                           <include name="stop"/>
240                           <include name="status"/>
241                           <include name="client"/>
242                           <include name="shell"/>
243                         </fileset>
244                     </chmod>
245                   </tasks>
246                 </configuration>
247             </execution>
248         </executions>
249       </plugin>
250     </plugins>
251   </build>
252   <scm>
253     <connection>scm:git:ssh://git.opendaylight.org:29418/l2switch.git</connection>
254     <developerConnection>scm:git:ssh://git.opendaylight.org:29418/l2switch.git</developerConnection>
255     <tag>HEAD</tag>
256     <url>https://git.opendaylight.org/gerrit/gitweb?p=l2switch.git;a=summary</url>
257   </scm>
258 </project>