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