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>
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>
66 <!-- karaf region dependency -->
68 <groupId>org.apache.karaf.region</groupId>
69 <artifactId>org.apache.karaf.region.persist</artifactId>
70 <version>${karaf.version}</version>
71 <scope>runtime</scope>
75 <groupId>org.opendaylight.controller</groupId>
76 <artifactId>karaf.branding</artifactId>
77 <version>${branding.version}</version>
78 <scope>compile</scope>
81 <!-- Resources needed -->
83 <groupId>org.opendaylight.controller</groupId>
84 <artifactId>opendaylight-karaf-resources</artifactId>
85 <version>${karaf.resources.version}</version>
92 <groupId>org.eclipse.m2e</groupId>
93 <artifactId>lifecycle-mapping</artifactId>
94 <version>1.0.0</version>
96 <lifecycleMappingMetadata>
99 <pluginExecutionFilter>
100 <groupId>org.apache.felix</groupId>
101 <artifactId>maven-bundle-plugin</artifactId>
102 <versionRange>[0,)</versionRange>
104 <goal>cleanVersions</goal>
106 </pluginExecutionFilter>
112 <pluginExecutionFilter>
113 <groupId>org.apache.maven.plugins</groupId>
114 <artifactId>maven-dependency-plugin</artifactId>
115 <versionRange>[0,)</versionRange>
120 </pluginExecutionFilter>
126 <pluginExecutionFilter>
127 <groupId>org.apache.karaf.tooling</groupId>
128 <artifactId>karaf-maven-plugin</artifactId>
129 <versionRange>[0,)</versionRange>
131 <goal>commands-generate-help</goal>
132 <goal>features-add-to-repository</goal>
133 <goal>install-kars</goal>
135 </pluginExecutionFilter>
141 <pluginExecutionFilter>
142 <groupId>org.fusesource.scalate</groupId>
143 <artifactId>maven-scalate-plugin</artifactId>
144 <versionRange>[0,)</versionRange>
148 </pluginExecutionFilter>
154 <pluginExecutionFilter>
155 <groupId>org.apache.servicemix.tooling</groupId>
156 <artifactId>depends-maven-plugin</artifactId>
157 <versionRange>[0,)</versionRange>
159 <goal>generate-depends-file</goal>
161 </pluginExecutionFilter>
167 </lifecycleMappingMetadata>
172 <artifactId>maven-resources-plugin</artifactId>
175 <id>copy-resources</id>
176 <!-- here the phase you need -->
177 <phase>prepare-package</phase>
179 <goal>copy-resources</goal>
182 <outputDirectory>${basedir}/target/assembly</outputDirectory>
185 <directory>src/main/assembly</directory>
188 <overwrite>true</overwrite>
194 <groupId>org.apache.karaf.tooling</groupId>
195 <artifactId>karaf-maven-plugin</artifactId>
196 <version>${karaf.maven.version}</version>
197 <extensions>true</extensions>
199 <!-- no startupFeatures -->
201 <feature>standard</feature>
202 <feature>${karaf.localFeature}</feature>
204 <!-- no installedFeatures -->
208 <id>populate-system</id>
209 <phase>generate-resources</phase>
211 <goal>features-add-to-repository</goal>
215 <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
218 <feature>standard</feature>
219 <feature>config</feature>
220 <feature>package</feature>
221 <feature>kar</feature>
222 <feature>ssh</feature>
223 <feature>management</feature>
224 <feature>war</feature>
226 <repository>target/assembly/system</repository>
230 <id>process-resources</id>
232 <goal>install-kars</goal>
234 <phase>process-resources</phase>
239 <goal>instance-create-archive</goal>
245 <groupId>org.apache.maven.plugins</groupId>
246 <artifactId>maven-checkstyle-plugin</artifactId>
247 <version>${checkstyle.version}</version>
249 <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
253 <groupId>org.apache.maven.plugins</groupId>
254 <artifactId>maven-dependency-plugin</artifactId>
261 <!-- here the phase you need -->
262 <phase>generate-resources</phase>
266 <groupId>org.opendaylight.controller</groupId>
267 <artifactId>karaf.branding</artifactId>
268 <version>${karaf.branding.version}</version>
269 <outputDirectory>target/assembly/lib</outputDirectory>
270 <destFileName>karaf.branding-${branding.version}.jar</destFileName>
276 <id>unpack-karaf-resources</id>
278 <goal>unpack-dependencies</goal>
280 <phase>prepare-package</phase>
282 <outputDirectory>${project.build.directory}/assembly</outputDirectory>
283 <groupId>org.opendaylight.controller</groupId>
284 <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
285 <excludes>META-INF\/**</excludes>
286 <excludeTransitive>true</excludeTransitive>
287 <ignorePermissions>false</ignorePermissions>
291 <id>org.ops4j.pax.url.mvn.cfg</id>
295 <phase>prepare-package</phase>
299 <groupId>org.opendaylight.controller</groupId>
300 <artifactId>opendaylight-karaf-resources</artifactId>
301 <type>properties</type>
302 <classifier>config</classifier>
303 <overWrite>true</overWrite>
304 <outputDirectory>${project.build.directory}/assembly/etc/</outputDirectory>
305 <destFileName>org.ops4j.pax.url.mvn.cfg</destFileName>
308 <overWriteReleases>true</overWriteReleases>
309 <overWriteSnapshots>true</overWriteSnapshots>
313 <id>copy-dependencies</id>
314 <phase>prepare-package</phase>
316 <goal>copy-dependencies</goal>
319 <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
320 <excludeArtifactIds>distribution.vtn-coordinator</excludeArtifactIds>
321 <overWriteReleases>false</overWriteReleases>
322 <overWriteSnapshots>true</overWriteSnapshots>
323 <overWriteIfNewer>true</overWriteIfNewer>
324 <useRepositoryLayout>true</useRepositoryLayout>
325 <addParentPoms>true</addParentPoms>
326 <copyPom>true</copyPom>
332 <groupId>org.apache.maven.plugins</groupId>
333 <artifactId>maven-antrun-plugin</artifactId>
336 <phase>prepare-package</phase>
343 <fileset dir="${project.build.directory}/assembly/bin">
344 <include name="karaf"/>
345 <include name="instance"/>
346 <include name="start"/>
347 <include name="stop"/>
348 <include name="status"/>
349 <include name="client"/>
350 <include name="shell"/>
362 <groupId>org.apache.maven.plugins</groupId>
363 <artifactId>maven-enforcer-plugin</artifactId>
364 <version>${enforcer.version}</version>
367 <id>enforce-maven</id>
373 <requireMavenVersion>
374 <version>3.1.1</version>
375 </requireMavenVersion>
382 <artifactId>maven-resources-plugin</artifactId>
385 <groupId>org.apache.karaf.tooling</groupId>
386 <artifactId>karaf-maven-plugin</artifactId>
389 <groupId>org.apache.maven.plugins</groupId>
390 <artifactId>maven-checkstyle-plugin</artifactId>
393 <groupId>org.apache.maven.plugins</groupId>
394 <artifactId>maven-dependency-plugin</artifactId>
397 <groupId>org.apache.maven.plugins</groupId>
398 <artifactId>maven-antrun-plugin</artifactId>