56c895411f5e7b5dfa1957d0aa57fda0de7350ff
[odlparent.git] / karaf / karaf4-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  Copyright © 2016 Red Hat, 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"
10          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
12     <modelVersion>4.0.0</modelVersion>
13
14     <parent>
15         <groupId>org.opendaylight.odlparent</groupId>
16         <artifactId>odlparent</artifactId>
17         <version>13.0.6-SNAPSHOT</version>
18         <relativePath>../../odlparent</relativePath>
19     </parent>
20
21     <groupId>org.opendaylight.odlparent</groupId>
22     <artifactId>karaf4-parent</artifactId>
23     <version>13.0.6-SNAPSHOT</version>
24     <packaging>pom</packaging>
25     <name>ODL :: odlparent :: ${project.artifactId}</name>
26
27     <properties>
28         <!-- Projects can override this to add their own boot feature -->
29         <karaf.localFeature>standard</karaf.localFeature>
30         <karaf.archiveZip>true</karaf.archiveZip>
31         <karaf.archiveTarGz>true</karaf.archiveTarGz>
32     </properties>
33
34     <dependencyManagement>
35         <dependencies>
36             <dependency>
37                 <groupId>org.apache.karaf.features</groupId>
38                 <artifactId>framework</artifactId>
39                 <version>${karaf.version}</version>
40                 <type>kar</type>
41             </dependency>
42             <dependency>
43                 <groupId>org.apache.karaf.features</groupId>
44                 <artifactId>framework</artifactId>
45                 <version>${karaf.version}</version>
46                 <classifier>features</classifier>
47                 <type>xml</type>
48             </dependency>
49             <dependency>
50                 <groupId>org.apache.karaf.features</groupId>
51                 <artifactId>standard</artifactId>
52                 <version>${karaf.version}</version>
53                 <classifier>features</classifier>
54                 <type>xml</type>
55             </dependency>
56         </dependencies>
57     </dependencyManagement>
58
59     <dependencies>
60         <dependency>
61             <groupId>org.apache.karaf.features</groupId>
62             <artifactId>framework</artifactId>
63             <type>kar</type>
64         </dependency>
65         <dependency>
66             <groupId>org.apache.karaf.features</groupId>
67             <artifactId>framework</artifactId>
68             <classifier>features</classifier>
69             <type>xml</type>
70             <scope>runtime</scope>
71         </dependency>
72         <dependency>
73             <groupId>org.apache.karaf.features</groupId>
74             <artifactId>standard</artifactId>
75             <classifier>features</classifier>
76             <type>xml</type>
77             <scope>runtime</scope>
78         </dependency>
79         <dependency>
80             <groupId>org.apache.aries.quiesce</groupId>
81             <artifactId>org.apache.aries.quiesce.api</artifactId>
82         </dependency>
83         <dependency>
84             <groupId>org.osgi</groupId>
85             <!-- for https://jira.opendaylight.org/browse/ODLPARENT-24 -->
86             <artifactId>org.osgi.service.event</artifactId>
87         </dependency>
88
89         <!-- Optional dependency of karaf.config.core -->
90         <dependency>
91             <groupId>org.apache.felix</groupId>
92             <artifactId>org.apache.felix.metatype</artifactId>
93         </dependency>
94
95         <!-- ODL Branding -->
96         <dependency>
97             <groupId>org.opendaylight.odlparent</groupId>
98             <artifactId>karaf.branding</artifactId>
99         </dependency>
100         <!-- ODL configuration -->
101         <dependency>
102             <groupId>org.opendaylight.odlparent</groupId>
103             <artifactId>opendaylight-karaf-resources</artifactId>
104         </dependency>
105
106         <!-- BouncyCastle Framework Extension Bundles -->
107         <dependency>
108             <groupId>org.opendaylight.odlparent</groupId>
109             <artifactId>bcpkix-framework-ext</artifactId>
110             <scope>runtime</scope>
111         </dependency>
112         <dependency>
113             <groupId>org.opendaylight.odlparent</groupId>
114             <artifactId>bcprov-framework-ext</artifactId>
115             <scope>runtime</scope>
116         </dependency>
117         <dependency>
118             <groupId>org.opendaylight.odlparent</groupId>
119             <artifactId>bcutil-framework-ext</artifactId>
120             <scope>runtime</scope>
121         </dependency>
122     </dependencies>
123
124     <build>
125         <pluginManagement>
126             <plugins>
127                 <plugin>
128                     <groupId>org.opendaylight.odlparent</groupId>
129                     <artifactId>karaf-plugin</artifactId>
130                     <version>13.0.6-SNAPSHOT</version>
131                 </plugin>
132             </plugins>
133         </pluginManagement>
134
135         <plugins>
136             <plugin>
137                 <artifactId>maven-remote-resources-plugin</artifactId>
138                 <configuration>
139                     <skip>true</skip>
140                 </configuration>
141             </plugin>
142             <plugin>
143                 <groupId>org.apache.maven.plugins</groupId>
144                 <artifactId>maven-dependency-plugin</artifactId>
145                 <executions>
146                     <execution>
147                         <id>apply-branding</id>
148                         <goals>
149                             <goal>copy</goal>
150                         </goals>
151                         <phase>prepare-package</phase>
152                         <configuration>
153                             <artifactItems>
154                                 <artifactItem>
155                                     <groupId>org.opendaylight.odlparent</groupId>
156                                     <artifactId>karaf.branding</artifactId>
157                                     <version>13.0.6-SNAPSHOT</version>
158                                     <outputDirectory>target/assembly/lib</outputDirectory>
159                                     <destFileName>karaf.branding-13.0.6-SNAPSHOT.jar</destFileName>
160                                 </artifactItem>
161                             </artifactItems>
162                             <silent>true</silent>
163                         </configuration>
164                     </execution>
165                     <execution>
166                         <id>unpack-karaf-resources</id>
167                         <goals>
168                             <goal>unpack-dependencies</goal>
169                         </goals>
170                         <phase>prepare-package</phase>
171                         <configuration>
172                             <outputDirectory>${project.build.directory}/assembly</outputDirectory>
173                             <groupId>org.opendaylight.odlparent</groupId>
174                             <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
175                             <excludes>META-INF\/**</excludes>
176                             <excludeTransitive>true</excludeTransitive>
177                             <ignorePermissions>false</ignorePermissions>
178                             <silent>true</silent>
179                         </configuration>
180                     </execution>
181                     <execution>
182                         <id>org.ops4j.pax.url.mvn.cfg</id>
183                         <goals>
184                             <goal>copy</goal>
185                         </goals>
186                         <phase>prepare-package</phase>
187                         <configuration>
188                             <artifactItems>
189                                 <artifactItem>
190                                     <groupId>org.opendaylight.odlparent</groupId>
191                                     <artifactId>opendaylight-karaf-resources</artifactId>
192                                     <type>properties</type>
193                                     <classifier>config</classifier>
194                                     <overWrite>true</overWrite>
195                                     <outputDirectory>${project.build.directory}/assembly/etc/</outputDirectory>
196                                     <destFileName>org.ops4j.pax.url.mvn.cfg</destFileName>
197                                 </artifactItem>
198                             </artifactItems>
199                             <overWriteReleases>true</overWriteReleases>
200                             <overWriteSnapshots>true</overWriteSnapshots>
201                         </configuration>
202                     </execution>
203                 </executions>
204             </plugin>
205             <plugin>
206                 <artifactId>maven-resources-plugin</artifactId>
207                 <executions>
208                     <execution>
209                         <id>copy-resources</id>
210                         <phase>prepare-package</phase>
211                         <goals>
212                             <goal>copy-resources</goal>
213                         </goals>
214                         <configuration>
215                             <outputDirectory>${basedir}/target/assembly</outputDirectory>
216                             <resources>
217                                 <resource>
218                                     <directory>src/main/assembly</directory>
219                                 </resource>
220                             </resources>
221                             <overwrite>true</overwrite>
222                         </configuration>
223                     </execution>
224                     <execution>
225                         <id>process-resources</id>
226                         <goals>
227                             <goal>resources</goal>
228                         </goals>
229                     </execution>
230                 </executions>
231             </plugin>
232             <plugin>
233                 <groupId>org.opendaylight.odlparent</groupId>
234                 <artifactId>karaf-plugin</artifactId>
235                 <executions>
236                     <execution>
237                         <id>populate-local-repo</id>
238                         <phase>prepare-package</phase>
239                         <goals>
240                             <goal>populate-local-repo</goal>
241                         </goals>
242                         <configuration>
243                             <localRepo>${project.build.directory}/assembly/system</localRepo>
244                         </configuration>
245                     </execution>
246                 </executions>
247             </plugin>
248             <plugin>
249                 <artifactId>maven-antrun-plugin</artifactId>
250                 <executions>
251                     <execution>
252                         <id>fix-permissions</id>
253                         <phase>prepare-package</phase>
254                         <goals>
255                             <goal>run</goal>
256                         </goals>
257                         <configuration>
258                             <target>
259                                 <chmod perm="755">
260                                     <fileset dir="${project.build.directory}/assembly/bin">
261                                         <!-- Ensure that all the shell scripts are executable -->
262                                         <exclude name="*.bat"/>
263                                         <exclude name="contrib/*"/>
264                                     </fileset>
265                                 </chmod>
266                             </target>
267                         </configuration>
268                     </execution>
269                     <execution>
270                         <id>remove-system-bc</id>
271                         <phase>prepare-package</phase>
272                         <goals>
273                             <goal>run</goal>
274                         </goals>
275                         <configuration>
276                             <target>
277                                 <delete dir="${project.build.directory}/assembly/system/org/bouncycastle"
278                                     includeemptydirs="true" failonerror="true"/>
279                             </target>
280                         </configuration>
281                     </execution>
282                 </executions>
283             </plugin>
284             <plugin>
285                 <groupId>org.apache.karaf.tooling</groupId>
286                 <artifactId>karaf-maven-plugin</artifactId>
287                 <version>${karaf.version}</version>
288                 <executions>
289                     <execution>
290                         <id>process-resources</id>
291                         <phase>process-resources</phase>
292                         <goals>
293                             <goal>assembly</goal>
294                         </goals>
295                     </execution>
296                     <execution>
297                         <id>package</id>
298                         <goals>
299                             <goal>archive</goal>
300                         </goals>
301                     </execution>
302                 </executions>
303                 <configuration>
304                     <installedFeatures>
305                         <feature>wrapper</feature>
306                     </installedFeatures>
307                     <bootFeatures>
308                         <feature>standard</feature>
309                         <!-- Features always assumed to be present. Keep in sync with feature parent exclusions. -->
310                         <feature>ssh</feature>
311                         <feature>scr</feature>
312                         <!-- Local feature if any -->
313                         <feature>${karaf.localFeature}</feature>
314                     </bootFeatures>
315                     <javase>${maven.compiler.release}</javase>
316                     <archiveTarGz>${karaf.archiveTarGz}</archiveTarGz>
317                     <archiveZip>${karaf.archiveZip}</archiveZip>
318                 </configuration>
319             </plugin>
320         </plugins>
321     </build>
322 </project>