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>
27 <dependencyManagement>
30 <!-- scope is compile so all features (there is only one) are installed
31 into startup.properties and the feature repo itself is not installed -->
32 <groupId>org.apache.karaf.features</groupId>
33 <artifactId>framework</artifactId>
34 <version>${karaf.version}</version>
38 <groupId>org.osgi</groupId>
39 <artifactId>org.osgi.core</artifactId>
42 <groupId>org.apache.sshd</groupId>
43 <artifactId>sshd-core</artifactId>
48 </dependencyManagement>
52 <groupId>org.opendaylight.controller</groupId>
53 <artifactId>karaf.branding</artifactId>
54 <version>${branding.version}</version>
55 <scope>compile</scope>
58 <!-- Resources needed -->
60 <groupId>org.opendaylight.controller</groupId>
61 <artifactId>opendaylight-karaf-resources</artifactId>
62 <version>${karaf.resources.version}</version>
69 <groupId>org.eclipse.m2e</groupId>
70 <artifactId>lifecycle-mapping</artifactId>
71 <version>1.0.0</version>
73 <lifecycleMappingMetadata>
76 <pluginExecutionFilter>
77 <groupId>org.apache.felix</groupId>
78 <artifactId>maven-bundle-plugin</artifactId>
79 <versionRange>[0,)</versionRange>
81 <goal>cleanVersions</goal>
83 </pluginExecutionFilter>
89 <pluginExecutionFilter>
90 <groupId>org.apache.maven.plugins</groupId>
91 <artifactId>maven-dependency-plugin</artifactId>
92 <versionRange>[0,)</versionRange>
97 </pluginExecutionFilter>
103 <pluginExecutionFilter>
104 <groupId>org.apache.karaf.tooling</groupId>
105 <artifactId>karaf-maven-plugin</artifactId>
106 <versionRange>[0,)</versionRange>
108 <goal>commands-generate-help</goal>
109 <goal>features-add-to-repository</goal>
110 <goal>install-kars</goal>
112 </pluginExecutionFilter>
118 <pluginExecutionFilter>
119 <groupId>org.fusesource.scalate</groupId>
120 <artifactId>maven-scalate-plugin</artifactId>
121 <versionRange>[0,)</versionRange>
125 </pluginExecutionFilter>
131 <pluginExecutionFilter>
132 <groupId>org.apache.servicemix.tooling</groupId>
133 <artifactId>depends-maven-plugin</artifactId>
134 <versionRange>[0,)</versionRange>
136 <goal>generate-depends-file</goal>
138 </pluginExecutionFilter>
144 </lifecycleMappingMetadata>
149 <artifactId>maven-resources-plugin</artifactId>
152 <id>copy-resources</id>
153 <!-- here the phase you need -->
154 <phase>prepare-package</phase>
156 <goal>copy-resources</goal>
159 <outputDirectory>${basedir}/target/assembly</outputDirectory>
162 <directory>src/main/assembly</directory>
165 <overwrite>true</overwrite>
171 <groupId>org.apache.karaf.tooling</groupId>
172 <artifactId>karaf-maven-plugin</artifactId>
173 <version>${karaf.version}</version>
174 <extensions>true</extensions>
176 <!-- no startupFeatures -->
178 <feature>standard</feature>
179 <feature>${karaf.localFeature}</feature>
181 <!-- no installedFeatures -->
185 <id>populate-system</id>
186 <phase>generate-resources</phase>
188 <goal>features-add-to-repository</goal>
192 <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
195 <feature>standard</feature>
196 <feature>config</feature>
197 <feature>package</feature>
198 <feature>kar</feature>
199 <feature>ssh</feature>
200 <feature>management</feature>
201 <feature>war</feature>
203 <repository>target/assembly/system</repository>
207 <id>process-resources</id>
209 <goal>install-kars</goal>
211 <phase>process-resources</phase>
216 <goal>instance-create-archive</goal>
222 <groupId>org.apache.maven.plugins</groupId>
223 <artifactId>maven-checkstyle-plugin</artifactId>
224 <version>${checkstyle.version}</version>
226 <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
230 <groupId>org.apache.maven.plugins</groupId>
231 <artifactId>maven-dependency-plugin</artifactId>
238 <!-- here the phase you need -->
239 <phase>generate-resources</phase>
243 <groupId>org.opendaylight.controller</groupId>
244 <artifactId>karaf.branding</artifactId>
245 <version>${karaf.branding.version}</version>
246 <outputDirectory>target/assembly/lib</outputDirectory>
247 <destFileName>karaf.branding-${branding.version}.jar</destFileName>
253 <id>unpack-karaf-resources</id>
255 <goal>unpack-dependencies</goal>
257 <phase>prepare-package</phase>
259 <outputDirectory>${project.build.directory}/assembly</outputDirectory>
260 <groupId>org.opendaylight.controller</groupId>
261 <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
262 <excludes>META-INF\/**</excludes>
263 <excludeTransitive>true</excludeTransitive>
264 <ignorePermissions>false</ignorePermissions>
268 <id>org.ops4j.pax.url.mvn.cfg</id>
272 <phase>prepare-package</phase>
276 <groupId>org.opendaylight.controller</groupId>
277 <artifactId>opendaylight-karaf-resources</artifactId>
278 <type>properties</type>
279 <classifier>config</classifier>
280 <overWrite>true</overWrite>
281 <outputDirectory>${project.build.directory}/assembly/etc/</outputDirectory>
282 <destFileName>org.ops4j.pax.url.mvn.cfg</destFileName>
285 <overWriteReleases>true</overWriteReleases>
286 <overWriteSnapshots>true</overWriteSnapshots>
290 <id>copy-dependencies</id>
291 <phase>prepare-package</phase>
293 <goal>copy-dependencies</goal>
296 <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
297 <excludeArtifactIds>distribution.vtn-coordinator</excludeArtifactIds>
298 <overWriteReleases>false</overWriteReleases>
299 <overWriteSnapshots>true</overWriteSnapshots>
300 <overWriteIfNewer>true</overWriteIfNewer>
301 <useRepositoryLayout>true</useRepositoryLayout>
302 <addParentPoms>true</addParentPoms>
303 <copyPom>true</copyPom>
309 <groupId>org.apache.maven.plugins</groupId>
310 <artifactId>maven-antrun-plugin</artifactId>
313 <phase>prepare-package</phase>
320 <fileset dir="${project.build.directory}/assembly/bin">
321 <include name="karaf"/>
322 <include name="instance"/>
323 <include name="start"/>
324 <include name="stop"/>
325 <include name="status"/>
326 <include name="client"/>
327 <include name="shell"/>
339 <groupId>org.apache.maven.plugins</groupId>
340 <artifactId>maven-enforcer-plugin</artifactId>
341 <version>${enforcer.version}</version>
344 <id>enforce-maven</id>
350 <requireMavenVersion>
351 <version>3.1.1</version>
352 </requireMavenVersion>
359 <artifactId>maven-resources-plugin</artifactId>
362 <groupId>org.apache.karaf.tooling</groupId>
363 <artifactId>karaf-maven-plugin</artifactId>
366 <groupId>org.apache.maven.plugins</groupId>
367 <artifactId>maven-checkstyle-plugin</artifactId>
370 <groupId>org.apache.maven.plugins</groupId>
371 <artifactId>maven-dependency-plugin</artifactId>
374 <groupId>org.apache.maven.plugins</groupId>
375 <artifactId>maven-antrun-plugin</artifactId>