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>
181 <feature>${karaf.localFeature}</feature>
183 <!-- no installedFeatures -->
187 <id>populate-system</id>
188 <phase>generate-resources</phase>
190 <goal>features-add-to-repository</goal>
194 <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
197 <feature>standard</feature>
198 <feature>config</feature>
199 <feature>package</feature>
200 <feature>kar</feature>
201 <feature>ssh</feature>
202 <feature>management</feature>
203 <feature>war</feature>
205 <repository>target/assembly/system</repository>
209 <id>process-resources</id>
211 <goal>install-kars</goal>
213 <phase>process-resources</phase>
218 <goal>instance-create-archive</goal>
224 <groupId>org.apache.maven.plugins</groupId>
225 <artifactId>maven-checkstyle-plugin</artifactId>
226 <version>${checkstyle.version}</version>
228 <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
232 <groupId>org.apache.maven.plugins</groupId>
233 <artifactId>maven-dependency-plugin</artifactId>
240 <!-- here the phase you need -->
241 <phase>generate-resources</phase>
245 <groupId>org.opendaylight.controller</groupId>
246 <artifactId>karaf.branding</artifactId>
247 <version>${karaf.branding.version}</version>
248 <outputDirectory>target/assembly/lib</outputDirectory>
249 <destFileName>karaf.branding-${branding.version}.jar</destFileName>
255 <id>unpack-karaf-resources</id>
257 <goal>unpack-dependencies</goal>
259 <phase>prepare-package</phase>
261 <outputDirectory>${project.build.directory}/assembly</outputDirectory>
262 <groupId>org.opendaylight.controller</groupId>
263 <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
264 <excludes>META-INF\/**</excludes>
265 <excludeTransitive>true</excludeTransitive>
266 <ignorePermissions>false</ignorePermissions>
270 <id>org.ops4j.pax.url.mvn.cfg</id>
274 <phase>prepare-package</phase>
278 <groupId>org.opendaylight.controller</groupId>
279 <artifactId>opendaylight-karaf-resources</artifactId>
280 <type>properties</type>
281 <classifier>config</classifier>
282 <overWrite>true</overWrite>
283 <outputDirectory>${project.build.directory}/assembly/etc/</outputDirectory>
284 <destFileName>org.ops4j.pax.url.mvn.cfg</destFileName>
287 <overWriteReleases>true</overWriteReleases>
288 <overWriteSnapshots>true</overWriteSnapshots>
294 <groupId>org.apache.maven.plugins</groupId>
295 <artifactId>maven-antrun-plugin</artifactId>
298 <phase>prepare-package</phase>
305 <fileset dir="${project.build.directory}/assembly/bin">
306 <include name="karaf"/>
307 <include name="instance"/>
308 <include name="start"/>
309 <include name="stop"/>
310 <include name="status"/>
311 <include name="client"/>
312 <include name="shell"/>
324 <artifactId>maven-resources-plugin</artifactId>
327 <groupId>org.apache.karaf.tooling</groupId>
328 <artifactId>karaf-maven-plugin</artifactId>
331 <groupId>org.apache.maven.plugins</groupId>
332 <artifactId>maven-checkstyle-plugin</artifactId>
335 <groupId>org.apache.maven.plugins</groupId>
336 <artifactId>maven-dependency-plugin</artifactId>
339 <groupId>org.apache.maven.plugins</groupId>
340 <artifactId>maven-antrun-plugin</artifactId>