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 -->
64 <groupId>org.apache.karaf.features</groupId>
65 <artifactId>standard</artifactId>
66 <version>${karaf.version}</version>
68 <classifier>features</classifier>
70 <!-- karaf region dependency -->
72 <groupId>org.apache.karaf.region</groupId>
73 <artifactId>org.apache.karaf.region.persist</artifactId>
74 <version>${karaf.version}</version>
75 <scope>runtime</scope>
79 <groupId>org.opendaylight.controller</groupId>
80 <artifactId>karaf.branding</artifactId>
81 <version>${branding.version}</version>
82 <scope>compile</scope>
85 <!-- Resources needed -->
87 <groupId>org.opendaylight.controller</groupId>
88 <artifactId>opendaylight-karaf-resources</artifactId>
89 <version>${karaf.resources.version}</version>
92 <!-- Aries Proxy 1.0.5 contains important bug fixes -->
93 <!-- Once we upgrade to a version of Karaf which has at least 1.0.5, this can be removed -->
95 <groupId>org.apache.aries.proxy</groupId>
96 <artifactId>org.apache.aries.proxy.impl</artifactId>
97 <version>1.0.5</version>
104 <groupId>org.eclipse.m2e</groupId>
105 <artifactId>lifecycle-mapping</artifactId>
106 <version>1.0.0</version>
108 <lifecycleMappingMetadata>
111 <pluginExecutionFilter>
112 <groupId>org.apache.felix</groupId>
113 <artifactId>maven-bundle-plugin</artifactId>
114 <versionRange>[0,)</versionRange>
116 <goal>cleanVersions</goal>
118 </pluginExecutionFilter>
124 <pluginExecutionFilter>
125 <groupId>org.apache.maven.plugins</groupId>
126 <artifactId>maven-dependency-plugin</artifactId>
127 <versionRange>[0,)</versionRange>
132 </pluginExecutionFilter>
138 <pluginExecutionFilter>
139 <groupId>org.apache.karaf.tooling</groupId>
140 <artifactId>karaf-maven-plugin</artifactId>
141 <versionRange>[0,)</versionRange>
143 <goal>commands-generate-help</goal>
144 <goal>features-add-to-repository</goal>
145 <goal>install-kars</goal>
147 </pluginExecutionFilter>
153 <pluginExecutionFilter>
154 <groupId>org.fusesource.scalate</groupId>
155 <artifactId>maven-scalate-plugin</artifactId>
156 <versionRange>[0,)</versionRange>
160 </pluginExecutionFilter>
166 <pluginExecutionFilter>
167 <groupId>org.apache.servicemix.tooling</groupId>
168 <artifactId>depends-maven-plugin</artifactId>
169 <versionRange>[0,)</versionRange>
171 <goal>generate-depends-file</goal>
173 </pluginExecutionFilter>
179 </lifecycleMappingMetadata>
184 <artifactId>maven-resources-plugin</artifactId>
187 <id>copy-resources</id>
188 <!-- here the phase you need -->
189 <phase>prepare-package</phase>
191 <goal>copy-resources</goal>
194 <outputDirectory>${basedir}/target/assembly</outputDirectory>
197 <directory>src/main/assembly</directory>
200 <overwrite>true</overwrite>
206 <groupId>org.apache.karaf.tooling</groupId>
207 <artifactId>karaf-maven-plugin</artifactId>
208 <version>${karaf.maven.version}</version>
209 <extensions>true</extensions>
211 <!-- no startupFeatures -->
213 <feature>standard</feature>
214 <feature>${karaf.localFeature}</feature>
216 <!-- no installedFeatures -->
220 <id>populate-system</id>
221 <phase>generate-resources</phase>
223 <goal>features-add-to-repository</goal>
227 <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
230 <feature>standard</feature>
231 <feature>config</feature>
232 <feature>package</feature>
233 <feature>kar</feature>
234 <feature>ssh</feature>
235 <feature>management</feature>
236 <feature>war</feature>
238 <repository>target/assembly/system</repository>
242 <id>process-resources</id>
244 <goal>install-kars</goal>
246 <phase>process-resources</phase>
251 <goal>instance-create-archive</goal>
257 <groupId>org.apache.maven.plugins</groupId>
258 <artifactId>maven-checkstyle-plugin</artifactId>
259 <version>${checkstyle.version}</version>
261 <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
265 <groupId>org.apache.maven.plugins</groupId>
266 <artifactId>maven-dependency-plugin</artifactId>
273 <!-- here the phase you need -->
274 <phase>generate-resources</phase>
278 <groupId>org.opendaylight.controller</groupId>
279 <artifactId>karaf.branding</artifactId>
280 <version>${karaf.branding.version}</version>
281 <outputDirectory>target/assembly/lib</outputDirectory>
282 <destFileName>karaf.branding-${branding.version}.jar</destFileName>
288 <id>unpack-karaf-resources</id>
290 <goal>unpack-dependencies</goal>
292 <phase>prepare-package</phase>
294 <outputDirectory>${project.build.directory}/assembly</outputDirectory>
295 <groupId>org.opendaylight.controller</groupId>
296 <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
297 <excludes>META-INF\/**</excludes>
298 <excludeTransitive>true</excludeTransitive>
299 <ignorePermissions>false</ignorePermissions>
303 <id>org.ops4j.pax.url.mvn.cfg</id>
307 <phase>prepare-package</phase>
311 <groupId>org.opendaylight.controller</groupId>
312 <artifactId>opendaylight-karaf-resources</artifactId>
313 <type>properties</type>
314 <classifier>config</classifier>
315 <overWrite>true</overWrite>
316 <outputDirectory>${project.build.directory}/assembly/etc/</outputDirectory>
317 <destFileName>org.ops4j.pax.url.mvn.cfg</destFileName>
320 <overWriteReleases>true</overWriteReleases>
321 <overWriteSnapshots>true</overWriteSnapshots>
325 <id>copy-dependencies</id>
326 <phase>prepare-package</phase>
328 <goal>copy-dependencies</goal>
331 <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
332 <excludeArtifactIds>distribution.vtn-coordinator</excludeArtifactIds>
333 <overWriteReleases>false</overWriteReleases>
334 <overWriteSnapshots>true</overWriteSnapshots>
335 <overWriteIfNewer>true</overWriteIfNewer>
336 <useRepositoryLayout>true</useRepositoryLayout>
337 <addParentPoms>true</addParentPoms>
338 <copyPom>true</copyPom>
344 <groupId>org.apache.maven.plugins</groupId>
345 <artifactId>maven-antrun-plugin</artifactId>
348 <phase>prepare-package</phase>
355 <fileset dir="${project.build.directory}/assembly/bin">
356 <include name="karaf"/>
357 <include name="instance"/>
358 <include name="start"/>
359 <include name="stop"/>
360 <include name="status"/>
361 <include name="client"/>
362 <include name="shell"/>
365 <!-- Remove this once Karaf provides a new-enough version of Aries Proxy -->
366 <replace dir="${project.build.directory}/assembly/etc" token="org.apache.aries.proxy.impl/1.0.4"
367 value="org.apache.aries.proxy.impl/1.0.5">
368 <include name="startup.properties"/>
379 <groupId>org.apache.maven.plugins</groupId>
380 <artifactId>maven-enforcer-plugin</artifactId>
381 <version>${enforcer.version}</version>
384 <id>enforce-maven</id>
390 <requireMavenVersion>
391 <version>3.1.1</version>
392 </requireMavenVersion>
399 <artifactId>maven-resources-plugin</artifactId>
402 <groupId>org.apache.karaf.tooling</groupId>
403 <artifactId>karaf-maven-plugin</artifactId>
406 <groupId>org.apache.maven.plugins</groupId>
407 <artifactId>maven-checkstyle-plugin</artifactId>
410 <groupId>org.apache.maven.plugins</groupId>
411 <artifactId>maven-dependency-plugin</artifactId>
414 <groupId>org.apache.maven.plugins</groupId>
415 <artifactId>maven-antrun-plugin</artifactId>