Remove '4' suffix in applicable artifact names
[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>1.9.1-SNAPSHOT</version>
18         <relativePath>../../odlparent</relativePath>
19     </parent>
20
21     <groupId>org.opendaylight.odlparent</groupId>
22     <artifactId>karaf4-parent</artifactId>
23     <version>1.9.1-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     </properties>
31
32     <dependencyManagement>
33         <dependencies>
34             <dependency>
35                 <groupId>org.apache.karaf.features</groupId>
36                 <artifactId>framework</artifactId>
37                 <version>${karaf.version}</version>
38                 <type>kar</type>
39             </dependency>
40             <dependency>
41                 <groupId>org.apache.karaf.features</groupId>
42                 <artifactId>framework</artifactId>
43                 <version>${karaf.version}</version>
44                 <classifier>features</classifier>
45                 <type>xml</type>
46             </dependency>
47             <dependency>
48                 <groupId>org.apache.karaf.features</groupId>
49                 <artifactId>standard</artifactId>
50                 <version>${karaf.version}</version>
51                 <classifier>features</classifier>
52                 <type>xml</type>
53             </dependency>
54         </dependencies>
55     </dependencyManagement>
56
57     <dependencies>
58         <dependency>
59             <groupId>org.apache.karaf.features</groupId>
60             <artifactId>framework</artifactId>
61             <type>kar</type>
62         </dependency>
63         <dependency>
64             <groupId>org.apache.karaf.features</groupId>
65             <artifactId>framework</artifactId>
66             <classifier>features</classifier>
67             <type>xml</type>
68             <scope>runtime</scope>
69         </dependency>
70         <dependency>
71             <groupId>org.apache.karaf.features</groupId>
72             <artifactId>standard</artifactId>
73             <classifier>features</classifier>
74             <type>xml</type>
75             <scope>runtime</scope>
76         </dependency>
77         <dependency>
78             <groupId>org.apache.aries.quiesce</groupId>
79             <artifactId>org.apache.aries.quiesce.api</artifactId>
80         </dependency>
81         <dependency>
82             <groupId>org.osgi</groupId>
83             <!-- for https://bugs.opendaylight.org/show_bug.cgi?id=4290 -->
84             <artifactId>org.osgi.service.event</artifactId>
85         </dependency>
86
87         <!-- ODL Branding -->
88         <dependency>
89             <groupId>org.opendaylight.odlparent</groupId>
90             <artifactId>karaf.branding</artifactId>
91         </dependency>
92         <!-- ODL configuration -->
93         <dependency>
94             <groupId>org.opendaylight.odlparent</groupId>
95             <artifactId>opendaylight-karaf-resources</artifactId>
96         </dependency>
97     </dependencies>
98
99     <build>
100         <plugins>
101             <plugin>
102                 <artifactId>maven-resources-plugin</artifactId>
103                 <executions>
104                     <execution>
105                         <id>process-resources</id>
106                         <goals>
107                             <goal>resources</goal>
108                         </goals>
109                     </execution>
110                 </executions>
111             </plugin>
112             <plugin>
113                 <artifactId>maven-remote-resources-plugin</artifactId>
114                 <configuration>
115                     <skip>true</skip>
116                 </configuration>
117             </plugin>
118             <plugin>
119                 <groupId>org.apache.maven.plugins</groupId>
120                 <artifactId>maven-dependency-plugin</artifactId>
121                 <executions>
122                     <execution>
123                         <id>copy</id>
124                         <goals>
125                             <goal>copy</goal>
126                         </goals>
127                         <phase>prepare-package</phase>
128                         <configuration>
129                             <artifactItems>
130                                 <artifactItem>
131                                     <groupId>org.opendaylight.odlparent</groupId>
132                                     <artifactId>karaf.branding</artifactId>
133                                     <version>1.9.1-SNAPSHOT</version>
134                                     <outputDirectory>target/assembly/lib</outputDirectory>
135                                     <destFileName>karaf.branding-1.9.1-SNAPSHOT.jar</destFileName>
136                                 </artifactItem>
137                             </artifactItems>
138                         </configuration>
139                     </execution>
140                     <execution>
141                         <id>unpack-karaf-resources</id>
142                         <goals>
143                             <goal>unpack-dependencies</goal>
144                         </goals>
145                         <phase>prepare-package</phase>
146                         <configuration>
147                             <outputDirectory>${project.build.directory}/assembly</outputDirectory>
148                             <groupId>org.opendaylight.odlparent</groupId>
149                             <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
150                             <excludes>META-INF\/**</excludes>
151                             <excludeTransitive>true</excludeTransitive>
152                             <ignorePermissions>false</ignorePermissions>
153                         </configuration>
154                     </execution>
155                     <execution>
156                         <id>org.ops4j.pax.url.mvn.cfg</id>
157                         <goals>
158                             <goal>copy</goal>
159                         </goals>
160                         <phase>prepare-package</phase>
161                         <configuration>
162                             <artifactItems>
163                                 <artifactItem>
164                                     <groupId>org.opendaylight.odlparent</groupId>
165                                     <artifactId>opendaylight-karaf-resources</artifactId>
166                                     <type>properties</type>
167                                     <classifier>config</classifier>
168                                     <overWrite>true</overWrite>
169                                     <outputDirectory>${project.build.directory}/assembly/etc/</outputDirectory>
170                                     <destFileName>org.ops4j.pax.url.mvn.cfg</destFileName>
171                                 </artifactItem>
172                             </artifactItems>
173                             <overWriteReleases>true</overWriteReleases>
174                             <overWriteSnapshots>true</overWriteSnapshots>
175                         </configuration>
176                     </execution>
177                 </executions>
178             </plugin>
179
180             <!-- This needs to execute before patching, otherwise the feature will be left unpatched -->
181             <plugin>
182                 <groupId>org.opendaylight.odlparent</groupId>
183                 <artifactId>karaf4-plugin</artifactId>
184                 <version>1.9.1-SNAPSHOT</version>
185                 <executions>
186                     <execution>
187                         <id>populate-local-repo</id>
188                         <goals>
189                             <goal>populate-local-repo</goal>
190                         </goals>
191                         <configuration>
192                             <localRepo>${project.build.directory}/assembly/system</localRepo>
193                         </configuration>
194                     </execution>
195                 </executions>
196             </plugin>
197             <plugin>
198                 <artifactId>maven-antrun-plugin</artifactId>
199                 <executions>
200                     <execution>
201                         <id>patch-karaf-scripts</id>
202                         <phase>prepare-package</phase>
203                         <goals>
204                             <goal>run</goal>
205                         </goals>
206                         <configuration>
207                             <target>
208                                 <!-- Patches only work with LF line endings from ant -->
209                                 <fixcrlf srcdir="${project.build.directory}/assembly/bin"
210                                          includes="*.bat" eol="lf"/>
211                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-instance.patch"
212                                        originalfile="${project.build.directory}/assembly/bin/instance"
213                                        failonerror="true"/>
214                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-instance.bat.patch"
215                                        originalfile="${project.build.directory}/assembly/bin/instance.bat"
216                                        failonerror="true" ignorewhitespace="true"/>
217                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-karaf-${karaf.version}.patch"
218                                        originalfile="${project.build.directory}/assembly/bin/karaf"
219                                        failonerror="true"/>
220                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-karaf.bat.patch"
221                                        originalfile="${project.build.directory}/assembly/bin/karaf.bat"
222                                        failonerror="true"/>
223                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-setenv-${karaf.version}.patch"
224                                        originalfile="${project.build.directory}/assembly/bin/setenv"
225                                        failonerror="true"/>
226                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-setenv.bat.patch"
227                                        originalfile="${project.build.directory}/assembly/bin/setenv.bat"
228                                        failonerror="true"/>
229                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-quiesce-${karaf.version}.patch"
230                                        originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
231                                        failonerror="true"/>
232                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-javax-mail-${karaf.version}.patch"
233                                        originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
234                                        failonerror="true"/>
235                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-paxweb.patch"
236                                        originalfile="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/4.3.0/pax-web-features-4.3.0-features.xml"
237                                        failonerror="true"/>
238                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-etc-startup-properties-4.0.9.patch"
239                                        originalfile="${project.build.directory}/assembly/etc/startup.properties"
240                                        failonerror="true"/>
241                                 <fixcrlf srcdir="${project.build.directory}/assembly/bin"
242                                          includes="*.bat" eol="crlf"/>
243                                 <echo file="${project.build.directory}/assembly/etc/system.properties" append="true">mvn\:org.osgi/org.osgi.service.event/1.3.1 = 8</echo>
244                             </target>
245                         </configuration>
246                     </execution>
247                 </executions>
248             </plugin>
249             <plugin>
250                 <groupId>org.apache.karaf.tooling</groupId>
251                 <artifactId>karaf-maven-plugin</artifactId>
252                 <version>${karaf.plugin.version}</version>
253                 <executions>
254                     <execution>
255                         <id>process-resources</id>
256                         <phase>process-resources</phase>
257                         <goals>
258                             <goal>assembly</goal>
259                         </goals>
260                     </execution>
261                     <execution>
262                         <id>package</id>
263                         <goals>
264                             <goal>archive</goal>
265                         </goals>
266                     </execution>
267                 </executions>
268                 <configuration>
269                     <installedFeatures>
270                         <feature>wrapper</feature>
271                     </installedFeatures>
272                     <bootFeatures>
273                         <feature>standard</feature>
274                         <!-- We load wrap as a workaround to handle old features without the wrap prerequisite -->
275                         <!-- TODO Remove this once all the downstream features are fixed -->
276                         <feature>wrap</feature>
277                         <!-- Local feature if any -->
278                         <feature>${karaf.localFeature}</feature>
279                     </bootFeatures>
280                     <javase>1.8</javase>
281                 </configuration>
282             </plugin>
283         </plugins>
284     </build>
285
286 </project>