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