1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright © 2016 Red Hat, 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"
10 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
12 <modelVersion>4.0.0</modelVersion>
15 <groupId>org.opendaylight.odlparent</groupId>
16 <artifactId>odlparent</artifactId>
17 <version>1.8.0-SNAPSHOT</version>
18 <relativePath>../../odlparent</relativePath>
21 <groupId>org.opendaylight.odlparent</groupId>
22 <artifactId>karaf4-parent</artifactId>
23 <version>1.8.0-SNAPSHOT</version>
24 <packaging>pom</packaging>
25 <name>ODL :: odlparent :: ${project.artifactId}</name>
28 <!-- Projects can override this to add their own boot feature -->
29 <karaf.localFeature>standard</karaf.localFeature>
32 <dependencyManagement>
35 <groupId>org.apache.karaf.features</groupId>
36 <artifactId>framework</artifactId>
37 <version>${karaf4.version}</version>
41 <groupId>org.apache.karaf.features</groupId>
42 <artifactId>framework</artifactId>
43 <version>${karaf4.version}</version>
44 <classifier>features</classifier>
48 <groupId>org.apache.karaf.features</groupId>
49 <artifactId>standard</artifactId>
50 <version>${karaf4.version}</version>
51 <classifier>features</classifier>
55 <groupId>org.apache.karaf.features</groupId>
56 <artifactId>spring</artifactId>
57 <version>${karaf4.version}</version>
58 <classifier>features</classifier>
62 </dependencyManagement>
66 <groupId>org.apache.karaf.features</groupId>
67 <artifactId>framework</artifactId>
71 <groupId>org.apache.karaf.features</groupId>
72 <artifactId>framework</artifactId>
73 <classifier>features</classifier>
75 <scope>runtime</scope>
78 <groupId>org.apache.karaf.features</groupId>
79 <artifactId>standard</artifactId>
80 <classifier>features</classifier>
82 <scope>runtime</scope>
85 <groupId>org.apache.karaf.features</groupId>
86 <artifactId>spring</artifactId>
87 <classifier>features</classifier>
89 <scope>runtime</scope>
94 <groupId>org.opendaylight.odlparent</groupId>
95 <artifactId>karaf.branding</artifactId>
97 <!-- ODL configuration -->
99 <groupId>org.opendaylight.odlparent</groupId>
100 <artifactId>opendaylight-karaf4-resources</artifactId>
107 <groupId>org.apache.maven.plugins</groupId>
108 <artifactId>maven-resources-plugin</artifactId>
111 <id>process-resources</id>
113 <goal>resources</goal>
119 <groupId>org.apache.maven.plugins</groupId>
120 <artifactId>maven-remote-resources-plugin</artifactId>
126 <groupId>org.apache.maven.plugins</groupId>
127 <artifactId>maven-dependency-plugin</artifactId>
134 <phase>prepare-package</phase>
138 <groupId>org.opendaylight.odlparent</groupId>
139 <artifactId>karaf.branding</artifactId>
140 <version>1.8.0-SNAPSHOT</version>
141 <outputDirectory>target/assembly/lib</outputDirectory>
142 <destFileName>karaf.branding-1.8.0-SNAPSHOT.jar</destFileName>
148 <id>unpack-karaf-resources</id>
150 <goal>unpack-dependencies</goal>
152 <phase>prepare-package</phase>
154 <outputDirectory>${project.build.directory}/assembly</outputDirectory>
155 <groupId>org.opendaylight.odlparent</groupId>
156 <includeArtifactIds>opendaylight-karaf4-resources</includeArtifactIds>
157 <excludes>META-INF\/**</excludes>
158 <excludeTransitive>true</excludeTransitive>
159 <ignorePermissions>false</ignorePermissions>
163 <id>org.ops4j.pax.url.mvn.cfg</id>
167 <phase>prepare-package</phase>
171 <groupId>org.opendaylight.odlparent</groupId>
172 <artifactId>opendaylight-karaf4-resources</artifactId>
173 <type>properties</type>
174 <classifier>config</classifier>
175 <overWrite>true</overWrite>
176 <outputDirectory>${project.build.directory}/assembly/etc/</outputDirectory>
177 <destFileName>org.ops4j.pax.url.mvn.cfg</destFileName>
180 <overWriteReleases>true</overWriteReleases>
181 <overWriteSnapshots>true</overWriteSnapshots>
187 <!-- This needs to execute before patching, otherwise the feature will be left unpatched -->
189 <groupId>org.opendaylight.odlparent</groupId>
190 <artifactId>karaf4-plugin</artifactId>
191 <version>1.8.0-SNAPSHOT</version>
194 <id>populate-local-repo</id>
196 <goal>populate-local-repo</goal>
199 <localRepo>${project.build.directory}/assembly/system</localRepo>
205 <artifactId>maven-antrun-plugin</artifactId>
208 <id>patch-karaf-scripts</id>
209 <phase>prepare-package</phase>
215 <!-- Patches only work with LF line endings from ant -->
216 <fixcrlf srcdir="${project.build.directory}/assembly/bin"
217 includes="*.bat" eol="lf"/>
218 <patch patchfile="${project.build.directory}/assembly/patches/karaf-instance.patch"
219 originalfile="${project.build.directory}/assembly/bin/instance"
221 <patch patchfile="${project.build.directory}/assembly/patches/karaf-instance.bat.patch"
222 originalfile="${project.build.directory}/assembly/bin/instance.bat"
223 failonerror="true" ignorewhitespace="true"/>
224 <patch patchfile="${project.build.directory}/assembly/patches/karaf-karaf.patch"
225 originalfile="${project.build.directory}/assembly/bin/karaf"
227 <patch patchfile="${project.build.directory}/assembly/patches/karaf-karaf.bat.patch"
228 originalfile="${project.build.directory}/assembly/bin/karaf.bat"
230 <patch patchfile="${project.build.directory}/assembly/patches/karaf-setenv.patch"
231 originalfile="${project.build.directory}/assembly/bin/setenv"
233 <patch patchfile="${project.build.directory}/assembly/patches/karaf-setenv.bat.patch"
234 originalfile="${project.build.directory}/assembly/bin/setenv.bat"
236 <patch patchfile="${project.build.directory}/assembly/patches/karaf-quiesce-4.0.7.patch"
237 originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/4.0.7/standard-4.0.7-features.xml"
239 <fixcrlf srcdir="${project.build.directory}/assembly/bin"
240 includes="*.bat" eol="crlf"/>
247 <groupId>org.apache.karaf.tooling</groupId>
248 <artifactId>karaf-maven-plugin</artifactId>
249 <version>${karaf4.plugin.version}</version>
252 <id>process-resources</id>
253 <phase>process-resources</phase>
255 <goal>assembly</goal>
267 <feature>wrapper</feature>
270 <feature>standard</feature>
271 <feature>war</feature>
272 <!-- We load wrap as a workaround to handle old features without the wrap prerequisite -->
273 <!-- TODO Remove this once all the downstream features are fixed -->
274 <feature>wrap</feature>
275 <!-- Local feature if any -->
276 <feature>${karaf.localFeature}</feature>