Bump mockito to 5.12.0
[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.1.3-SNAPSHOT</version>
18         <relativePath>../../odlparent</relativePath>
19     </parent>
20
21     <groupId>org.opendaylight.odlparent</groupId>
22     <artifactId>karaf4-parent</artifactId>
23     <version>13.1.3-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.1.3-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.1.3-SNAPSHOT</version>
158                                     <outputDirectory>target/assembly/lib</outputDirectory>
159                                     <destFileName>karaf.branding-13.1.3-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>remove-system-process-compile</id>
253                         <phase>compile</phase>
254                         <goals>
255                             <goal>run</goal>
256                         </goals>
257                         <configuration>
258                             <target xmlns:if="ant:if">
259                                 <!-- Check if pax-jdbc-features file exists -->
260                                 <condition property="pax.jdbc.exist" else="false">
261                                     <available type="file"
262                                        file="${project.build.directory}/assembly/system/org/ops4j/pax/jdbc/pax-jdbc-features/1.5.7/pax-jdbc-features-1.5.7-features.xml"/>
263                                 </condition>
264
265                                 <!-- FIXME: ODLPARENT-311: Remove this when we require Java 21 runtime and upgrade to Derby 10.17.1.0+ -->
266                                 <!-- Remove Derby client jar-->
267                                 <replace if:true="${pax.jdbc.exist}" failOnNoReplacements="true" value=""
268                                     token="&lt;bundle dependency=&quot;true&quot;&gt;mvn:org.apache.derby/derbyclient/10.14.2.0&lt;/bundle&gt;"
269                                     file="${project.build.directory}/assembly/system/org/ops4j/pax/jdbc/pax-jdbc-features/1.5.7/pax-jdbc-features-1.5.7-features.xml"/>
270                                 <replace if:true="${pax.jdbc.exist}" failOnNoReplacements="true" value=""
271                                     token="&lt;bundle&gt;mvn:org.ops4j.pax.jdbc/pax-jdbc-derbyclient/1.5.7&lt;/bundle&gt;"
272                                     file="${project.build.directory}/assembly/system/org/ops4j/pax/jdbc/pax-jdbc-features/1.5.7/pax-jdbc-features-1.5.7-features.xml"/>
273                                 <!-- Remove Derby jar-->
274                                 <replace if:true="${pax.jdbc.exist}" failOnNoReplacements="true" value=""
275                                     token="&lt;bundle dependency=&quot;true&quot;&gt;mvn:org.apache.derby/derby/10.14.2.0&lt;/bundle&gt;"
276                                     file="${project.build.directory}/assembly/system/org/ops4j/pax/jdbc/pax-jdbc-features/1.5.7/pax-jdbc-features-1.5.7-features.xml"/>
277                                 <replace if:true="${pax.jdbc.exist}" failOnNoReplacements="true" value=""
278                                     token="&lt;bundle&gt;mvn:org.ops4j.pax.jdbc/pax-jdbc-derby/1.5.7&lt;/bundle&gt;"
279                                     file="${project.build.directory}/assembly/system/org/ops4j/pax/jdbc/pax-jdbc-features/1.5.7/pax-jdbc-features-1.5.7-features.xml"/>
280                             </target>
281                         </configuration>
282                     </execution>
283                     <execution>
284                         <id>fix-permissions</id>
285                         <phase>prepare-package</phase>
286                         <goals>
287                             <goal>run</goal>
288                         </goals>
289                         <configuration>
290                             <target>
291                                 <chmod perm="755">
292                                     <fileset dir="${project.build.directory}/assembly/bin">
293                                         <!-- Ensure that all the shell scripts are executable -->
294                                         <exclude name="*.bat"/>
295                                         <exclude name="contrib/*"/>
296                                     </fileset>
297                                 </chmod>
298                             </target>
299                         </configuration>
300                     </execution>
301                     <execution>
302                         <id>remove-system-bc</id>
303                         <phase>prepare-package</phase>
304                         <goals>
305                             <goal>run</goal>
306                         </goals>
307                         <configuration>
308                             <target>
309                                 <delete dir="${project.build.directory}/assembly/system/org/bouncycastle"
310                                     includeemptydirs="true" failonerror="true"/>
311                             </target>
312                         </configuration>
313                     </execution>
314                 </executions>
315             </plugin>
316             <plugin>
317                 <groupId>org.apache.karaf.tooling</groupId>
318                 <artifactId>karaf-maven-plugin</artifactId>
319                 <version>${karaf.version}</version>
320                 <executions>
321                     <execution>
322                         <id>process-resources</id>
323                         <phase>process-resources</phase>
324                         <goals>
325                             <goal>assembly</goal>
326                         </goals>
327                     </execution>
328                     <execution>
329                         <id>package</id>
330                         <goals>
331                             <goal>archive</goal>
332                         </goals>
333                     </execution>
334                 </executions>
335                 <configuration>
336                     <installedFeatures>
337                         <feature>wrapper</feature>
338                     </installedFeatures>
339                     <bootFeatures>
340                         <feature>standard</feature>
341                         <!-- Features always assumed to be present. Keep in sync with feature parent exclusions. -->
342                         <feature>ssh</feature>
343                         <feature>scr</feature>
344                         <!-- Local feature if any -->
345                         <feature>${karaf.localFeature}</feature>
346                     </bootFeatures>
347                     <javase>${maven.compiler.release}</javase>
348                     <archiveTarGz>${karaf.archiveTarGz}</archiveTarGz>
349                     <archiveZip>${karaf.archiveZip}</archiveZip>
350                 </configuration>
351             </plugin>
352         </plugins>
353     </build>
354 </project>