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>
26 <branding.version>1.1.0-SNAPSHOT</branding.version>
27 <karaf.resources.version>1.5.0-SNAPSHOT</karaf.resources.version>
29 <dependencyManagement>
32 <!-- scope is compile so all features (there is only one) are installed
33 into startup.properties and the feature repo itself is not installed -->
34 <groupId>org.apache.karaf.features</groupId>
35 <artifactId>framework</artifactId>
36 <version>${karaf.version}</version>
40 <groupId>org.osgi</groupId>
41 <artifactId>org.osgi.core</artifactId>
44 <groupId>org.apache.sshd</groupId>
45 <artifactId>sshd-core</artifactId>
50 </dependencyManagement>
54 <groupId>org.opendaylight.controller</groupId>
55 <artifactId>karaf.branding</artifactId>
56 <version>${branding.version}</version>
57 <scope>compile</scope>
60 <!-- Resources needed -->
62 <groupId>org.opendaylight.controller</groupId>
63 <artifactId>opendaylight-karaf-resources</artifactId>
64 <version>${karaf.resources.version}</version>
71 <groupId>org.eclipse.m2e</groupId>
72 <artifactId>lifecycle-mapping</artifactId>
73 <version>1.0.0</version>
75 <lifecycleMappingMetadata>
78 <pluginExecutionFilter>
79 <groupId>org.apache.felix</groupId>
80 <artifactId>maven-bundle-plugin</artifactId>
81 <versionRange>[0,)</versionRange>
83 <goal>cleanVersions</goal>
85 </pluginExecutionFilter>
91 <pluginExecutionFilter>
92 <groupId>org.apache.maven.plugins</groupId>
93 <artifactId>maven-dependency-plugin</artifactId>
94 <versionRange>[0,)</versionRange>
99 </pluginExecutionFilter>
105 <pluginExecutionFilter>
106 <groupId>org.apache.karaf.tooling</groupId>
107 <artifactId>karaf-maven-plugin</artifactId>
108 <versionRange>[0,)</versionRange>
110 <goal>commands-generate-help</goal>
111 <goal>features-add-to-repository</goal>
112 <goal>install-kars</goal>
114 </pluginExecutionFilter>
120 <pluginExecutionFilter>
121 <groupId>org.fusesource.scalate</groupId>
122 <artifactId>maven-scalate-plugin</artifactId>
123 <versionRange>[0,)</versionRange>
127 </pluginExecutionFilter>
133 <pluginExecutionFilter>
134 <groupId>org.apache.servicemix.tooling</groupId>
135 <artifactId>depends-maven-plugin</artifactId>
136 <versionRange>[0,)</versionRange>
138 <goal>generate-depends-file</goal>
140 </pluginExecutionFilter>
146 </lifecycleMappingMetadata>
151 <artifactId>maven-resources-plugin</artifactId>
154 <id>copy-resources</id>
155 <!-- here the phase you need -->
156 <phase>prepare-package</phase>
158 <goal>copy-resources</goal>
161 <outputDirectory>${basedir}/target/assembly</outputDirectory>
164 <directory>src/main/assembly</directory>
167 <overwrite>true</overwrite>
173 <groupId>org.apache.karaf.tooling</groupId>
174 <artifactId>karaf-maven-plugin</artifactId>
175 <version>${karaf.version}</version>
176 <extensions>true</extensions>
178 <!-- no startupFeatures -->
180 <feature>standard</feature>
182 <!-- no installedFeatures -->
186 <id>populate-system</id>
187 <phase>generate-resources</phase>
189 <goal>features-add-to-repository</goal>
193 <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
196 <feature>standard</feature>
197 <feature>config</feature>
198 <feature>package</feature>
199 <feature>kar</feature>
200 <feature>ssh</feature>
201 <feature>management</feature>
202 <feature>war</feature>
204 <repository>target/assembly/system</repository>
208 <id>process-resources</id>
210 <goal>install-kars</goal>
212 <phase>process-resources</phase>
217 <goal>instance-create-archive</goal>
223 <groupId>org.apache.maven.plugins</groupId>
224 <artifactId>maven-checkstyle-plugin</artifactId>
225 <version>${checkstyle.version}</version>
227 <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
231 <groupId>org.apache.maven.plugins</groupId>
232 <artifactId>maven-dependency-plugin</artifactId>
239 <!-- here the phase you need -->
240 <phase>generate-resources</phase>
244 <groupId>org.opendaylight.controller</groupId>
245 <artifactId>karaf.branding</artifactId>
246 <version>${karaf.branding.version}</version>
247 <outputDirectory>target/assembly/lib</outputDirectory>
248 <destFileName>karaf.branding-${branding.version}.jar</destFileName>
254 <id>unpack-karaf-resources</id>
256 <goal>unpack-dependencies</goal>
258 <phase>prepare-package</phase>
260 <outputDirectory>${project.build.directory}/assembly</outputDirectory>
261 <groupId>org.opendaylight.controller</groupId>
262 <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
263 <excludes>META-INF\/**</excludes>
264 <excludeTransitive>true</excludeTransitive>
265 <ignorePermissions>false</ignorePermissions>
269 <id>org.ops4j.pax.url.mvn.cfg</id>
273 <phase>prepare-package</phase>
277 <groupId>org.opendaylight.controller</groupId>
278 <artifactId>opendaylight-karaf-resources</artifactId>
279 <type>properties</type>
280 <classifier>config</classifier>
281 <overWrite>true</overWrite>
282 <outputDirectory>${project.build.directory}/assembly/etc/</outputDirectory>
283 <destFileName>org.ops4j.pax.url.mvn.cfg</destFileName>
286 <overWriteReleases>true</overWriteReleases>
287 <overWriteSnapshots>true</overWriteSnapshots>
293 <groupId>org.apache.maven.plugins</groupId>
294 <artifactId>maven-antrun-plugin</artifactId>
297 <phase>prepare-package</phase>
304 <fileset dir="${project.build.directory}/assembly/bin">
305 <include name="karaf"/>
306 <include name="instance"/>
307 <include name="start"/>
308 <include name="stop"/>
309 <include name="status"/>
310 <include name="client"/>
311 <include name="shell"/>
323 <artifactId>maven-resources-plugin</artifactId>
326 <groupId>org.apache.karaf.tooling</groupId>
327 <artifactId>karaf-maven-plugin</artifactId>
330 <groupId>org.apache.maven.plugins</groupId>
331 <artifactId>maven-checkstyle-plugin</artifactId>
334 <groupId>org.apache.maven.plugins</groupId>
335 <artifactId>maven-dependency-plugin</artifactId>
338 <groupId>org.apache.maven.plugins</groupId>
339 <artifactId>maven-antrun-plugin</artifactId>