1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
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
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">
12 <groupId>org.opendaylight.odlparent</groupId>
13 <artifactId>odlparent</artifactId>
14 <version>1.7.0-SNAPSHOT</version>
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>
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.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
32 <karaf.maven.version>3.0.1</karaf.maven.version>
34 <dependencyManagement>
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>
45 <groupId>org.osgi</groupId>
46 <artifactId>org.osgi.core</artifactId>
49 <groupId>org.apache.sshd</groupId>
50 <artifactId>sshd-core</artifactId>
52 <!-- We provide a newer version of Aries Proxy -->
54 <groupId>org.apache.aries.proxy</groupId>
55 <artifactId>org.apache.aries.proxy.impl</artifactId>
60 </dependencyManagement>
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
67 <groupId>org.apache.karaf.features</groupId>
68 <artifactId>standard</artifactId>
69 <version>${karaf.version}</version>
71 <classifier>features</classifier>
72 <scope>runtime</scope>
74 <!-- karaf region 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>
83 <groupId>org.opendaylight.controller</groupId>
84 <artifactId>karaf.branding</artifactId>
85 <version>${branding.version}</version>
86 <scope>compile</scope>
89 <!-- Resources needed -->
91 <groupId>org.opendaylight.controller</groupId>
92 <artifactId>opendaylight-karaf-resources</artifactId>
93 <version>${karaf.resources.version}</version>
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 -->
99 <groupId>org.apache.aries.proxy</groupId>
100 <artifactId>org.apache.aries.proxy.impl</artifactId>
101 <version>1.0.5</version>
108 <groupId>org.eclipse.m2e</groupId>
109 <artifactId>lifecycle-mapping</artifactId>
110 <version>1.0.0</version>
112 <lifecycleMappingMetadata>
115 <pluginExecutionFilter>
116 <groupId>org.apache.felix</groupId>
117 <artifactId>maven-bundle-plugin</artifactId>
118 <versionRange>[0,)</versionRange>
120 <goal>cleanVersions</goal>
122 </pluginExecutionFilter>
128 <pluginExecutionFilter>
129 <groupId>org.apache.maven.plugins</groupId>
130 <artifactId>maven-dependency-plugin</artifactId>
131 <versionRange>[0,)</versionRange>
136 </pluginExecutionFilter>
142 <pluginExecutionFilter>
143 <groupId>org.apache.karaf.tooling</groupId>
144 <artifactId>karaf-maven-plugin</artifactId>
145 <versionRange>[0,)</versionRange>
147 <goal>commands-generate-help</goal>
148 <goal>features-add-to-repository</goal>
149 <goal>install-kars</goal>
151 </pluginExecutionFilter>
157 <pluginExecutionFilter>
158 <groupId>org.fusesource.scalate</groupId>
159 <artifactId>maven-scalate-plugin</artifactId>
160 <versionRange>[0,)</versionRange>
164 </pluginExecutionFilter>
170 <pluginExecutionFilter>
171 <groupId>org.apache.servicemix.tooling</groupId>
172 <artifactId>depends-maven-plugin</artifactId>
173 <versionRange>[0,)</versionRange>
175 <goal>generate-depends-file</goal>
177 </pluginExecutionFilter>
183 </lifecycleMappingMetadata>
188 <artifactId>maven-resources-plugin</artifactId>
191 <id>copy-resources</id>
192 <!-- here the phase you need -->
193 <phase>prepare-package</phase>
195 <goal>copy-resources</goal>
198 <outputDirectory>${basedir}/target/assembly</outputDirectory>
201 <directory>src/main/assembly</directory>
204 <overwrite>true</overwrite>
210 <groupId>org.apache.karaf.tooling</groupId>
211 <artifactId>karaf-maven-plugin</artifactId>
212 <version>${karaf.maven.version}</version>
213 <extensions>true</extensions>
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
219 <feature>eventadmin</feature>
222 <feature>standard</feature>
223 <feature>${karaf.localFeature}</feature>
225 <!-- no installedFeatures -->
229 <id>populate-system</id>
230 <phase>generate-resources</phase>
232 <goal>features-add-to-repository</goal>
236 <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
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>
247 <repository>target/assembly/system</repository>
251 <id>process-resources</id>
253 <goal>install-kars</goal>
255 <phase>process-resources</phase>
260 <goal>instance-create-archive</goal>
266 <groupId>org.apache.maven.plugins</groupId>
267 <artifactId>maven-checkstyle-plugin</artifactId>
268 <version>${checkstyle.version}</version>
270 <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
274 <groupId>org.apache.maven.plugins</groupId>
275 <artifactId>maven-dependency-plugin</artifactId>
282 <!-- here the phase you need -->
283 <phase>generate-resources</phase>
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>
297 <id>unpack-karaf-resources</id>
299 <goal>unpack-dependencies</goal>
301 <phase>prepare-package</phase>
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>
312 <id>org.ops4j.pax.url.mvn.cfg</id>
316 <phase>prepare-package</phase>
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>
329 <overWriteReleases>true</overWriteReleases>
330 <overWriteSnapshots>true</overWriteSnapshots>
334 <id>copy-dependencies</id>
335 <phase>prepare-package</phase>
337 <goal>copy-dependencies</goal>
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>
353 <groupId>org.apache.maven.plugins</groupId>
354 <artifactId>maven-antrun-plugin</artifactId>
357 <phase>prepare-package</phase>
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"/>
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"/>
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"/>
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"/>
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"/>
393 <delete file="${project.build.directory}/assembly/lib/endorsed/org.apache.servicemix.bundles.xalan-2.7.2_2.jar" />
404 <groupId>org.apache.maven.plugins</groupId>
405 <artifactId>maven-enforcer-plugin</artifactId>
406 <version>${enforcer.version}</version>
409 <id>enforce-maven</id>
415 <requireMavenVersion>
416 <version>3.1.1</version>
417 </requireMavenVersion>
424 <artifactId>maven-resources-plugin</artifactId>
427 <groupId>org.apache.karaf.tooling</groupId>
428 <artifactId>karaf-maven-plugin</artifactId>
431 <groupId>org.apache.maven.plugins</groupId>
432 <artifactId>maven-checkstyle-plugin</artifactId>
435 <groupId>org.apache.maven.plugins</groupId>
436 <artifactId>maven-dependency-plugin</artifactId>
439 <groupId>org.apache.maven.plugins</groupId>
440 <artifactId>maven-antrun-plugin</artifactId>