Enable netty config modules to restart when blueprint container restarts
[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.7.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.3.0-SNAPSHOT</branding.version>
25     <karaf.resources.version>1.7.0-SNAPSHOT</karaf.resources.version>
26     <karaf.localFeature>standard</karaf.localFeature>
27     <!--  Karaf Maven plugin 3.0.3 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           <!-- We provide a newer version of Aries Proxy -->
53           <exclusion>
54             <groupId>org.apache.aries.proxy</groupId>
55             <artifactId>org.apache.aries.proxy.impl</artifactId>
56           </exclusion>
57         </exclusions>
58       </dependency>
59     </dependencies>
60   </dependencyManagement>
61   <dependencies>
62     <!-- karaf standard features - scope is runtime so the feature repo is listed in the
63          features cfg file but the features aren't all installed by default via the
64          startup.properties. The features may be installed using the karaf-maven-plugin
65          configuration. -->
66     <dependency>
67       <groupId>org.apache.karaf.features</groupId>
68       <artifactId>standard</artifactId>
69       <version>${karaf.version}</version>
70       <type>xml</type>
71       <classifier>features</classifier>
72       <scope>runtime</scope>
73     </dependency>
74     <!-- karaf region dependency -->
75     <dependency>
76       <groupId>org.apache.karaf.region</groupId>
77       <artifactId>org.apache.karaf.region.persist</artifactId>
78       <version>${karaf.version}</version>
79       <scope>runtime</scope>
80     </dependency>
81     <!-- ODL Branding -->
82     <dependency>
83       <groupId>org.opendaylight.controller</groupId>
84       <artifactId>karaf.branding</artifactId>
85       <version>${branding.version}</version>
86       <scope>compile</scope>
87     </dependency>
88
89     <!-- Resources needed -->
90     <dependency>
91       <groupId>org.opendaylight.controller</groupId>
92       <artifactId>opendaylight-karaf-resources</artifactId>
93       <version>${karaf.resources.version}</version>
94     </dependency>
95
96     <!-- Aries Proxy 1.0.5 contains important bug fixes -->
97     <!-- Once we upgrade to a version of Karaf which has at least 1.0.5, this can be removed -->
98     <dependency>
99       <groupId>org.apache.aries.proxy</groupId>
100       <artifactId>org.apache.aries.proxy.impl</artifactId>
101       <version>1.0.5</version>
102     </dependency>
103   </dependencies>
104   <build>
105     <pluginManagement>
106       <plugins>
107         <plugin>
108           <groupId>org.eclipse.m2e</groupId>
109           <artifactId>lifecycle-mapping</artifactId>
110           <version>1.0.0</version>
111           <configuration>
112             <lifecycleMappingMetadata>
113               <pluginExecutions>
114                 <pluginExecution>
115                   <pluginExecutionFilter>
116                     <groupId>org.apache.felix</groupId>
117                     <artifactId>maven-bundle-plugin</artifactId>
118                     <versionRange>[0,)</versionRange>
119                     <goals>
120                       <goal>cleanVersions</goal>
121                     </goals>
122                   </pluginExecutionFilter>
123                   <action>
124                     <ignore></ignore>
125                   </action>
126                 </pluginExecution>
127                 <pluginExecution>
128                   <pluginExecutionFilter>
129                     <groupId>org.apache.maven.plugins</groupId>
130                     <artifactId>maven-dependency-plugin</artifactId>
131                     <versionRange>[0,)</versionRange>
132                     <goals>
133                       <goal>copy</goal>
134                       <goal>unpack</goal>
135                     </goals>
136                   </pluginExecutionFilter>
137                   <action>
138                     <ignore></ignore>
139                   </action>
140                 </pluginExecution>
141                 <pluginExecution>
142                   <pluginExecutionFilter>
143                     <groupId>org.apache.karaf.tooling</groupId>
144                     <artifactId>karaf-maven-plugin</artifactId>
145                     <versionRange>[0,)</versionRange>
146                     <goals>
147                       <goal>commands-generate-help</goal>
148                       <goal>features-add-to-repository</goal>
149                       <goal>install-kars</goal>
150                     </goals>
151                   </pluginExecutionFilter>
152                   <action>
153                     <ignore></ignore>
154                   </action>
155                 </pluginExecution>
156                 <pluginExecution>
157                   <pluginExecutionFilter>
158                     <groupId>org.fusesource.scalate</groupId>
159                     <artifactId>maven-scalate-plugin</artifactId>
160                     <versionRange>[0,)</versionRange>
161                     <goals>
162                       <goal>sitegen</goal>
163                     </goals>
164                   </pluginExecutionFilter>
165                   <action>
166                     <ignore></ignore>
167                   </action>
168                 </pluginExecution>
169                 <pluginExecution>
170                   <pluginExecutionFilter>
171                     <groupId>org.apache.servicemix.tooling</groupId>
172                     <artifactId>depends-maven-plugin</artifactId>
173                     <versionRange>[0,)</versionRange>
174                     <goals>
175                       <goal>generate-depends-file</goal>
176                     </goals>
177                   </pluginExecutionFilter>
178                   <action>
179                     <ignore></ignore>
180                   </action>
181                 </pluginExecution>
182               </pluginExecutions>
183             </lifecycleMappingMetadata>
184           </configuration>
185         </plugin>
186
187         <plugin>
188           <artifactId>maven-resources-plugin</artifactId>
189           <executions>
190             <execution>
191               <id>copy-resources</id>
192               <!-- here the phase you need -->
193               <phase>prepare-package</phase>
194               <goals>
195                 <goal>copy-resources</goal>
196               </goals>
197               <configuration>
198                 <outputDirectory>${basedir}/target/assembly</outputDirectory>
199                 <resources>
200                   <resource>
201                     <directory>src/main/assembly</directory>
202                   </resource>
203                 </resources>
204                 <overwrite>true</overwrite>
205               </configuration>
206             </execution>
207           </executions>
208         </plugin>
209         <plugin>
210           <groupId>org.apache.karaf.tooling</groupId>
211           <artifactId>karaf-maven-plugin</artifactId>
212           <version>${karaf.maven.version}</version>
213           <extensions>true</extensions>
214           <configuration>
215             <startupFeatures>
216               <!-- For some reason, the eventadmin bundle works fine when installed via the
217                    startup.properties but doesn't work properly when installed via the
218                    boot features.  -->
219               <feature>eventadmin</feature>
220             </startupFeatures>
221             <bootFeatures>
222               <feature>standard</feature>
223               <feature>${karaf.localFeature}</feature>
224             </bootFeatures>
225             <!-- no installedFeatures -->
226           </configuration>
227           <executions>
228             <execution>
229               <id>populate-system</id>
230               <phase>generate-resources</phase>
231               <goals>
232                 <goal>features-add-to-repository</goal>
233               </goals>
234               <configuration>
235                 <descriptors>
236                   <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
237                 </descriptors>
238                 <features>
239                   <feature>standard</feature>
240                   <feature>config</feature>
241                   <feature>package</feature>
242                   <feature>kar</feature>
243                   <feature>ssh</feature>
244                   <feature>management</feature>
245                   <feature>war</feature>
246                 </features>
247                 <repository>target/assembly/system</repository>
248               </configuration>
249             </execution>
250             <execution>
251               <id>process-resources</id>
252               <goals>
253                 <goal>install-kars</goal>
254               </goals>
255               <phase>process-resources</phase>
256             </execution>
257             <execution>
258               <id>package</id>
259               <goals>
260                 <goal>instance-create-archive</goal>
261               </goals>
262             </execution>
263           </executions>
264         </plugin>
265         <plugin>
266           <groupId>org.apache.maven.plugins</groupId>
267           <artifactId>maven-checkstyle-plugin</artifactId>
268           <version>${checkstyle.version}</version>
269           <configuration>
270             <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
271           </configuration>
272         </plugin>
273         <plugin>
274           <groupId>org.apache.maven.plugins</groupId>
275           <artifactId>maven-dependency-plugin</artifactId>
276           <executions>
277             <execution>
278               <id>copy</id>
279               <goals>
280                 <goal>copy</goal>
281               </goals>
282               <!-- here the phase you need -->
283               <phase>generate-resources</phase>
284               <configuration>
285                 <artifactItems>
286                   <artifactItem>
287                     <groupId>org.opendaylight.controller</groupId>
288                     <artifactId>karaf.branding</artifactId>
289                     <version>${karaf.branding.version}</version>
290                     <outputDirectory>target/assembly/lib</outputDirectory>
291                     <destFileName>karaf.branding-${branding.version}.jar</destFileName>
292                   </artifactItem>
293                 </artifactItems>
294               </configuration>
295             </execution>
296             <execution>
297               <id>unpack-karaf-resources</id>
298               <goals>
299                 <goal>unpack-dependencies</goal>
300               </goals>
301               <phase>prepare-package</phase>
302               <configuration>
303                 <outputDirectory>${project.build.directory}/assembly</outputDirectory>
304                 <groupId>org.opendaylight.controller</groupId>
305                 <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
306                 <excludes>META-INF\/**</excludes>
307                 <excludeTransitive>true</excludeTransitive>
308                 <ignorePermissions>false</ignorePermissions>
309               </configuration>
310             </execution>
311             <execution>
312               <id>org.ops4j.pax.url.mvn.cfg</id>
313               <goals>
314                 <goal>copy</goal>
315               </goals>
316               <phase>prepare-package</phase>
317               <configuration>
318                 <artifactItems>
319                   <artifactItem>
320                     <groupId>org.opendaylight.controller</groupId>
321                     <artifactId>opendaylight-karaf-resources</artifactId>
322                     <type>properties</type>
323                     <classifier>config</classifier>
324                     <overWrite>true</overWrite>
325                     <outputDirectory>${project.build.directory}/assembly/etc/</outputDirectory>
326                     <destFileName>org.ops4j.pax.url.mvn.cfg</destFileName>
327                   </artifactItem>
328                 </artifactItems>
329                 <overWriteReleases>true</overWriteReleases>
330                 <overWriteSnapshots>true</overWriteSnapshots>
331               </configuration>
332             </execution>
333             <execution>
334               <id>copy-dependencies</id>
335               <phase>prepare-package</phase>
336               <goals>
337                 <goal>copy-dependencies</goal>
338               </goals>
339               <configuration>
340                 <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
341                 <excludeArtifactIds>distribution.vtn-coordinator</excludeArtifactIds>
342                 <overWriteReleases>false</overWriteReleases>
343                 <overWriteSnapshots>true</overWriteSnapshots>
344                 <overWriteIfNewer>true</overWriteIfNewer>
345                 <useRepositoryLayout>true</useRepositoryLayout>
346                 <addParentPoms>true</addParentPoms>
347                 <copyPom>true</copyPom>
348               </configuration>
349             </execution>
350           </executions>
351         </plugin>
352         <plugin>
353           <groupId>org.apache.maven.plugins</groupId>
354           <artifactId>maven-antrun-plugin</artifactId>
355           <executions>
356             <execution>
357               <phase>prepare-package</phase>
358               <goals>
359                 <goal>run</goal>
360               </goals>
361               <configuration>
362                 <tasks>
363                   <chmod perm="755">
364                     <fileset dir="${project.build.directory}/assembly/bin">
365                       <include name="karaf"/>
366                       <include name="instance"/>
367                       <include name="start"/>
368                       <include name="stop"/>
369                       <include name="status"/>
370                       <include name="client"/>
371                       <include name="shell"/>
372                     </fileset>
373                   </chmod>
374                   <!-- Remove this once Karaf provides a new-enough version of Aries Proxy -->
375                   <replace dir="${project.build.directory}/assembly/etc" token="org.apache.aries.proxy.impl/1.0.4"
376                            value="org.apache.aries.proxy.impl/1.0.5">
377                     <include name="startup.properties"/>
378                   </replace>
379
380                   <!-- BUG-5917, BUG-5943: remove overrides for platform factories and neuter Xalan's services-->
381                   <replace dir="${project.build.directory}/assembly/etc" token="javax.xml.parsers.DocumentBuilderFactory="
382                            value="# BUG-5943: javax.xml.parsers.DocumentBuilderFactory=">
383                     <include name="system.properties"/>
384                   </replace>
385                   <replace dir="${project.build.directory}/assembly/etc" token="javax.xml.transform.TransformerFactory="
386                            value="# BUG-5917: javax.xml.transform.TransformerFactory=">
387                     <include name="system.properties"/>
388                   </replace>
389                   <jar destfile="${project.build.directory}/assembly/lib/endorsed/odl-org.apache.servicemix.bundles.xalan-2.7.2_2_odl.jar">
390                     <zipfileset src="${project.build.directory}/assembly/lib/endorsed/org.apache.servicemix.bundles.xalan-2.7.2_2.jar"
391                                 excludes="META-INF/services/javax.xml.*" erroronmissingarchive="false"/>
392                   </jar>
393                   <delete file="${project.build.directory}/assembly/lib/endorsed/org.apache.servicemix.bundles.xalan-2.7.2_2.jar" />
394
395                 </tasks>
396               </configuration>
397             </execution>
398           </executions>
399         </plugin>
400       </plugins>
401     </pluginManagement>
402     <plugins>
403       <plugin>
404         <groupId>org.apache.maven.plugins</groupId>
405         <artifactId>maven-enforcer-plugin</artifactId>
406         <version>${enforcer.version}</version>
407         <executions>
408           <execution>
409             <id>enforce-maven</id>
410             <goals>
411               <goal>enforce</goal>
412             </goals>
413             <configuration>
414               <rules>
415                 <requireMavenVersion>
416                   <version>3.1.1</version>
417                 </requireMavenVersion>
418               </rules>
419             </configuration>
420           </execution>
421         </executions>
422       </plugin>
423       <plugin>
424         <artifactId>maven-resources-plugin</artifactId>
425       </plugin>
426       <plugin>
427         <groupId>org.apache.karaf.tooling</groupId>
428         <artifactId>karaf-maven-plugin</artifactId>
429       </plugin>
430       <plugin>
431         <groupId>org.apache.maven.plugins</groupId>
432         <artifactId>maven-checkstyle-plugin</artifactId>
433       </plugin>
434       <plugin>
435         <groupId>org.apache.maven.plugins</groupId>
436         <artifactId>maven-dependency-plugin</artifactId>
437       </plugin>
438       <plugin>
439         <groupId>org.apache.maven.plugins</groupId>
440         <artifactId>maven-antrun-plugin</artifactId>
441       </plugin>
442     </plugins>
443   </build>
444
445 </project>