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.5.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.1.0-SNAPSHOT</branding.version>
25 <karaf.resources.version>1.5.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>
55 </dependencyManagement>
57 <!-- karaf standard features -->
59 <groupId>org.apache.karaf.features</groupId>
60 <artifactId>standard</artifactId>
61 <version>${karaf.version}</version>
63 <classifier>features</classifier>
64 <scope>runtime</scope>
68 <groupId>org.opendaylight.controller</groupId>
69 <artifactId>karaf.branding</artifactId>
70 <version>${branding.version}</version>
71 <scope>compile</scope>
74 <!-- Resources needed -->
76 <groupId>org.opendaylight.controller</groupId>
77 <artifactId>opendaylight-karaf-resources</artifactId>
78 <version>${karaf.resources.version}</version>
85 <groupId>org.eclipse.m2e</groupId>
86 <artifactId>lifecycle-mapping</artifactId>
87 <version>1.0.0</version>
89 <lifecycleMappingMetadata>
92 <pluginExecutionFilter>
93 <groupId>org.apache.felix</groupId>
94 <artifactId>maven-bundle-plugin</artifactId>
95 <versionRange>[0,)</versionRange>
97 <goal>cleanVersions</goal>
99 </pluginExecutionFilter>
105 <pluginExecutionFilter>
106 <groupId>org.apache.maven.plugins</groupId>
107 <artifactId>maven-dependency-plugin</artifactId>
108 <versionRange>[0,)</versionRange>
113 </pluginExecutionFilter>
119 <pluginExecutionFilter>
120 <groupId>org.apache.karaf.tooling</groupId>
121 <artifactId>karaf-maven-plugin</artifactId>
122 <versionRange>[0,)</versionRange>
124 <goal>commands-generate-help</goal>
125 <goal>features-add-to-repository</goal>
126 <goal>install-kars</goal>
128 </pluginExecutionFilter>
134 <pluginExecutionFilter>
135 <groupId>org.fusesource.scalate</groupId>
136 <artifactId>maven-scalate-plugin</artifactId>
137 <versionRange>[0,)</versionRange>
141 </pluginExecutionFilter>
147 <pluginExecutionFilter>
148 <groupId>org.apache.servicemix.tooling</groupId>
149 <artifactId>depends-maven-plugin</artifactId>
150 <versionRange>[0,)</versionRange>
152 <goal>generate-depends-file</goal>
154 </pluginExecutionFilter>
160 </lifecycleMappingMetadata>
165 <artifactId>maven-resources-plugin</artifactId>
168 <id>copy-resources</id>
169 <!-- here the phase you need -->
170 <phase>prepare-package</phase>
172 <goal>copy-resources</goal>
175 <outputDirectory>${basedir}/target/assembly</outputDirectory>
178 <directory>src/main/assembly</directory>
181 <overwrite>true</overwrite>
187 <groupId>org.apache.karaf.tooling</groupId>
188 <artifactId>karaf-maven-plugin</artifactId>
189 <version>${karaf.maven.version}</version>
190 <extensions>true</extensions>
192 <!-- no startupFeatures -->
194 <feature>standard</feature>
195 <feature>${karaf.localFeature}</feature>
197 <!-- no installedFeatures -->
201 <id>populate-system</id>
202 <phase>generate-resources</phase>
204 <goal>features-add-to-repository</goal>
208 <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
211 <feature>standard</feature>
212 <feature>config</feature>
213 <feature>package</feature>
214 <feature>kar</feature>
215 <feature>ssh</feature>
216 <feature>management</feature>
217 <feature>war</feature>
219 <repository>target/assembly/system</repository>
223 <id>process-resources</id>
225 <goal>install-kars</goal>
227 <phase>process-resources</phase>
232 <goal>instance-create-archive</goal>
238 <groupId>org.apache.maven.plugins</groupId>
239 <artifactId>maven-checkstyle-plugin</artifactId>
240 <version>${checkstyle.version}</version>
242 <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
246 <groupId>org.apache.maven.plugins</groupId>
247 <artifactId>maven-dependency-plugin</artifactId>
254 <!-- here the phase you need -->
255 <phase>generate-resources</phase>
259 <groupId>org.opendaylight.controller</groupId>
260 <artifactId>karaf.branding</artifactId>
261 <version>${karaf.branding.version}</version>
262 <outputDirectory>target/assembly/lib</outputDirectory>
263 <destFileName>karaf.branding-${branding.version}.jar</destFileName>
269 <id>unpack-karaf-resources</id>
271 <goal>unpack-dependencies</goal>
273 <phase>prepare-package</phase>
275 <outputDirectory>${project.build.directory}/assembly</outputDirectory>
276 <groupId>org.opendaylight.controller</groupId>
277 <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
278 <excludes>META-INF\/**</excludes>
279 <excludeTransitive>true</excludeTransitive>
280 <ignorePermissions>false</ignorePermissions>
284 <id>org.ops4j.pax.url.mvn.cfg</id>
288 <phase>prepare-package</phase>
292 <groupId>org.opendaylight.controller</groupId>
293 <artifactId>opendaylight-karaf-resources</artifactId>
294 <type>properties</type>
295 <classifier>config</classifier>
296 <overWrite>true</overWrite>
297 <outputDirectory>${project.build.directory}/assembly/etc/</outputDirectory>
298 <destFileName>org.ops4j.pax.url.mvn.cfg</destFileName>
301 <overWriteReleases>true</overWriteReleases>
302 <overWriteSnapshots>true</overWriteSnapshots>
306 <id>copy-dependencies</id>
307 <phase>prepare-package</phase>
309 <goal>copy-dependencies</goal>
312 <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
313 <excludeArtifactIds>distribution.vtn-coordinator</excludeArtifactIds>
314 <overWriteReleases>false</overWriteReleases>
315 <overWriteSnapshots>true</overWriteSnapshots>
316 <overWriteIfNewer>true</overWriteIfNewer>
317 <useRepositoryLayout>true</useRepositoryLayout>
318 <addParentPoms>true</addParentPoms>
319 <copyPom>true</copyPom>
325 <groupId>org.apache.maven.plugins</groupId>
326 <artifactId>maven-antrun-plugin</artifactId>
329 <phase>prepare-package</phase>
336 <fileset dir="${project.build.directory}/assembly/bin">
337 <include name="karaf"/>
338 <include name="instance"/>
339 <include name="start"/>
340 <include name="stop"/>
341 <include name="status"/>
342 <include name="client"/>
343 <include name="shell"/>
355 <groupId>org.apache.maven.plugins</groupId>
356 <artifactId>maven-enforcer-plugin</artifactId>
357 <version>${enforcer.version}</version>
360 <id>enforce-maven</id>
366 <requireMavenVersion>
367 <version>3.1.1</version>
368 </requireMavenVersion>
375 <artifactId>maven-resources-plugin</artifactId>
378 <groupId>org.apache.karaf.tooling</groupId>
379 <artifactId>karaf-maven-plugin</artifactId>
382 <groupId>org.apache.maven.plugins</groupId>
383 <artifactId>maven-checkstyle-plugin</artifactId>
386 <groupId>org.apache.maven.plugins</groupId>
387 <artifactId>maven-dependency-plugin</artifactId>
390 <groupId>org.apache.maven.plugins</groupId>
391 <artifactId>maven-antrun-plugin</artifactId>