Merge "Unit Test for md-sal netconf northbound mapping. Tests mapping of netconf...
[controller.git] / karaf / karaf-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
4
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
8 -->
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">
11   <parent>
12     <groupId>org.opendaylight.odlparent</groupId>
13     <artifactId>odlparent</artifactId>
14     <version>1.5.0-SNAPSHOT</version>
15     <relativePath/>
16   </parent>
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>
22
23   <properties>
24     <branding.version>1.1.0-SNAPSHOT</branding.version>
25     <karaf.resources.version>1.5.0-SNAPSHOT</karaf.resources.version>
26   </properties>
27   <dependencyManagement>
28     <dependencies>
29       <dependency>
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>
35         <type>kar</type>
36         <exclusions>
37           <exclusion>
38             <groupId>org.osgi</groupId>
39             <artifactId>org.osgi.core</artifactId>
40           </exclusion>
41           <exclusion>
42             <groupId>org.apache.sshd</groupId>
43             <artifactId>sshd-core</artifactId>
44           </exclusion>
45         </exclusions>
46       </dependency>
47     </dependencies>
48   </dependencyManagement>
49   <dependencies>
50     <!-- ODL Branding -->
51     <dependency>
52       <groupId>org.opendaylight.controller</groupId>
53       <artifactId>karaf.branding</artifactId>
54       <version>${branding.version}</version>
55       <scope>compile</scope>
56     </dependency>
57
58     <!-- Resources needed -->
59     <dependency>
60       <groupId>org.opendaylight.controller</groupId>
61       <artifactId>opendaylight-karaf-resources</artifactId>
62       <version>${karaf.resources.version}</version>
63     </dependency>
64   </dependencies>
65   <build>
66     <pluginManagement>
67       <plugins>
68         <plugin>
69           <groupId>org.eclipse.m2e</groupId>
70           <artifactId>lifecycle-mapping</artifactId>
71           <version>1.0.0</version>
72           <configuration>
73             <lifecycleMappingMetadata>
74               <pluginExecutions>
75                 <pluginExecution>
76                   <pluginExecutionFilter>
77                     <groupId>org.apache.felix</groupId>
78                     <artifactId>maven-bundle-plugin</artifactId>
79                     <versionRange>[0,)</versionRange>
80                     <goals>
81                       <goal>cleanVersions</goal>
82                     </goals>
83                   </pluginExecutionFilter>
84                   <action>
85                     <ignore></ignore>
86                   </action>
87                 </pluginExecution>
88                 <pluginExecution>
89                   <pluginExecutionFilter>
90                     <groupId>org.apache.maven.plugins</groupId>
91                     <artifactId>maven-dependency-plugin</artifactId>
92                     <versionRange>[0,)</versionRange>
93                     <goals>
94                       <goal>copy</goal>
95                       <goal>unpack</goal>
96                     </goals>
97                   </pluginExecutionFilter>
98                   <action>
99                     <ignore></ignore>
100                   </action>
101                 </pluginExecution>
102                 <pluginExecution>
103                   <pluginExecutionFilter>
104                     <groupId>org.apache.karaf.tooling</groupId>
105                     <artifactId>karaf-maven-plugin</artifactId>
106                     <versionRange>[0,)</versionRange>
107                     <goals>
108                       <goal>commands-generate-help</goal>
109                       <goal>features-add-to-repository</goal>
110                       <goal>install-kars</goal>
111                     </goals>
112                   </pluginExecutionFilter>
113                   <action>
114                     <ignore></ignore>
115                   </action>
116                 </pluginExecution>
117                 <pluginExecution>
118                   <pluginExecutionFilter>
119                     <groupId>org.fusesource.scalate</groupId>
120                     <artifactId>maven-scalate-plugin</artifactId>
121                     <versionRange>[0,)</versionRange>
122                     <goals>
123                       <goal>sitegen</goal>
124                     </goals>
125                   </pluginExecutionFilter>
126                   <action>
127                     <ignore></ignore>
128                   </action>
129                 </pluginExecution>
130                 <pluginExecution>
131                   <pluginExecutionFilter>
132                     <groupId>org.apache.servicemix.tooling</groupId>
133                     <artifactId>depends-maven-plugin</artifactId>
134                     <versionRange>[0,)</versionRange>
135                     <goals>
136                       <goal>generate-depends-file</goal>
137                     </goals>
138                   </pluginExecutionFilter>
139                   <action>
140                     <ignore></ignore>
141                   </action>
142                 </pluginExecution>
143               </pluginExecutions>
144             </lifecycleMappingMetadata>
145           </configuration>
146         </plugin>
147
148         <plugin>
149           <artifactId>maven-resources-plugin</artifactId>
150           <executions>
151             <execution>
152               <id>copy-resources</id>
153               <!-- here the phase you need -->
154               <phase>prepare-package</phase>
155               <goals>
156                 <goal>copy-resources</goal>
157               </goals>
158               <configuration>
159                 <outputDirectory>${basedir}/target/assembly</outputDirectory>
160                 <resources>
161                   <resource>
162                     <directory>src/main/assembly</directory>
163                   </resource>
164                 </resources>
165                 <overwrite>true</overwrite>
166               </configuration>
167             </execution>
168           </executions>
169         </plugin>
170         <plugin>
171           <groupId>org.apache.karaf.tooling</groupId>
172           <artifactId>karaf-maven-plugin</artifactId>
173           <version>${karaf.version}</version>
174           <extensions>true</extensions>
175           <configuration>
176             <!-- no startupFeatures -->
177             <bootFeatures>
178               <feature>standard</feature>
179               <feature>${karaf.localFeature}</feature>
180             </bootFeatures>
181             <!-- no installedFeatures -->
182           </configuration>
183           <executions>
184             <execution>
185               <id>populate-system</id>
186               <phase>generate-resources</phase>
187               <goals>
188                 <goal>features-add-to-repository</goal>
189               </goals>
190               <configuration>
191                 <descriptors>
192                   <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
193                 </descriptors>
194                 <features>
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>
202                 </features>
203                 <repository>target/assembly/system</repository>
204               </configuration>
205             </execution>
206             <execution>
207               <id>process-resources</id>
208               <goals>
209                 <goal>install-kars</goal>
210               </goals>
211               <phase>process-resources</phase>
212             </execution>
213             <execution>
214               <id>package</id>
215               <goals>
216                 <goal>instance-create-archive</goal>
217               </goals>
218             </execution>
219           </executions>
220         </plugin>
221         <plugin>
222           <groupId>org.apache.maven.plugins</groupId>
223           <artifactId>maven-checkstyle-plugin</artifactId>
224           <version>${checkstyle.version}</version>
225           <configuration>
226             <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
227           </configuration>
228         </plugin>
229         <plugin>
230           <groupId>org.apache.maven.plugins</groupId>
231           <artifactId>maven-dependency-plugin</artifactId>
232           <executions>
233             <execution>
234               <id>copy</id>
235               <goals>
236                 <goal>copy</goal>
237               </goals>
238               <!-- here the phase you need -->
239               <phase>generate-resources</phase>
240               <configuration>
241                 <artifactItems>
242                   <artifactItem>
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>
248                   </artifactItem>
249                 </artifactItems>
250               </configuration>
251             </execution>
252             <execution>
253               <id>unpack-karaf-resources</id>
254               <goals>
255                 <goal>unpack-dependencies</goal>
256               </goals>
257               <phase>prepare-package</phase>
258               <configuration>
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>
265               </configuration>
266             </execution>
267             <execution>
268               <id>org.ops4j.pax.url.mvn.cfg</id>
269               <goals>
270                 <goal>copy</goal>
271               </goals>
272               <phase>prepare-package</phase>
273               <configuration>
274                 <artifactItems>
275                   <artifactItem>
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>
283                   </artifactItem>
284                 </artifactItems>
285                 <overWriteReleases>true</overWriteReleases>
286                 <overWriteSnapshots>true</overWriteSnapshots>
287               </configuration>
288             </execution>
289             <execution>
290               <id>copy-dependencies</id>
291               <phase>prepare-package</phase>
292               <goals>
293                 <goal>copy-dependencies</goal>
294               </goals>
295               <configuration>
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>
304               </configuration>
305             </execution>
306           </executions>
307         </plugin>
308         <plugin>
309           <groupId>org.apache.maven.plugins</groupId>
310           <artifactId>maven-antrun-plugin</artifactId>
311           <executions>
312             <execution>
313               <phase>prepare-package</phase>
314               <goals>
315                 <goal>run</goal>
316               </goals>
317               <configuration>
318                 <tasks>
319                   <chmod perm="755">
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"/>
328                     </fileset>
329                   </chmod>
330                 </tasks>
331               </configuration>
332             </execution>
333           </executions>
334         </plugin>
335       </plugins>
336     </pluginManagement>
337     <plugins>
338       <plugin>
339         <groupId>org.apache.maven.plugins</groupId>
340         <artifactId>maven-enforcer-plugin</artifactId>
341         <version>${enforcer.version}</version>
342         <executions>
343           <execution>
344             <id>enforce-maven</id>
345             <goals>
346               <goal>enforce</goal>
347             </goals>
348             <configuration>
349               <rules>
350                 <requireMavenVersion>
351                   <version>3.1.1</version>
352                 </requireMavenVersion>
353               </rules>
354             </configuration>
355           </execution>
356         </executions>
357       </plugin>
358       <plugin>
359         <artifactId>maven-resources-plugin</artifactId>
360       </plugin>
361       <plugin>
362         <groupId>org.apache.karaf.tooling</groupId>
363         <artifactId>karaf-maven-plugin</artifactId>
364       </plugin>
365       <plugin>
366         <groupId>org.apache.maven.plugins</groupId>
367         <artifactId>maven-checkstyle-plugin</artifactId>
368       </plugin>
369       <plugin>
370         <groupId>org.apache.maven.plugins</groupId>
371         <artifactId>maven-dependency-plugin</artifactId>
372       </plugin>
373       <plugin>
374         <groupId>org.apache.maven.plugins</groupId>
375         <artifactId>maven-antrun-plugin</artifactId>
376       </plugin>
377     </plugins>
378   </build>
379
380 </project>