Bug 2907 - corrections for upgrade to karaf 3.0.3
[controller.git] / karaf / karaf-parent / 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"
10   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
11   <parent>
12     <groupId>org.opendaylight.odlparent</groupId>
13     <artifactId>odlparent</artifactId>
14     <version>1.5.0-SNAPSHOT</version>
15     <relativePath/>
16   </parent>
17   <modelVersion>4.0.0</modelVersion>
18   <groupId>org.opendaylight.controller</groupId>
19   <artifactId>karaf-parent</artifactId>
20   <name>${project.artifactId}</name>
21   <packaging>pom</packaging>
22
23   <properties>
24     <branding.version>1.1.0-SNAPSHOT</branding.version>
25     <karaf.resources.version>1.5.0-SNAPSHOT</karaf.resources.version>
26     <karaf.localFeature>standard</karaf.localFeature>
27   </properties>
28   <dependencyManagement>
29     <dependencies>
30       <dependency>
31         <!-- scope is compile so all features (there is only one) are installed
32         into startup.properties and the feature repo itself is not installed -->
33         <groupId>org.apache.karaf.features</groupId>
34         <artifactId>framework</artifactId>
35         <version>${karaf.version}</version>
36         <type>kar</type>
37         <exclusions>
38           <exclusion>
39             <groupId>org.osgi</groupId>
40             <artifactId>org.osgi.core</artifactId>
41           </exclusion>
42           <exclusion>
43             <groupId>org.apache.sshd</groupId>
44             <artifactId>sshd-core</artifactId>
45           </exclusion>
46         </exclusions>
47       </dependency>
48     </dependencies>
49   </dependencyManagement>
50   <dependencies>
51     <!-- karaf standard features -->
52     <dependency>
53       <groupId>org.apache.karaf.features</groupId>
54       <artifactId>standard</artifactId>
55       <version>${karaf.version}</version>
56       <type>xml</type>
57       <classifier>features</classifier>
58       <scope>runtime</scope>
59     </dependency>
60     <!-- ODL Branding -->
61     <dependency>
62       <groupId>org.opendaylight.controller</groupId>
63       <artifactId>karaf.branding</artifactId>
64       <version>${branding.version}</version>
65       <scope>compile</scope>
66     </dependency>
67
68     <!-- Resources needed -->
69     <dependency>
70       <groupId>org.opendaylight.controller</groupId>
71       <artifactId>opendaylight-karaf-resources</artifactId>
72       <version>${karaf.resources.version}</version>
73     </dependency>
74   </dependencies>
75   <build>
76     <pluginManagement>
77       <plugins>
78         <plugin>
79           <groupId>org.eclipse.m2e</groupId>
80           <artifactId>lifecycle-mapping</artifactId>
81           <version>1.0.0</version>
82           <configuration>
83             <lifecycleMappingMetadata>
84               <pluginExecutions>
85                 <pluginExecution>
86                   <pluginExecutionFilter>
87                     <groupId>org.apache.felix</groupId>
88                     <artifactId>maven-bundle-plugin</artifactId>
89                     <versionRange>[0,)</versionRange>
90                     <goals>
91                       <goal>cleanVersions</goal>
92                     </goals>
93                   </pluginExecutionFilter>
94                   <action>
95                     <ignore></ignore>
96                   </action>
97                 </pluginExecution>
98                 <pluginExecution>
99                   <pluginExecutionFilter>
100                     <groupId>org.apache.maven.plugins</groupId>
101                     <artifactId>maven-dependency-plugin</artifactId>
102                     <versionRange>[0,)</versionRange>
103                     <goals>
104                       <goal>copy</goal>
105                       <goal>unpack</goal>
106                     </goals>
107                   </pluginExecutionFilter>
108                   <action>
109                     <ignore></ignore>
110                   </action>
111                 </pluginExecution>
112                 <pluginExecution>
113                   <pluginExecutionFilter>
114                     <groupId>org.apache.karaf.tooling</groupId>
115                     <artifactId>karaf-maven-plugin</artifactId>
116                     <versionRange>[0,)</versionRange>
117                     <goals>
118                       <goal>commands-generate-help</goal>
119                       <goal>features-add-to-repository</goal>
120                       <goal>install-kars</goal>
121                     </goals>
122                   </pluginExecutionFilter>
123                   <action>
124                     <ignore></ignore>
125                   </action>
126                 </pluginExecution>
127                 <pluginExecution>
128                   <pluginExecutionFilter>
129                     <groupId>org.fusesource.scalate</groupId>
130                     <artifactId>maven-scalate-plugin</artifactId>
131                     <versionRange>[0,)</versionRange>
132                     <goals>
133                       <goal>sitegen</goal>
134                     </goals>
135                   </pluginExecutionFilter>
136                   <action>
137                     <ignore></ignore>
138                   </action>
139                 </pluginExecution>
140                 <pluginExecution>
141                   <pluginExecutionFilter>
142                     <groupId>org.apache.servicemix.tooling</groupId>
143                     <artifactId>depends-maven-plugin</artifactId>
144                     <versionRange>[0,)</versionRange>
145                     <goals>
146                       <goal>generate-depends-file</goal>
147                     </goals>
148                   </pluginExecutionFilter>
149                   <action>
150                     <ignore></ignore>
151                   </action>
152                 </pluginExecution>
153               </pluginExecutions>
154             </lifecycleMappingMetadata>
155           </configuration>
156         </plugin>
157
158         <plugin>
159           <artifactId>maven-resources-plugin</artifactId>
160           <executions>
161             <execution>
162               <id>copy-resources</id>
163               <!-- here the phase you need -->
164               <phase>prepare-package</phase>
165               <goals>
166                 <goal>copy-resources</goal>
167               </goals>
168               <configuration>
169                 <outputDirectory>${basedir}/target/assembly</outputDirectory>
170                 <resources>
171                   <resource>
172                     <directory>src/main/assembly</directory>
173                   </resource>
174                 </resources>
175                 <overwrite>true</overwrite>
176               </configuration>
177             </execution>
178           </executions>
179         </plugin>
180         <plugin>
181           <groupId>org.apache.karaf.tooling</groupId>
182           <artifactId>karaf-maven-plugin</artifactId>
183           <version>${karaf.version}</version>
184           <extensions>true</extensions>
185           <configuration>
186             <!-- no startupFeatures -->
187             <bootFeatures>
188               <feature>standard</feature>
189               <feature>${karaf.localFeature}</feature>
190             </bootFeatures>
191             <!-- no installedFeatures -->
192           </configuration>
193           <executions>
194             <execution>
195               <id>populate-system</id>
196               <phase>generate-resources</phase>
197               <goals>
198                 <goal>features-add-to-repository</goal>
199               </goals>
200               <configuration>
201                 <descriptors>
202                   <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
203                 </descriptors>
204                 <features>
205                   <feature>standard</feature>
206                   <feature>config</feature>
207                   <feature>package</feature>
208                   <feature>kar</feature>
209                   <feature>ssh</feature>
210                   <feature>management</feature>
211                   <feature>war</feature>
212                 </features>
213                 <repository>target/assembly/system</repository>
214               </configuration>
215             </execution>
216             <execution>
217               <id>process-resources</id>
218               <goals>
219                 <goal>install-kars</goal>
220               </goals>
221               <phase>process-resources</phase>
222             </execution>
223             <execution>
224               <id>package</id>
225               <goals>
226                 <goal>instance-create-archive</goal>
227               </goals>
228             </execution>
229           </executions>
230         </plugin>
231         <plugin>
232           <groupId>org.apache.maven.plugins</groupId>
233           <artifactId>maven-checkstyle-plugin</artifactId>
234           <version>${checkstyle.version}</version>
235           <configuration>
236             <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
237           </configuration>
238         </plugin>
239         <plugin>
240           <groupId>org.apache.maven.plugins</groupId>
241           <artifactId>maven-dependency-plugin</artifactId>
242           <executions>
243             <execution>
244               <id>copy</id>
245               <goals>
246                 <goal>copy</goal>
247               </goals>
248               <!-- here the phase you need -->
249               <phase>generate-resources</phase>
250               <configuration>
251                 <artifactItems>
252                   <artifactItem>
253                     <groupId>org.opendaylight.controller</groupId>
254                     <artifactId>karaf.branding</artifactId>
255                     <version>${karaf.branding.version}</version>
256                     <outputDirectory>target/assembly/lib</outputDirectory>
257                     <destFileName>karaf.branding-${branding.version}.jar</destFileName>
258                   </artifactItem>
259                 </artifactItems>
260               </configuration>
261             </execution>
262             <execution>
263               <id>unpack-karaf-resources</id>
264               <goals>
265                 <goal>unpack-dependencies</goal>
266               </goals>
267               <phase>prepare-package</phase>
268               <configuration>
269                 <outputDirectory>${project.build.directory}/assembly</outputDirectory>
270                 <groupId>org.opendaylight.controller</groupId>
271                 <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
272                 <excludes>META-INF\/**</excludes>
273                 <excludeTransitive>true</excludeTransitive>
274                 <ignorePermissions>false</ignorePermissions>
275               </configuration>
276             </execution>
277             <execution>
278               <id>org.ops4j.pax.url.mvn.cfg</id>
279               <goals>
280                 <goal>copy</goal>
281               </goals>
282               <phase>prepare-package</phase>
283               <configuration>
284                 <artifactItems>
285                   <artifactItem>
286                     <groupId>org.opendaylight.controller</groupId>
287                     <artifactId>opendaylight-karaf-resources</artifactId>
288                     <type>properties</type>
289                     <classifier>config</classifier>
290                     <overWrite>true</overWrite>
291                     <outputDirectory>${project.build.directory}/assembly/etc/</outputDirectory>
292                     <destFileName>org.ops4j.pax.url.mvn.cfg</destFileName>
293                   </artifactItem>
294                 </artifactItems>
295                 <overWriteReleases>true</overWriteReleases>
296                 <overWriteSnapshots>true</overWriteSnapshots>
297               </configuration>
298             </execution>
299             <execution>
300               <id>copy-dependencies</id>
301               <phase>prepare-package</phase>
302               <goals>
303                 <goal>copy-dependencies</goal>
304               </goals>
305               <configuration>
306                 <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
307                 <excludeArtifactIds>distribution.vtn-coordinator</excludeArtifactIds>
308                 <overWriteReleases>false</overWriteReleases>
309                 <overWriteSnapshots>true</overWriteSnapshots>
310                 <overWriteIfNewer>true</overWriteIfNewer>
311                 <useRepositoryLayout>true</useRepositoryLayout>
312                 <addParentPoms>true</addParentPoms>
313                 <copyPom>true</copyPom>
314               </configuration>
315             </execution>
316           </executions>
317         </plugin>
318         <plugin>
319           <groupId>org.apache.maven.plugins</groupId>
320           <artifactId>maven-antrun-plugin</artifactId>
321           <executions>
322             <execution>
323               <phase>prepare-package</phase>
324               <goals>
325                 <goal>run</goal>
326               </goals>
327               <configuration>
328                 <tasks>
329                   <chmod perm="755">
330                     <fileset dir="${project.build.directory}/assembly/bin">
331                       <include name="karaf"/>
332                       <include name="instance"/>
333                       <include name="start"/>
334                       <include name="stop"/>
335                       <include name="status"/>
336                       <include name="client"/>
337                       <include name="shell"/>
338                     </fileset>
339                   </chmod>
340                 </tasks>
341               </configuration>
342             </execution>
343           </executions>
344         </plugin>
345       </plugins>
346     </pluginManagement>
347     <plugins>
348       <plugin>
349         <groupId>org.apache.maven.plugins</groupId>
350         <artifactId>maven-enforcer-plugin</artifactId>
351         <version>${enforcer.version}</version>
352         <executions>
353           <execution>
354             <id>enforce-maven</id>
355             <goals>
356               <goal>enforce</goal>
357             </goals>
358             <configuration>
359               <rules>
360                 <requireMavenVersion>
361                   <version>3.1.1</version>
362                 </requireMavenVersion>
363               </rules>
364             </configuration>
365           </execution>
366         </executions>
367       </plugin>
368       <plugin>
369         <artifactId>maven-resources-plugin</artifactId>
370       </plugin>
371       <plugin>
372         <groupId>org.apache.karaf.tooling</groupId>
373         <artifactId>karaf-maven-plugin</artifactId>
374       </plugin>
375       <plugin>
376         <groupId>org.apache.maven.plugins</groupId>
377         <artifactId>maven-checkstyle-plugin</artifactId>
378       </plugin>
379       <plugin>
380         <groupId>org.apache.maven.plugins</groupId>
381         <artifactId>maven-dependency-plugin</artifactId>
382       </plugin>
383       <plugin>
384         <groupId>org.apache.maven.plugins</groupId>
385         <artifactId>maven-antrun-plugin</artifactId>
386       </plugin>
387     </plugins>
388   </build>
389
390 </project>