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