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>
28 <dependencyManagement>
31 <!-- scope is compile so all features (there is only one) are installed
32 into startup.properties and the feature repo itself is not installed -->
33 <groupId>org.apache.karaf.features</groupId>
34 <artifactId>framework</artifactId>
35 <version>${karaf.version}</version>
39 <groupId>org.osgi</groupId>
40 <artifactId>org.osgi.core</artifactId>
43 <groupId>org.apache.sshd</groupId>
44 <artifactId>sshd-core</artifactId>
49 </dependencyManagement>
51 <!-- karaf standard features -->
53 <groupId>org.apache.karaf.features</groupId>
54 <artifactId>standard</artifactId>
55 <version>${karaf.version}</version>
57 <classifier>features</classifier>
58 <scope>runtime</scope>
62 <groupId>org.opendaylight.controller</groupId>
63 <artifactId>karaf.branding</artifactId>
64 <version>${branding.version}</version>
65 <scope>compile</scope>
68 <!-- Resources needed -->
70 <groupId>org.opendaylight.controller</groupId>
71 <artifactId>opendaylight-karaf-resources</artifactId>
72 <version>${karaf.resources.version}</version>
79 <groupId>org.eclipse.m2e</groupId>
80 <artifactId>lifecycle-mapping</artifactId>
81 <version>1.0.0</version>
83 <lifecycleMappingMetadata>
86 <pluginExecutionFilter>
87 <groupId>org.apache.felix</groupId>
88 <artifactId>maven-bundle-plugin</artifactId>
89 <versionRange>[0,)</versionRange>
91 <goal>cleanVersions</goal>
93 </pluginExecutionFilter>
99 <pluginExecutionFilter>
100 <groupId>org.apache.maven.plugins</groupId>
101 <artifactId>maven-dependency-plugin</artifactId>
102 <versionRange>[0,)</versionRange>
107 </pluginExecutionFilter>
113 <pluginExecutionFilter>
114 <groupId>org.apache.karaf.tooling</groupId>
115 <artifactId>karaf-maven-plugin</artifactId>
116 <versionRange>[0,)</versionRange>
118 <goal>commands-generate-help</goal>
119 <goal>features-add-to-repository</goal>
120 <goal>install-kars</goal>
122 </pluginExecutionFilter>
128 <pluginExecutionFilter>
129 <groupId>org.fusesource.scalate</groupId>
130 <artifactId>maven-scalate-plugin</artifactId>
131 <versionRange>[0,)</versionRange>
135 </pluginExecutionFilter>
141 <pluginExecutionFilter>
142 <groupId>org.apache.servicemix.tooling</groupId>
143 <artifactId>depends-maven-plugin</artifactId>
144 <versionRange>[0,)</versionRange>
146 <goal>generate-depends-file</goal>
148 </pluginExecutionFilter>
154 </lifecycleMappingMetadata>
159 <artifactId>maven-resources-plugin</artifactId>
162 <id>copy-resources</id>
163 <!-- here the phase you need -->
164 <phase>prepare-package</phase>
166 <goal>copy-resources</goal>
169 <outputDirectory>${basedir}/target/assembly</outputDirectory>
172 <directory>src/main/assembly</directory>
175 <overwrite>true</overwrite>
181 <groupId>org.apache.karaf.tooling</groupId>
182 <artifactId>karaf-maven-plugin</artifactId>
183 <version>${karaf.version}</version>
184 <extensions>true</extensions>
186 <!-- no startupFeatures -->
188 <feature>standard</feature>
189 <feature>${karaf.localFeature}</feature>
191 <!-- no installedFeatures -->
195 <id>populate-system</id>
196 <phase>generate-resources</phase>
198 <goal>features-add-to-repository</goal>
202 <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
205 <feature>standard</feature>
206 <feature>config</feature>
207 <feature>package</feature>
208 <feature>kar</feature>
209 <feature>ssh</feature>
210 <feature>management</feature>
211 <feature>war</feature>
213 <repository>target/assembly/system</repository>
217 <id>process-resources</id>
219 <goal>install-kars</goal>
221 <phase>process-resources</phase>
226 <goal>instance-create-archive</goal>
232 <groupId>org.apache.maven.plugins</groupId>
233 <artifactId>maven-checkstyle-plugin</artifactId>
234 <version>${checkstyle.version}</version>
236 <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
240 <groupId>org.apache.maven.plugins</groupId>
241 <artifactId>maven-dependency-plugin</artifactId>
248 <!-- here the phase you need -->
249 <phase>generate-resources</phase>
253 <groupId>org.opendaylight.controller</groupId>
254 <artifactId>karaf.branding</artifactId>
255 <version>${karaf.branding.version}</version>
256 <outputDirectory>target/assembly/lib</outputDirectory>
257 <destFileName>karaf.branding-${branding.version}.jar</destFileName>
263 <id>unpack-karaf-resources</id>
265 <goal>unpack-dependencies</goal>
267 <phase>prepare-package</phase>
269 <outputDirectory>${project.build.directory}/assembly</outputDirectory>
270 <groupId>org.opendaylight.controller</groupId>
271 <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
272 <excludes>META-INF\/**</excludes>
273 <excludeTransitive>true</excludeTransitive>
274 <ignorePermissions>false</ignorePermissions>
278 <id>org.ops4j.pax.url.mvn.cfg</id>
282 <phase>prepare-package</phase>
286 <groupId>org.opendaylight.controller</groupId>
287 <artifactId>opendaylight-karaf-resources</artifactId>
288 <type>properties</type>
289 <classifier>config</classifier>
290 <overWrite>true</overWrite>
291 <outputDirectory>${project.build.directory}/assembly/etc/</outputDirectory>
292 <destFileName>org.ops4j.pax.url.mvn.cfg</destFileName>
295 <overWriteReleases>true</overWriteReleases>
296 <overWriteSnapshots>true</overWriteSnapshots>
300 <id>copy-dependencies</id>
301 <phase>prepare-package</phase>
303 <goal>copy-dependencies</goal>
306 <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
307 <excludeArtifactIds>distribution.vtn-coordinator</excludeArtifactIds>
308 <overWriteReleases>false</overWriteReleases>
309 <overWriteSnapshots>true</overWriteSnapshots>
310 <overWriteIfNewer>true</overWriteIfNewer>
311 <useRepositoryLayout>true</useRepositoryLayout>
312 <addParentPoms>true</addParentPoms>
313 <copyPom>true</copyPom>
319 <groupId>org.apache.maven.plugins</groupId>
320 <artifactId>maven-antrun-plugin</artifactId>
323 <phase>prepare-package</phase>
330 <fileset dir="${project.build.directory}/assembly/bin">
331 <include name="karaf"/>
332 <include name="instance"/>
333 <include name="start"/>
334 <include name="stop"/>
335 <include name="status"/>
336 <include name="client"/>
337 <include name="shell"/>
349 <groupId>org.apache.maven.plugins</groupId>
350 <artifactId>maven-enforcer-plugin</artifactId>
351 <version>${enforcer.version}</version>
354 <id>enforce-maven</id>
360 <requireMavenVersion>
361 <version>3.1.1</version>
362 </requireMavenVersion>
369 <artifactId>maven-resources-plugin</artifactId>
372 <groupId>org.apache.karaf.tooling</groupId>
373 <artifactId>karaf-maven-plugin</artifactId>
376 <groupId>org.apache.maven.plugins</groupId>
377 <artifactId>maven-checkstyle-plugin</artifactId>
380 <groupId>org.apache.maven.plugins</groupId>
381 <artifactId>maven-dependency-plugin</artifactId>
384 <groupId>org.apache.maven.plugins</groupId>
385 <artifactId>maven-antrun-plugin</artifactId>