Bump Jackson to 2.11.4
[odlparent.git] / odlparent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- vi: set et smarttab sw=2 tabstop=2: -->
3 <!--
4  Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
5
6  This program and the accompanying materials are made available under the
7  terms of the Eclipse Public License v1.0 which accompanies this distribution,
8  and is available at http://www.eclipse.org/legal/epl-v10.html
9 -->
10 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
11   <modelVersion>4.0.0</modelVersion>
12
13   <parent>
14     <groupId>org.opendaylight.odlparent</groupId>
15     <artifactId>odlparent-lite</artifactId>
16     <version>8.1.0-SNAPSHOT</version>
17     <relativePath>../odlparent-lite</relativePath>
18   </parent>
19
20   <artifactId>odlparent</artifactId>
21   <packaging>pom</packaging>
22   <name>ODL :: odlparent :: ${project.artifactId}</name>
23
24   <scm>
25     <connection>scm:git:ssh://git.opendaylight.org:29418/odlparent.git</connection>
26     <developerConnection>scm:git:ssh://git.opendaylight.org:29418/odlparent.git</developerConnection>
27     <tag>HEAD</tag>
28     <url>https://wiki.opendaylight.org/view/ODL_Root_Parent:Main</url>
29   </scm>
30
31   <!-- Variables should only be used where genuinely useful (to avoid
32        repetition); in general versions should be specified in the
33        corresponding dependencyManagement or pluginManagement element, not as
34        a variable. Duplication within odlparent doesn't count if it can be
35        managed using maven-versions-plugin. -->
36   <properties>
37     <nexus.repository.release>opendaylight.release</nexus.repository.release>
38     <nexus.repository.snapshot>opendaylight.snapshot</nexus.repository.snapshot>
39
40     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
41     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
42
43     <!-- Java Versions -->
44     <maven.compiler.release>11</maven.compiler.release>
45
46     <!-- Used in controller, genius, infrautils, netconf, netvirt, ovsdb, serviceutils -->
47     <karaf.version>4.3.0</karaf.version>
48
49     <!-- Supporting Libraries -->
50     <!-- Only used internally -->
51     <bouncycastle.version>1.66</bouncycastle.version>
52
53     <!-- JaCoCo configuration, by default tied to Sonar configuration, but can be overridden separately
54          to allow projects to report Sonar values from the entire project. -->
55     <jacoco.destFile>${project.build.directory}/code-coverage/jacoco.exec</jacoco.destFile>
56     <jacoco.dataFile>${jacoco.destFile}</jacoco.dataFile>
57
58     <!-- Default Sonar configuration -->
59     <sonar.java.source>${maven.compiler.release}</sonar.java.source>
60     <sonar-jacoco-listeners.version>3.8</sonar-jacoco-listeners.version>
61     <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
62
63     <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
64     <sonar.exclusions>**/gen/**,**/generated-sources/**,**/generated-test-sources/**,**/yang-gen/**,**/yang-gen-config/**,**/yang-gen-sal/**,**/yang-gen-code/**,**/pax/**</sonar.exclusions>
65
66     <!-- Opt-in code quality checks -->
67     <pmd.cpd.fail>false</pmd.cpd.fail>                  <!-- Copy/paste detection -->
68     <duplicate-finder.skip>true</duplicate-finder.skip> <!-- Classpath duplicates -->
69
70     <!-- Redirect test output to files (overridable) -->
71     <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
72
73     <!-- Opt-out from maven-checkstyle-plugin failing the build on violations. Defaults
74          to true. Set to 'false' in pom.xml of project which desires to not enforce
75          no reported violations. -->
76     <odlparent.checkstyle.enforce>true</odlparent.checkstyle.enforce>
77
78     <!-- Opt-in into modernizer-maven-plugin failing the build on violations. Defaults
79          to true. Set to 'false' in pom.xml of project which desires to not enforce
80          no reported violations. -->
81     <odlparent.modernizer.enforce>true</odlparent.modernizer.enforce>
82
83     <!-- Target release for modernizer-maven-plugin. It defaults to '1.11',
84          meaning Java 11, but can be set to any version in pom.xml of project
85          which desires to override it (such as '1.12' for Java 12). -->
86     <odlparent.modernizer.target>1.11</odlparent.modernizer.target>
87
88     <!-- Opt-out from spotbugs-maven-plugin failing the build on violations. Defaults
89          to true. Set to 'false' in pom.xml of project which desires to not enforce
90          no reported violations. -->
91     <odlparent.spotbugs.enforce>true</odlparent.spotbugs.enforce>
92   </properties>
93
94   <dependencyManagement>
95     <dependencies>
96
97       <dependency>
98         <groupId>org.opendaylight.odlparent</groupId>
99         <artifactId>odlparent-artifacts</artifactId>
100         <version>8.1.0-SNAPSHOT</version>
101         <scope>import</scope>
102         <type>pom</type>
103       </dependency>
104
105       <!-- We import Karaf dependencies to ensure we converge by default on the versions used there -->
106       <dependency>
107         <groupId>org.apache.karaf.features</groupId>
108         <artifactId>framework</artifactId>
109         <version>${karaf.version}</version>
110         <scope>import</scope>
111         <type>pom</type>
112       </dependency>
113
114       <!-- Build tool dependencies (normally not here in <dependencies>,
115            but in a <dependency> in <pluginManagement> but for Checkstyle this
116            is required so that we can share the same version of Checkstyle
117            for both the Maven plugin below as well as  for custom Checkstyle
118            check rule projects, such as yangtools' checkstyle-logging) -->
119       <dependency>
120         <groupId>com.puppycrawl.tools</groupId>
121         <artifactId>checkstyle</artifactId>
122         <!-- This should match the plugin management on maven-checkstyle-plugin below -->
123         <version>8.38</version>
124       </dependency>
125
126       <!-- Testing Dependencies -->
127       <!-- JUnit, Hamcrest, Mockito and PowerMock need to be kept in sync -->
128       <dependency>
129         <groupId>junit</groupId>
130         <artifactId>junit</artifactId>
131         <!-- When bumping this version, remember to also change the JavaDoc link in odlparent-lite -->
132         <version>4.13.1</version>
133         <scope>test</scope>
134       </dependency>
135       <dependency>
136          <groupId>org.skyscreamer</groupId>
137          <artifactId>jsonassert</artifactId>
138          <version>1.5.0</version>
139          <scope>test</scope>
140       </dependency>
141       <dependency>
142         <groupId>org.mockito</groupId>
143         <artifactId>mockito-core</artifactId>
144         <version>3.5.11</version>
145         <scope>test</scope>
146       </dependency>
147       <dependency>
148         <groupId>org.mockito</groupId>
149         <artifactId>mockito-inline</artifactId>
150         <version>3.5.11</version>
151         <scope>test</scope>
152       </dependency>
153       <dependency>
154         <groupId>org.hamcrest</groupId>
155         <artifactId>hamcrest</artifactId>
156         <!-- When bumping this version, remember to also change the JavaDoc link in odlparent-lite -->
157         <version>2.2</version>
158         <scope>test</scope>
159       </dependency>
160       <dependency>
161         <groupId>org.hamcrest</groupId>
162         <artifactId>hamcrest-core</artifactId>
163         <version>2.2</version>
164         <scope>test</scope>
165       </dependency>
166       <dependency>
167         <groupId>org.hamcrest</groupId>
168         <artifactId>hamcrest-library</artifactId>
169         <version>2.2</version>
170         <scope>test</scope>
171       </dependency>
172       <dependency>
173         <groupId>com.google.truth</groupId>
174         <artifactId>truth</artifactId>
175         <!-- When bumping this version, remember to also change the JavaDoc link in odlparent-lite -->
176         <version>1.1</version>
177         <scope>test</scope>
178       </dependency>
179       <dependency>
180         <groupId>com.google.truth.extensions</groupId>
181         <artifactId>truth-java8-extension</artifactId>
182         <version>1.1</version>
183         <scope>test</scope>
184       </dependency>
185       <dependency>
186         <groupId>org.awaitility</groupId>
187         <artifactId>awaitility</artifactId>
188         <version>4.0.3</version>
189         <scope>test</scope>
190       </dependency>
191       <dependency>
192         <groupId>org.powermock</groupId>
193         <artifactId>powermock-api-mockito2</artifactId>
194         <version>2.0.9</version>
195         <scope>test</scope>
196       </dependency>
197       <dependency>
198         <groupId>org.powermock</groupId>
199         <artifactId>powermock-api-support</artifactId>
200         <version>2.0.9</version>
201         <scope>test</scope>
202       </dependency>
203       <dependency>
204         <groupId>org.powermock</groupId>
205         <artifactId>powermock-core</artifactId>
206         <version>2.0.9</version>
207         <scope>test</scope>
208       </dependency>
209       <dependency>
210         <groupId>org.powermock</groupId>
211         <artifactId>powermock-module-junit4</artifactId>
212         <version>2.0.9</version>
213         <scope>test</scope>
214       </dependency>
215       <dependency>
216         <groupId>org.powermock</groupId>
217         <artifactId>powermock-reflect</artifactId>
218         <version>2.0.9</version>
219         <scope>test</scope>
220       </dependency>
221
222       <!--
223            Annotation Processors
224        -->
225       <dependency>
226         <!-- Generates immutable implementations, builders, the works -->
227         <groupId>org.immutables</groupId>
228         <artifactId>value</artifactId>
229         <classifier>annotations</classifier>
230         <!-- Keep this version in sync with annotationProcessorPaths declaration below -->
231         <version>2.8.8</version>
232         <!-- Must be provided; scope=test here breaks APT in Eclipse :( -->
233         <scope>provided</scope>
234       </dependency>
235
236       <dependency>
237         <!-- Generates META-INF/services entries for ServiceLoader -->
238         <groupId>org.kohsuke.metainf-services</groupId>
239         <artifactId>metainf-services</artifactId>
240         <!-- Keep this version in sync with annotationProcessorPaths declaration below -->
241         <version>1.8</version>
242         <optional>true</optional>
243         <scope>provided</scope>
244       </dependency>
245
246       <!--
247            Supporting Libraries
248        -->
249       <dependency>
250         <groupId>org.slf4j</groupId>
251         <artifactId>jcl-over-slf4j</artifactId>
252         <version>1.7.28</version>
253       </dependency>
254       <dependency>
255         <groupId>org.slf4j</groupId>
256         <artifactId>slf4j-api</artifactId>
257         <version>1.7.28</version>
258       </dependency>
259       <dependency>
260         <groupId>org.slf4j</groupId>
261         <artifactId>slf4j-log4j12</artifactId>
262         <version>1.7.28</version>
263       </dependency>
264       <dependency>
265         <groupId>org.slf4j</groupId>
266         <artifactId>log4j-over-slf4j</artifactId>
267         <version>1.7.28</version>
268       </dependency>
269       <dependency>
270         <groupId>org.slf4j</groupId>
271         <artifactId>slf4j-simple</artifactId>
272         <version>1.7.28</version>
273         <scope>test</scope>
274       </dependency>
275       <dependency>
276         <groupId>ch.qos.logback</groupId>
277         <artifactId>logback-core</artifactId>
278         <version>1.2.3</version>
279       </dependency>
280       <dependency>
281         <groupId>ch.qos.logback</groupId>
282         <artifactId>logback-classic</artifactId>
283         <version>1.2.3</version>
284       </dependency>
285
286       <!-- log4j2 -->
287       <dependency>
288         <groupId>org.apache.logging.log4j</groupId>
289         <artifactId>log4j-bom</artifactId>
290         <version>2.13.3</version>
291         <scope>import</scope>
292         <type>pom</type>
293       </dependency>
294
295       <dependency>
296         <groupId>com.google.guava</groupId>
297         <artifactId>guava</artifactId>
298         <!-- When bumping this version, remember to also change the JavaDoc link in odlparent-lite and docs -->
299         <version>29.0-jre</version>
300         <exclusions>
301           <exclusion>
302             <!-- Do not leak JSR305 onto the classpath by default -->
303             <groupId>com.google.code.findbugs</groupId>
304             <artifactId>jsr305</artifactId>
305           </exclusion>
306         </exclusions>
307       </dependency>
308       <dependency>
309         <groupId>com.google.guava</groupId>
310         <artifactId>guava-testlib</artifactId>
311         <!-- When bumping this version, remember to also change the JavaDoc link in odlparent-lite and docs -->
312         <version>29.0-jre</version>
313         <scope>test</scope>
314         <exclusions>
315           <exclusion>
316             <!-- Do not leak JSR305 onto the classpath by default -->
317             <groupId>com.google.code.findbugs</groupId>
318             <artifactId>jsr305</artifactId>
319           </exclusion>
320         </exclusions>
321       </dependency>
322       <dependency>
323         <groupId>org.checkerframework</groupId>
324         <artifactId>checker-qual</artifactId>
325         <version>2.11.1</version>
326       </dependency>
327       <dependency>
328         <groupId>com.google.errorprone</groupId>
329         <artifactId>error_prone_annotations</artifactId>
330         <version>2.3.4</version>
331       </dependency>
332
333       <dependency>
334         <groupId>commons-beanutils</groupId>
335         <artifactId>commons-beanutils</artifactId>
336         <version>1.9.4</version>
337       </dependency>
338       <dependency>
339         <groupId>org.apache.commons</groupId>
340         <artifactId>commons-lang3</artifactId>
341         <!-- When bumping this version, remember to also change the JavaDoc link in odlparent-lite and docs -->
342         <version>3.11</version>
343       </dependency>
344       <dependency>
345         <groupId>org.apache.commons</groupId>
346         <artifactId>commons-text</artifactId>
347         <version>1.9</version>
348       </dependency>
349       <dependency>
350         <groupId>commons-lang</groupId>
351         <artifactId>commons-lang</artifactId>
352         <!-- When bumping this version, remember to also change the JavaDoc link in odlparent-lite and docs -->
353         <version>2.6</version>
354       </dependency>
355       <dependency>
356         <groupId>commons-codec</groupId>
357         <artifactId>commons-codec</artifactId>
358         <version>1.15</version>
359       </dependency>
360       <!-- Jersey for JAXRS -->
361       <dependency>
362         <groupId>javax.ws.rs</groupId>
363         <artifactId>javax.ws.rs-api</artifactId>
364         <version>2.1.1</version>
365       </dependency>
366       <dependency>
367         <groupId>org.glassfish.jersey</groupId>
368         <artifactId>jersey-bom</artifactId>
369         <version>2.27</version>
370         <type>pom</type>
371         <scope>import</scope>
372       </dependency>
373
374       <dependency>
375         <groupId>jakarta.activation</groupId>
376         <artifactId>jakarta.activation-api</artifactId>
377         <version>1.2.2</version>
378       </dependency>
379
380       <dependency>
381         <groupId>javax.annotation</groupId>
382         <artifactId>javax.annotation-api</artifactId>
383         <version>1.3.1</version>
384         <optional>true</optional>
385       </dependency>
386       <dependency>
387         <groupId>xml-apis</groupId>
388         <artifactId>xml-apis</artifactId>
389         <version>1.4.01</version>
390       </dependency>
391
392       <!-- Plugin integration -->
393       <dependency>
394         <groupId>net.java.dev.stax-utils</groupId>
395         <artifactId>stax-utils</artifactId>
396         <version>20070216</version>
397       </dependency>
398       <dependency>
399         <groupId>org.sonatype.plexus</groupId>
400         <artifactId>plexus-build-api</artifactId>
401         <version>0.0.7</version>
402       </dependency>
403       <dependency>
404         <groupId>org.codehaus.plexus</groupId>
405         <artifactId>plexus-slf4j-logging</artifactId>
406         <version>1.1</version>
407       </dependency>
408
409       <!-- These three need to be consistent:
410         jackson-2.11.4 needs woodstox-6.2.3+
411         woodstox-5.3+ needs stax2-api-4.2.x
412         -->
413       <dependency>
414         <groupId>org.codehaus.woodstox</groupId>
415         <artifactId>stax2-api</artifactId>
416         <version>4.2.1</version>
417       </dependency>
418       <dependency>
419         <groupId>com.fasterxml.woodstox</groupId>
420         <artifactId>woodstox-core</artifactId>
421         <version>6.2.3</version>
422       </dependency>
423       <dependency>
424         <groupId>com.fasterxml.jackson</groupId>
425         <artifactId>jackson-bom</artifactId>
426         <version>2.11.4</version>
427         <scope>import</scope>
428         <type>pom</type>
429       </dependency>
430
431       <dependency>
432         <groupId>com.github.spotbugs</groupId>
433         <artifactId>spotbugs-annotations</artifactId>
434         <version>3.1.12</version>
435         <scope>provided</scope>
436         <!-- Contains retention=RUNTIME annotations, which are not really needed -->
437         <optional>true</optional>
438         <exclusions>
439           <exclusion>
440             <groupId>com.google.code.findbugs</groupId>
441             <artifactId>jsr305</artifactId>
442           </exclusion>
443         </exclusions>
444       </dependency>
445
446       <dependency>
447         <groupId>org.eclipse.jdt</groupId>
448         <artifactId>org.eclipse.jdt.annotation</artifactId>
449         <version>2.2.400</version>
450         <scope>provided</scope>
451       </dependency>
452       <!-- We're staying on 2.8.5 for now, 2.8.6 has issues:
453            https://github.com/google/gson/issues/1601
454            https://github.com/google/gson/issues/1602
455            https://github.com/google/gson/issues/1608
456            https://github.com/google/gson/issues/1630
457       -->
458       <dependency>
459         <groupId>com.google.code.gson</groupId>
460         <artifactId>gson</artifactId>
461         <version>2.8.5</version>
462       </dependency>
463       <dependency>
464         <groupId>commons-fileupload</groupId>
465         <artifactId>commons-fileupload</artifactId>
466         <version>1.4</version>
467       </dependency>
468       <dependency>
469         <groupId>commons-io</groupId>
470         <artifactId>commons-io</artifactId>
471         <version>2.8.0</version>
472       </dependency>
473       <dependency>
474         <groupId>commons-net</groupId>
475         <artifactId>commons-net</artifactId>
476         <version>3.7.2</version>
477       </dependency>
478
479       <!-- Netty -->
480       <dependency>
481         <groupId>io.netty</groupId>
482         <artifactId>netty-bom</artifactId>
483         <!-- If these are updated, the version in features.xml needs to be changed too -->
484         <!-- When bumping this version, remember to also change the JavaDoc link in odlparent-lite -->
485         <version>4.1.56.Final</version>
486         <type>pom</type>
487         <scope>import</scope>
488       </dependency>
489
490       <dependency>
491         <groupId>javax.ws.rs</groupId>
492         <artifactId>jsr311-api</artifactId>
493         <version>1.1.1</version>
494       </dependency>
495       <dependency>
496         <groupId>javax.servlet</groupId>
497         <artifactId>javax.servlet-api</artifactId>
498         <version>3.1.0</version>
499       </dependency>
500       <dependency>
501         <groupId>org.apache.felix</groupId>
502         <artifactId>org.apache.felix.metatype</artifactId>
503         <version>1.2.2</version>
504       </dependency>
505       <dependency>
506         <groupId>org.bouncycastle</groupId>
507         <artifactId>bcpkix-jdk15on</artifactId>
508         <version>${bouncycastle.version}</version>
509       </dependency>
510       <dependency>
511         <groupId>org.bouncycastle</groupId>
512         <artifactId>bcprov-jdk15on</artifactId>
513         <version>${bouncycastle.version}</version>
514       </dependency>
515       <dependency>
516         <groupId>org.bouncycastle</groupId>
517         <artifactId>bcprov-ext-jdk15on</artifactId>
518         <version>${bouncycastle.version}</version>
519       </dependency>
520
521       <dependency>
522         <groupId>com.webcohesion.enunciate</groupId>
523         <artifactId>enunciate-core-annotations</artifactId>
524         <!-- This must be aligned with the version of enunciate-maven-plugin specified below -->
525         <version>2.13.2</version>
526       </dependency>
527
528       <dependency>
529         <groupId>org.javassist</groupId>
530         <artifactId>javassist</artifactId>
531         <version>3.27.0-GA</version>
532       </dependency>
533       <dependency>
534         <groupId>org.jboss.spec.javax.transaction</groupId>
535         <artifactId>jboss-transaction-api_1.1_spec</artifactId>
536         <version>1.0.1.Final</version>
537       </dependency>
538       <dependency>
539         <groupId>org.jolokia</groupId>
540         <artifactId>jolokia-osgi</artifactId>
541         <version>1.6.2</version>
542       </dependency>
543       <dependency>
544         <!--
545           These are usually used through osgi.cmpn, except when you also want
546           to be a JPMS module. In that case you need to depend on these and
547           have a 'require static org.osgi.service.component.annotations;'.
548           This incurs a warning about publishing the module to a public place.
549           We do not heed that warning, as nothing in this package is seen by
550           the runtime - thus the warning can be safely ignored :)
551
552           Keep this in sync with rest of OSGi:
553           - OSGi R7 (now) = 1.4.0
554         -->
555         <groupId>org.osgi</groupId>
556         <artifactId>org.osgi.service.component.annotations</artifactId>
557         <version>1.4.0</version>
558         <scope>provided</scope>
559       </dependency>
560       <dependency>
561         <groupId>org.osgi</groupId>
562         <artifactId>osgi.cmpn</artifactId>
563         <version>7.0.0</version>
564         <scope>provided</scope>
565       </dependency>
566       <dependency>
567         <groupId>org.osgi</groupId>
568         <artifactId>osgi.core</artifactId>
569         <version>7.0.0</version>
570         <scope>provided</scope>
571       </dependency>
572       <!-- For backwards compatibility -->
573       <!-- FIXME: 9.0.0: remove this declaration -->
574       <dependency>
575         <groupId>org.osgi</groupId>
576         <artifactId>org.osgi.core</artifactId>
577         <version>6.0.0</version>
578         <scope>provided</scope>
579       </dependency>
580
581       <dependency>
582         <groupId>org.osgi</groupId>
583         <!-- for https://bugs.opendaylight.org/show_bug.cgi?id=4290 -->
584         <artifactId>org.osgi.service.event</artifactId>
585         <version>1.4.0</version>
586       </dependency>
587       <dependency>
588         <groupId>org.apache.aries.quiesce</groupId>
589         <artifactId>org.apache.aries.quiesce.api</artifactId>
590         <version>1.0.0</version>
591       </dependency>
592
593       <!-- LMAX Disruptor -->
594       <dependency>
595         <groupId>com.lmax</groupId>
596         <artifactId>disruptor</artifactId>
597         <version>3.4.2</version>
598       </dependency>
599
600       <!-- Add Pax Exam -->
601       <dependency>
602         <groupId>org.ops4j.pax.exam</groupId>
603         <artifactId>pax-exam</artifactId>
604         <version>4.13.4</version>
605         <scope>test</scope>
606       </dependency>
607       <dependency>
608         <groupId>org.ops4j.pax.exam</groupId>
609         <artifactId>pax-exam-container-forked</artifactId>
610         <version>4.13.4</version>
611         <scope>test</scope>
612       </dependency>
613       <dependency>
614         <groupId>org.ops4j.pax.exam</groupId>
615         <artifactId>pax-exam-container-karaf</artifactId>
616         <version>4.13.4</version>
617         <scope>test</scope>
618       </dependency>
619       <dependency>
620         <groupId>org.ops4j.pax.exam</groupId>
621         <artifactId>pax-exam-container-native</artifactId>
622         <version>4.13.4</version>
623         <scope>test</scope>
624       </dependency>
625       <dependency>
626         <groupId>org.ops4j.pax.exam</groupId>
627         <artifactId>pax-exam-extender-service</artifactId>
628         <version>4.13.4</version>
629         <scope>test</scope>
630       </dependency>
631       <dependency>
632         <groupId>org.ops4j.pax.exam</groupId>
633         <artifactId>pax-exam-inject</artifactId>
634         <version>4.13.4</version>
635         <scope>test</scope>
636       </dependency>
637       <dependency>
638         <groupId>org.ops4j.pax.exam</groupId>
639         <artifactId>pax-exam-invoker-junit</artifactId>
640         <version>4.13.4</version>
641         <scope>test</scope>
642       </dependency>
643       <dependency>
644         <groupId>org.ops4j.pax.exam</groupId>
645         <artifactId>pax-exam-features</artifactId>
646         <version>4.13.4</version>
647         <type>xml</type>
648         <scope>test</scope>
649       </dependency>
650       <dependency>
651         <groupId>org.ops4j.pax.exam</groupId>
652         <artifactId>pax-exam-junit4</artifactId>
653         <version>4.13.4</version>
654         <scope>test</scope>
655       </dependency>
656       <dependency>
657         <groupId>org.ops4j.pax.exam</groupId>
658         <artifactId>pax-exam-link-mvn</artifactId>
659         <version>4.13.4</version>
660         <scope>test</scope>
661       </dependency>
662       <dependency>
663         <groupId>org.ops4j.pax.exam</groupId>
664         <artifactId>pax-exam-link-assembly</artifactId>
665         <version>4.13.4</version>
666         <scope>test</scope>
667       </dependency>
668
669       <dependency>
670         <groupId>org.ops4j.pax.url</groupId>
671         <artifactId>pax-url-link</artifactId>
672         <version>2.5.4</version>
673         <scope>test</scope>
674       </dependency>
675       <dependency>
676         <groupId>org.ops4j.pax.url</groupId>
677         <artifactId>pax-url-aether</artifactId>
678         <version>2.5.4</version>
679         <scope>test</scope>
680       </dependency>
681       <dependency>
682         <groupId>org.ops4j.pax.url</groupId>
683         <artifactId>pax-url-wrap</artifactId>
684         <version>2.5.4</version>
685       </dependency>
686
687       <dependency>
688         <groupId>org.ops4j.pax.web</groupId>
689         <artifactId>pax-web-api</artifactId>
690         <!-- Note: keep this version synchronized with karaf -->
691         <version>7.3.9</version>
692       </dependency>
693
694       <dependency>
695         <groupId>org.springframework.osgi</groupId>
696         <artifactId>spring-osgi-mock</artifactId>
697         <version>1.2.1</version>
698         <scope>test</scope>
699       </dependency>
700
701       <dependency>
702         <groupId>org.xmlunit</groupId>
703         <artifactId>xmlunit-core</artifactId>
704         <version>2.8.2</version>
705         <scope>test</scope>
706       </dependency>
707       <dependency>
708         <groupId>org.xmlunit</groupId>
709         <artifactId>xmlunit-assertj</artifactId>
710         <version>2.8.2</version>
711         <scope>test</scope>
712       </dependency>
713       <dependency>
714         <groupId>org.xmlunit</groupId>
715         <artifactId>xmlunit-assertj3</artifactId>
716         <version>2.8.2</version>
717         <scope>test</scope>
718       </dependency>
719       <dependency>
720         <groupId>org.xmlunit</groupId>
721         <artifactId>xmlunit-matchers</artifactId>
722         <version>2.8.2</version>
723         <scope>test</scope>
724       </dependency>
725       <!-- FIXME: remove this once we have migrated over -->
726       <dependency>
727         <groupId>org.xmlunit</groupId>
728         <artifactId>xmlunit-legacy</artifactId>
729         <version>2.8.2</version>
730         <scope>test</scope>
731       </dependency>
732
733       <!-- Annotations for modernizer-maven-plugin -->
734       <dependency>
735         <groupId>org.gaul</groupId>
736         <artifactId>modernizer-maven-annotations</artifactId>
737         <!-- This should match the plugin version below -->
738         <version>2.1.0</version>
739         <scope>provided</scope>
740       </dependency>
741
742       <dependency>
743         <groupId>org.eclipse.jetty</groupId>
744         <artifactId>jetty-bom</artifactId>
745         <version>9.4.31.v20200723</version>
746         <scope>import</scope>
747         <type>pom</type>
748       </dependency>
749
750       <dependency>
751         <groupId>com.h2database</groupId>
752         <artifactId>h2</artifactId>
753         <version>1.4.200</version>
754       </dependency>
755
756       <!-- Xtend http://xtend-lang.org
757            NOTE: When you increase the version here,
758            then remember to also increase it for the
759            xtend-maven-plugin below! (We don't want to
760            use a Maven property, in order not to "leak" that.)
761        -->
762       <dependency>
763           <groupId>org.eclipse.xtend</groupId>
764           <artifactId>org.eclipse.xtend.lib</artifactId>
765           <version>2.24.0</version>
766       </dependency>
767       <dependency>
768           <groupId>org.eclipse.xtend</groupId>
769           <artifactId>org.eclipse.xtend.lib.macro</artifactId>
770           <version>2.24.0</version>
771       </dependency>
772       <dependency>
773           <groupId>org.eclipse.xtext</groupId>
774           <artifactId>org.eclipse.xtext.xbase.lib</artifactId>
775           <version>2.24.0</version>
776       </dependency>
777
778       <!-- Annotations -->
779       <!-- FIXME: ODLPARENT-246: remove this declaration -->
780       <dependency>
781         <groupId>javax.inject</groupId>
782         <artifactId>javax.inject</artifactId>
783         <version>1</version>
784         <optional>true</optional>
785       </dependency>
786       <!-- A better alternative for javax.inject, from https://guicedee.com/ -->
787       <dependency>
788         <groupId>com.guicedee.services</groupId>
789         <artifactId>javax.inject</artifactId>
790         <version>1.0.20.0</version>
791         <scope>provided</scope>
792         <optional>true</optional>
793       </dependency>
794
795       <!-- jung, a graph library -->
796       <dependency>
797         <groupId>net.sf.jung</groupId>
798         <artifactId>jung-api</artifactId>
799         <version>2.1.1</version>
800       </dependency>
801       <dependency>
802         <groupId>net.sf.jung</groupId>
803         <artifactId>jung-algorithms</artifactId>
804         <version>2.1.1</version>
805       </dependency>
806       <dependency>
807         <groupId>net.sf.jung</groupId>
808         <artifactId>jung-graph-impl</artifactId>
809         <version>2.1.1</version>
810       </dependency>
811
812       <!-- Karaf console support -->
813       <dependency>
814         <groupId>org.apache.karaf.shell</groupId>
815         <artifactId>org.apache.karaf.shell.core</artifactId>
816         <version>${karaf.version}</version>
817         <scope>provided</scope>
818       </dependency>
819       <dependency>
820         <groupId>org.apache.karaf.shell</groupId>
821         <artifactId>org.apache.karaf.shell.console</artifactId>
822         <version>${karaf.version}</version>
823         <scope>provided</scope>
824       </dependency>
825
826       <!-- ThreeTen-Extra, date/time complements -->
827       <dependency>
828         <groupId>org.threeten</groupId>
829         <artifactId>threeten-extra</artifactId>
830         <version>1.5.0</version>
831       </dependency>
832
833       <!-- When updating this version, consider antl4-maven-plugin below -->
834       <dependency>
835         <groupId>org.antlr</groupId>
836         <artifactId>antlr4-runtime</artifactId>
837         <version>4.8-1</version>
838       </dependency>
839       <!-- Aries' Blueprint version should be kept in sync to the version actually
840            used by our ${karaf[4].version} ... please bump this when increasing that.
841            TODO Find a smarter way to inherit this from a (TBD..) Karaf artifacts BOM! -->
842       <dependency>
843         <groupId>org.apache.aries.blueprint</groupId>
844         <artifactId>org.apache.aries.blueprint.core</artifactId>
845         <version>1.10.2</version>
846       </dependency>
847       <dependency>
848         <groupId>org.apache.aries.blueprint</groupId>
849         <artifactId>blueprint-maven-plugin-annotation</artifactId>
850         <version>1.3.0</version>
851         <optional>true</optional>
852       </dependency>
853
854       <!-- TrieMap library -->
855       <dependency>
856         <groupId>tech.pantheon.triemap</groupId>
857         <artifactId>bom</artifactId>
858         <version>1.2.0</version>
859         <scope>import</scope>
860         <type>pom</type>
861       </dependency>
862
863       <!-- Dropwizard metrics -->
864       <dependency>
865         <groupId>io.dropwizard.metrics</groupId>
866         <artifactId>metrics-bom</artifactId>
867         <version>4.1.12.1</version>
868         <scope>import</scope>
869         <type>pom</type>
870       </dependency>
871
872       <!-- JAXB for Java 11+, match this with Karaf -->
873       <dependency>
874         <groupId>jakarta.xml.bind</groupId>
875         <artifactId>jakarta.xml.bind-api</artifactId>
876         <version>2.3.2</version>
877       </dependency>
878       <dependency>
879         <groupId>org.glassfish.jaxb</groupId>
880         <artifactId>jaxb-runtime</artifactId>
881         <version>2.3.2</version>
882       </dependency>
883     </dependencies>
884   </dependencyManagement>
885
886   <dependencies>
887     <!--
888          We expect slf4j-api to be provided by the platform.
889          Karaf provides it, other containers need to provide it themselves.
890     -->
891     <dependency>
892       <groupId>org.slf4j</groupId>
893       <artifactId>slf4j-api</artifactId>
894       <scope>provided</scope>
895     </dependency>
896
897     <!--
898           Enable useful code quality annotations everywhere. Since these annotations
899           are not required at runtime.
900     -->
901     <dependency>
902       <groupId>org.eclipse.jdt</groupId>
903       <artifactId>org.eclipse.jdt.annotation</artifactId>
904       <scope>provided</scope>
905     </dependency>
906     <dependency>
907       <groupId>com.github.spotbugs</groupId>
908       <artifactId>spotbugs-annotations</artifactId>
909       <scope>provided</scope>
910       <optional>true</optional>
911     </dependency>
912     <dependency>
913       <groupId>org.gaul</groupId>
914       <artifactId>modernizer-maven-annotations</artifactId>
915       <scope>provided</scope>
916     </dependency>
917
918     <!--
919           Testing output should be routed through slf4j-simple.
920     -->
921     <dependency>
922       <groupId>org.slf4j</groupId>
923       <artifactId>slf4j-simple</artifactId>
924       <scope>test</scope>
925     </dependency>
926
927     <!--
928           Unit tests can use JUnit + Mockito + Hamcrest by default.
929     -->
930     <dependency>
931       <groupId>org.hamcrest</groupId>
932       <artifactId>hamcrest</artifactId>
933       <scope>test</scope>
934     </dependency>
935     <dependency>
936       <!-- This dependency needs to come before junit until we upgrade to JUnit 5. -->
937       <groupId>org.hamcrest</groupId>
938       <artifactId>hamcrest-library</artifactId>
939       <scope>test</scope>
940     </dependency>
941     <dependency>
942       <groupId>junit</groupId>
943       <artifactId>junit</artifactId>
944       <scope>test</scope>
945     </dependency>
946     <dependency>
947       <groupId>org.mockito</groupId>
948       <artifactId>mockito-core</artifactId>
949       <scope>test</scope>
950     </dependency>
951   </dependencies>
952
953   <build>
954     <pluginManagement>
955       <plugins>
956         <!-- Official maven plugins, alpha-sorted by artifactId.
957              We do not need to specify the groupId. -->
958         <plugin>
959           <artifactId>maven-checkstyle-plugin</artifactId>
960           <version>3.1.1</version>
961           <dependencies>
962             <dependency>
963               <groupId>com.puppycrawl.tools</groupId>
964               <artifactId>checkstyle</artifactId>
965               <!-- This should match the dependency management on com.puppycrawl.tools:checkstyle above -->
966               <version>8.38</version>
967             </dependency>
968             <dependency>
969               <groupId>org.opendaylight.odlparent</groupId>
970               <artifactId>checkstyle</artifactId>
971               <version>8.1.0-SNAPSHOT</version>
972             </dependency>
973             <dependency>
974               <groupId>com.github.sevntu-checkstyle</groupId>
975               <artifactId>sevntu-checks</artifactId>
976               <version>1.38.0</version>
977             </dependency>
978           </dependencies>
979           <configuration>
980             <configLocation>odl_checks.xml</configLocation>
981             <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
982             <!-- <sourceDirectories> are needed so that checkstyle ignores the
983                  generated sources directory -->
984             <sourceDirectories>
985               <directory>${project.build.sourceDirectory}</directory>
986             </sourceDirectories>
987             <includeResources>true</includeResources>
988             <includeTestSourceDirectory>true</includeTestSourceDirectory>
989             <includeTestResources>true</includeTestResources>
990             <includes>**\/*.java, **\/*.xtend</includes>
991             <excludes>
992               org/opendaylight/yang/gen/**,
993               **/protobuff/messages/**,
994               **/thrift/gen/*.java,
995               **/module-info.java
996             </excludes>
997             <failsOnError>false</failsOnError>
998             <consoleOutput>true</consoleOutput>
999           </configuration>
1000           <executions>
1001             <execution>
1002               <id>check-license</id>
1003               <goals>
1004                 <goal>check</goal>
1005               </goals>
1006               <phase>process-sources</phase>
1007               <configuration>
1008                 <configLocation>check-license.xml</configLocation>
1009                 <headerLocation>EPL-LICENSE.regexp.txt</headerLocation>
1010                 <includeResources>false</includeResources>
1011                 <includeTestSourceDirectory>true</includeTestSourceDirectory>
1012                 <includeTestResources>false</includeTestResources>
1013                 <sourceDirectories>
1014                   <directory>${project.build.sourceDirectory}</directory>
1015                 </sourceDirectories>
1016                 <excludes>
1017                   org/opendaylight/yang/gen/**,
1018                   **/protobuff/messages/**,
1019                   **/thrift/gen/*.java
1020                 </excludes>
1021                 <failsOnError>false</failsOnError>
1022                 <consoleOutput>true</consoleOutput>
1023               </configuration>
1024             </execution>
1025             <execution>
1026               <goals>
1027                 <goal>check</goal>
1028               </goals>
1029               <phase>process-sources</phase>
1030               <configuration>
1031                 <failOnViolation>${odlparent.checkstyle.enforce}</failOnViolation>
1032                 <skip>${odlparent.checkstyle.skip}</skip>
1033                 <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
1034               </configuration>
1035             </execution>
1036           </executions>
1037         </plugin>
1038         <plugin>
1039           <groupId>org.apache.maven.plugins</groupId>
1040           <artifactId>maven-pmd-plugin</artifactId>
1041           <version>3.13.0</version>
1042           <executions>
1043             <execution>
1044               <id>cpd</id>
1045               <phase>process-sources</phase>
1046               <goals>
1047                 <goal>cpd-check</goal>
1048               </goals>
1049               <configuration>
1050                 <failOnViolation>${pmd.cpd.fail}</failOnViolation>
1051                 <!-- 100 "tokens" here correspond to approx. 5-10 lines of code -->
1052                 <minimumTokens>101</minimumTokens>
1053                 <printFailingErrors>true</printFailingErrors>
1054                 <excludeRoots>
1055                   <!-- FIXME: this should be a wildcard, but PMD is brain-damaged and does
1056                               not understand path prefixes nor wildcards. Details are available
1057                               at http://stackoverflow.com/questions/15647771/pmd-exclude-not-working
1058                               Hence people introducing new generated sources have to include
1059                               PMD config too.
1060                    -->
1061                   <excludeRoot>${project.build.directory}/generated-sources</excludeRoot>
1062                   <excludeRoot>${project.build.directory}/generated-test-sources</excludeRoot>
1063                 </excludeRoots>
1064                 <linkXRef>false</linkXRef>
1065               </configuration>
1066             </execution>
1067           </executions>
1068         </plugin>
1069         <plugin>
1070           <artifactId>maven-compiler-plugin</artifactId>
1071           <version>3.8.1</version>
1072           <configuration>
1073             <showWarnings>true</showWarnings>
1074             <compilerArgs>
1075               <arg>-parameters</arg>
1076               <arg>-Xlint:deprecation</arg>
1077               <arg>-Xlint:unchecked</arg>
1078             </compilerArgs>
1079             <annotationProcessorPaths>
1080               <dependency>
1081                 <groupId>org.immutables</groupId>
1082                 <artifactId>value</artifactId>
1083                 <!-- Keep this version in sync with dependency declaration above -->
1084                 <version>2.8.8</version>
1085               </dependency>
1086               <dependency>
1087                 <groupId>org.kohsuke.metainf-services</groupId>
1088                 <artifactId>metainf-services</artifactId>
1089                 <!-- Keep this version in sync with dependency declaration above -->
1090                 <version>1.8</version>
1091               </dependency>
1092             </annotationProcessorPaths>
1093           </configuration>
1094         </plugin>
1095         <plugin>
1096           <artifactId>maven-failsafe-plugin</artifactId>
1097           <version>2.22.2</version>
1098         </plugin>
1099         <plugin>
1100           <artifactId>maven-invoker-plugin</artifactId>
1101           <version>3.2.1</version>
1102         </plugin>
1103         <plugin>
1104           <artifactId>maven-dependency-plugin</artifactId>
1105           <executions>
1106             <execution>
1107               <id>unpack-license</id>
1108               <phase>generate-resources</phase>
1109               <goals>
1110                 <goal>copy</goal>
1111               </goals>
1112               <configuration>
1113                 <artifactItems>
1114                   <artifactItem>
1115                     <groupId>org.opendaylight.odlparent</groupId>
1116                     <artifactId>odl-license</artifactId>
1117                     <version>8.1.0-SNAPSHOT</version>
1118                     <type>license</type>
1119                     <outputDirectory>${project.build.outputDirectory}</outputDirectory>
1120                     <destFileName>LICENSE</destFileName>
1121                     <overWrite>false</overWrite>
1122                   </artifactItem>
1123                 </artifactItems>
1124                 <silent>true</silent>
1125               </configuration>
1126             </execution>
1127           </executions>
1128         </plugin>
1129
1130         <plugin>
1131           <artifactId>maven-plugin-plugin</artifactId>
1132           <version>3.6.0</version>
1133         </plugin>
1134
1135         <plugin>
1136           <artifactId>maven-remote-resources-plugin</artifactId>
1137           <version>1.7.0</version>
1138         </plugin>
1139         <plugin>
1140           <artifactId>maven-resources-plugin</artifactId>
1141           <version>3.1.0</version>
1142         </plugin>
1143         <plugin>
1144           <artifactId>maven-shade-plugin</artifactId>
1145           <version>3.2.4</version>
1146         </plugin>
1147         <plugin>
1148           <artifactId>maven-source-plugin</artifactId>
1149           <version>3.2.1</version>
1150           <executions>
1151             <execution>
1152               <id>attach-sources</id>
1153               <phase>verify</phase>
1154               <goals>
1155                 <goal>jar-no-fork</goal>
1156               </goals>
1157             </execution>
1158           </executions>
1159         </plugin>
1160         <plugin>
1161           <artifactId>maven-surefire-plugin</artifactId>
1162           <version>2.22.2</version>
1163           <configuration>
1164             <redirectTestOutputToFile>${maven.test.redirectTestOutputToFile}</redirectTestOutputToFile>
1165             <trimStackTrace>false</trimStackTrace>
1166           </configuration>
1167         </plugin>
1168
1169         <!-- Third-party plugins, grouped by groupId, alpha-sorted by artifactId -->
1170         <plugin>
1171           <!-- Support Blueprint XML construction using annotations -->
1172           <groupId>org.apache.aries.blueprint</groupId>
1173           <artifactId>blueprint-maven-plugin</artifactId>
1174           <version>1.10.0</version>
1175           <!-- TODO remove dependencies when we bump from 1.10.0 to 1.11.0 (or 1.10.1);
1176              see https://jira.opendaylight.org/browse/ODLPARENT-167 & https://jira.apache.org/jira/browse/ARIES-1826 -->
1177           <dependencies>
1178             <dependency>
1179               <groupId>org.apache.xbean</groupId>
1180               <artifactId>xbean-finder-shaded</artifactId>
1181               <version>4.18</version>
1182             </dependency>
1183           </dependencies>
1184           <configuration>
1185             <scanPaths>
1186               <scanPath>${project.groupId}</scanPath>
1187             </scanPaths>
1188           </configuration>
1189           <executions>
1190             <execution>
1191               <goals>
1192                 <goal>blueprint-generate</goal>
1193               </goals>
1194             </execution>
1195           </executions>
1196         </plugin>
1197
1198         <plugin>
1199           <groupId>org.apache.felix</groupId>
1200           <artifactId>maven-bundle-plugin</artifactId>
1201           <version>4.2.1</version>
1202           <extensions>true</extensions>
1203           <configuration>
1204             <instructions>
1205               <!-- Note the '-' for git.properties.. this is required because git-commit-id-plugin has <failOnNoGitDirectory>false,
1206                    so that the build doesn't fail if there is no .../.git/ - so git.properties is effectively optional;
1207                    and so the '-' there is needed to make the maven-bundle-plugin if that resource is not present.  -->
1208               <Include-Resource>{maven-resources},${project.build.directory}/classes/LICENSE,META-INF/git.properties=-${project.build.directory}/classes/META-INF/git.properties,META-INF/services=-${project.build.directory}/classes/META-INF/services</Include-Resource>
1209
1210               <!-- Based on https://dev.eclipse.org/mhonarc/lists/equinox-dev/msg01088.html we do want
1211                    to generate Import-Service and Export-Service headers. -->
1212               <_removeheaders>Import-Service,Export-Service</_removeheaders>
1213             </instructions>
1214           </configuration>
1215         </plugin>
1216
1217         <plugin>
1218           <groupId>org.apache.karaf.tooling</groupId>
1219           <artifactId>karaf-maven-plugin</artifactId>
1220           <version>${karaf.version}</version>
1221         </plugin>
1222
1223         <plugin>
1224           <groupId>org.apache.servicemix.tooling</groupId>
1225           <artifactId>depends-maven-plugin</artifactId>
1226           <version>1.4.0</version>
1227           <executions>
1228             <execution>
1229               <id>generate-depends-file</id>
1230               <goals>
1231                 <goal>generate-depends-file</goal>
1232               </goals>
1233             </execution>
1234           </executions>
1235         </plugin>
1236
1237         <plugin>
1238           <groupId>com.webcohesion.enunciate</groupId>
1239           <artifactId>enunciate-maven-plugin</artifactId>
1240           <!-- This must be aligned with the version of enunciate-core-annotations specified above -->
1241           <version>2.13.2</version>
1242         </plugin>
1243
1244         <plugin>
1245           <groupId>org.gaul</groupId>
1246           <artifactId>modernizer-maven-plugin</artifactId>
1247           <version>2.1.0</version>
1248           <configuration>
1249             <javaVersion>${odlparent.modernizer.target}</javaVersion>
1250             <failOnViolations>${odlparent.modernizer.enforce}</failOnViolations>
1251             <skip>${odlparent.modernizer.skip}</skip>
1252
1253             <exclusionPatterns>
1254               <!-- We are using Guava as per normal and we have grown a large body of code
1255                    around the patterns there. Furthermore the suggested replacements have
1256                    different behavior, hence we do NOT want to blindly migrate. Examples
1257                    include:
1258
1259                    - ImmutableCollection et al. are not just implementation details, they
1260                      form an API contract.
1261                    - ImmutableMap/ImmutableSet retain iteration order, whereas their
1262                      Map.of()/Set.of() counterparts have unstable iteration order (by design)
1263               -->
1264               <exclusionPattern>com/google/common/collect/Immutable.*</exclusionPattern>
1265             </exclusionPatterns>
1266           </configuration>
1267
1268           <executions>
1269             <execution>
1270               <id>modernizer</id>
1271               <phase>verify</phase>
1272               <goals>
1273                 <goal>modernizer</goal>
1274               </goals>
1275             </execution>
1276           </executions>
1277         </plugin>
1278
1279         <plugin>
1280           <groupId>com.github.spotbugs</groupId>
1281           <artifactId>spotbugs-maven-plugin</artifactId>
1282           <version>3.1.12.2</version>
1283           <dependencies>
1284             <dependency>
1285               <groupId>com.github.spotbugs</groupId>
1286               <artifactId>spotbugs</artifactId>
1287               <version>3.1.12</version>
1288             </dependency>
1289             <dependency>
1290               <groupId>org.opendaylight.odlparent</groupId>
1291               <artifactId>spotbugs</artifactId>
1292               <version>8.1.0-SNAPSHOT</version>
1293             </dependency>
1294             <dependency>
1295               <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
1296               <groupId>org.slf4j</groupId>
1297               <artifactId>slf4j-simple</artifactId>
1298               <version>1.8.0-beta2</version>
1299             </dependency>
1300           </dependencies>
1301           <configuration>
1302             <plugins>
1303               <plugin>
1304                 <groupId>jp.skypencil.findbugs.slf4j</groupId>
1305                 <artifactId>bug-pattern</artifactId>
1306                 <version>1.5.0</version>
1307               </plugin>
1308             </plugins>
1309             <!--
1310               Enables analysis which takes more memory but finds more bugs.
1311               If you run out of memory, changes the value of the effort element
1312               to 'Low'.
1313             -->
1314             <effort>Max</effort>
1315             <!-- Reports all bugs (other values are medium and max) -->
1316             <threshold>Low</threshold>
1317             <!-- Build doesn't fail if problems are found -->
1318             <failOnError>${odlparent.spotbugs.enforce}</failOnError>
1319             <skip>${odlparent.spotbugs.skip}</skip>
1320             <!-- References the excluded rules -->
1321             <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
1322             <!-- Produces XML report -->
1323             <xmlOutput>true</xmlOutput>
1324             <!-- Configures the directory in which the XML report is created -->
1325             <findbugsXmlOutputDirectory>${project.build.directory}/spotbugs</findbugsXmlOutputDirectory>
1326           </configuration>
1327           <executions>
1328             <!--
1329               Ensures that SpotBugs inspects source code when project is compiled.
1330             -->
1331             <execution>
1332               <id>analyze-compile</id>
1333               <phase>compile</phase>
1334               <goals>
1335                 <goal>check</goal>
1336               </goals>
1337             </execution>
1338           </executions>
1339         </plugin>
1340         <plugin>
1341           <groupId>org.codehaus.mojo</groupId>
1342           <artifactId>properties-maven-plugin</artifactId>
1343           <version>1.0.0</version>
1344         </plugin>
1345         <plugin>
1346           <groupId>org.eclipse.xtend</groupId>
1347           <artifactId>xtend-maven-plugin</artifactId>
1348           <!-- NOTE: This version MUST be kept in sync with the Xtend version in <dependencyManagement> -->
1349           <version>2.24.0</version>
1350           <executions>
1351             <execution>
1352               <goals>
1353                 <goal>compile</goal>
1354                 <goal>testCompile</goal>
1355               </goals>
1356               <configuration>
1357                 <outputDirectory>${project.build.directory}/generated-sources/xtend</outputDirectory>
1358                 <testOutputDirectory>${project.build.directory}/generated-test-sources/xtend</testOutputDirectory>
1359               </configuration>
1360             </execution>
1361           </executions>
1362         </plugin>
1363         <plugin>
1364           <groupId>org.eclipse.m2e</groupId>
1365           <artifactId>lifecycle-mapping</artifactId>
1366           <version>1.0.0</version>
1367           <configuration>
1368             <lifecycleMappingMetadata>
1369               <pluginExecutions>
1370                 <pluginExecution>
1371                   <pluginExecutionFilter>
1372                     <groupId>org.apache.felix</groupId>
1373                     <artifactId>maven-bundle-plugin</artifactId>
1374                     <versionRange>[1.0,)</versionRange>
1375                     <goals>
1376                       <goal>manifest</goal>
1377                     </goals>
1378                   </pluginExecutionFilter>
1379                   <action>
1380                     <execute/>
1381                   </action>
1382                 </pluginExecution>
1383                 <pluginExecution>
1384                   <pluginExecutionFilter>
1385                     <groupId>org.apache.maven.plugins</groupId>
1386                     <artifactId>maven-enforcer-plugin</artifactId>
1387                     <versionRange>[1.0.0,)</versionRange>
1388                     <goals>
1389                       <goal>enforce</goal>
1390                     </goals>
1391                   </pluginExecutionFilter>
1392                   <action>
1393                     <ignore/>
1394                   </action>
1395                 </pluginExecution>
1396                 <pluginExecution>
1397                   <pluginExecutionFilter>
1398                     <groupId>org.apache.maven.plugins</groupId>
1399                     <artifactId>maven-dependency-plugin</artifactId>
1400                     <versionRange>[2.10,)</versionRange>
1401                     <goals>
1402                       <goal>copy</goal>
1403                     </goals>
1404                   </pluginExecutionFilter>
1405                   <action>
1406                     <ignore/>
1407                   </action>
1408                 </pluginExecution>
1409                 <pluginExecution>
1410                   <pluginExecutionFilter>
1411                     <groupId>org.apache.maven.plugins</groupId>
1412                     <artifactId>maven-pmd-plugin</artifactId>
1413                     <versionRange>[3.6,)</versionRange>
1414                     <goals>
1415                       <goal>cpd-check</goal>
1416                     </goals>
1417                   </pluginExecutionFilter>
1418                   <action>
1419                     <ignore/>
1420                   </action>
1421                 </pluginExecution>
1422                 <!-- The plugin will eventually be removed, remove this too at that point -->
1423                 <pluginExecution>
1424                   <pluginExecutionFilter>
1425                     <groupId>org.apache.maven.plugins</groupId>
1426                     <artifactId>maven-antrun-plugin</artifactId>
1427                     <versionRange>[1.8,)</versionRange>
1428                     <goals>
1429                       <goal>run</goal>
1430                     </goals>
1431                   </pluginExecutionFilter>
1432                   <action>
1433                     <ignore/>
1434                   </action>
1435                 </pluginExecution>
1436                 <pluginExecution>
1437                   <pluginExecutionFilter>
1438                     <groupId>org.apache.servicemix.tooling</groupId>
1439                     <artifactId>depends-maven-plugin</artifactId>
1440                     <versionRange>[1.2,)</versionRange>
1441                     <goals>
1442                       <goal>generate-depends-file</goal>
1443                     </goals>
1444                   </pluginExecutionFilter>
1445                   <action>
1446                     <execute/>
1447                   </action>
1448                 </pluginExecution>
1449                 <pluginExecution>
1450                   <pluginExecutionFilter>
1451                     <groupId>org.jacoco</groupId>
1452                     <artifactId>jacoco-maven-plugin</artifactId>
1453                     <versionRange>[0.7.0,)</versionRange>
1454                     <goals>
1455                       <goal>prepare-agent</goal>
1456                     </goals>
1457                   </pluginExecutionFilter>
1458                   <action>
1459                     <ignore/>
1460                   </action>
1461                 </pluginExecution>
1462
1463                 <pluginExecution>
1464                   <pluginExecutionFilter>
1465                     <groupId>org.ops4j.pax.exam</groupId>
1466                     <artifactId>maven-paxexam-plugin</artifactId>
1467                     <versionRange>[1.2.4,)</versionRange>
1468                     <goals>
1469                       <goal>generate-depends-file</goal>
1470                     </goals>
1471                   </pluginExecutionFilter>
1472                   <action>
1473                     <ignore/>
1474                   </action>
1475                 </pluginExecution>
1476
1477                 <pluginExecution>
1478                   <pluginExecutionFilter>
1479                     <groupId>org.basepom.maven</groupId>
1480                     <artifactId>
1481                       duplicate-finder-maven-plugin
1482                     </artifactId>
1483                     <versionRange>[1.2.1,)</versionRange>
1484                     <goals>
1485                       <goal>check</goal>
1486                     </goals>
1487                   </pluginExecutionFilter>
1488                   <action>
1489                     <ignore></ignore>
1490                   </action>
1491                 </pluginExecution>
1492               </pluginExecutions>
1493             </lifecycleMappingMetadata>
1494           </configuration>
1495         </plugin>
1496
1497         <plugin>
1498           <groupId>org.jacoco</groupId>
1499           <artifactId>jacoco-maven-plugin</artifactId>
1500           <configuration>
1501             <!-- Note: This exclusion list should match <sonar.exclusions>
1502                        property above -->
1503             <excludes>
1504               <exclude>**/gen/**</exclude>
1505               <exclude>**/generated-sources/**</exclude>
1506               <exclude>**/generated-test-sources/**</exclude>
1507               <exclude>**/yang-gen/**</exclude>
1508               <exclude>**/yang-gen-config/**</exclude>
1509               <exclude>**/yang-gen-sal/**</exclude>
1510               <exclude>**/yang-gen-code/**</exclude>
1511               <exclude>**/pax/**</exclude>
1512             </excludes>
1513           </configuration>
1514         </plugin>
1515
1516         <plugin>
1517           <groupId>org.ops4j.pax.exam</groupId>
1518           <artifactId>maven-paxexam-plugin</artifactId>
1519           <version>1.2.4</version>
1520         </plugin>
1521
1522         <!-- When updating this version, consider antl4-runtime above -->
1523         <plugin>
1524           <groupId>org.antlr</groupId>
1525           <artifactId>antlr4-maven-plugin</artifactId>
1526           <version>4.8-1</version>
1527         </plugin>
1528       </plugins>
1529     </pluginManagement>
1530
1531     <plugins>
1532       <plugin>
1533         <artifactId>maven-enforcer-plugin</artifactId>
1534         <executions>
1535           <execution>
1536             <id>enforce-banned-dependencies</id>
1537             <goals>
1538               <goal>enforce</goal>
1539             </goals>
1540             <configuration>
1541               <rules>
1542                 <bannedDependencies>
1543                   <message>Please always use mockito-core instead of mockito-all (see https://bugs.opendaylight.org/show_bug.cgi?id=7662), and spotbugs:annotations instead of findbugs:annotations</message>
1544                   <excludes>
1545                     <exclude>org.mockito:mockito-all</exclude>
1546                     <exclude>com.google.code.findbugs:annotations</exclude>
1547                   </excludes>
1548                 </bannedDependencies>
1549               </rules>
1550               <fail>true</fail>
1551             </configuration>
1552           </execution>
1553         </executions>
1554       </plugin>
1555       <plugin>
1556         <groupId>org.basepom.maven</groupId>
1557         <artifactId>duplicate-finder-maven-plugin</artifactId>
1558         <version>1.4.0</version>
1559         <executions>
1560           <execution>
1561             <id>find-duplicate-classpath-entries</id>
1562             <phase>verify</phase>
1563             <goals>
1564               <goal>check</goal>
1565             </goals>
1566           </execution>
1567         </executions>
1568         <configuration>
1569             <!-- https://github.com/basepom/duplicate-finder-maven-plugin/wiki -->
1570             <failBuildInCaseOfConflict>false</failBuildInCaseOfConflict>
1571             <failBuildInCaseOfDifferentContentConflict>true</failBuildInCaseOfDifferentContentConflict>
1572             <failBuildInCaseOfEqualContentConflict>false</failBuildInCaseOfEqualContentConflict>
1573             <printEqualFiles>false</printEqualFiles>
1574             <quiet>true</quiet>
1575             <!-- In addition to https://github.com/basepom/duplicate-finder-maven-plugin/wiki/Default%20ignored%20elements,
1576                  as explained on https://github.com/basepom/duplicate-finder-maven-plugin/wiki/Ignoring%20Dependencies%20and%20Resources,
1577                  we use resources not dependencies (see https://github.com/basepom/duplicate-finder-maven-plugin/wiki/Classpath%20Exceptions)
1578                  also ignore: -->
1579             <ignoredResourcePatterns>
1580               <ignoredResourcePattern>org/opendaylight/blueprint/.*\.xml$</ignoredResourcePattern>
1581               <ignoredResourcePattern>OSGI-OPT/bnd.bnd$</ignoredResourcePattern>
1582               <ignoredResourcePattern>WEB-INF/web.xml</ignoredResourcePattern>
1583               <ignoredResourcePattern>README.*$</ignoredResourcePattern>
1584               <ignoredResourcePattern>.*\.html$</ignoredResourcePattern>
1585               <ignoredResourcePattern>reference.conf</ignoredResourcePattern>
1586             </ignoredResourcePatterns>
1587             <ignoredDependencies>
1588               <ignoredDependency>
1589                 <groupId>org.slf4j</groupId>
1590                 <artifactId>slf4j-simple</artifactId>
1591               </ignoredDependency>
1592               <ignoredDependency>
1593                 <groupId>org.opendaylight.odlparent</groupId>
1594                 <artifactId>opendaylight-karaf-empty</artifactId>
1595               </ignoredDependency>
1596             </ignoredDependencies>
1597         </configuration>
1598       </plugin>
1599       <plugin>
1600         <artifactId>maven-dependency-plugin</artifactId>
1601       </plugin>
1602       <plugin>
1603         <artifactId>maven-checkstyle-plugin</artifactId>
1604       </plugin>
1605       <plugin>
1606           <artifactId>maven-pmd-plugin</artifactId>
1607       </plugin>
1608       <plugin>
1609         <artifactId>maven-source-plugin</artifactId>
1610       </plugin>
1611       <plugin>
1612         <artifactId>maven-javadoc-plugin</artifactId>
1613       </plugin>
1614       <plugin>
1615         <groupId>org.gaul</groupId>
1616         <artifactId>modernizer-maven-plugin</artifactId>
1617       </plugin>
1618       <plugin>
1619         <groupId>com.github.spotbugs</groupId>
1620         <artifactId>spotbugs-maven-plugin</artifactId>
1621       </plugin>
1622
1623       <!-- Jacoco / Sonar -->
1624       <plugin>
1625         <groupId>org.jacoco</groupId>
1626         <artifactId>jacoco-maven-plugin</artifactId>
1627         <executions>
1628           <execution>
1629             <id>pre-unit-test</id>
1630             <goals>
1631               <goal>prepare-agent</goal>
1632             </goals>
1633           </execution>
1634           <execution>
1635             <id>report</id>
1636             <goals>
1637               <goal>report</goal>
1638             </goals>
1639           </execution>
1640         </executions>
1641       </plugin>
1642
1643       <plugin>
1644         <groupId>com.alexecollins.maven.plugin</groupId>
1645         <artifactId>script-maven-plugin</artifactId>
1646         <version>1.0.0</version>
1647         <executions>
1648            <execution>
1649              <phase>prepare-package</phase>
1650              <goals>
1651                <goal>execute</goal>
1652              </goals>
1653              <configuration>
1654                <script>
1655                  // BeanShell is 2005-ish and thus doesn't support generics, varargs, try-with-resources or lambdas, so:
1656                  // (If we do this kind of inline code in pom.xml more often, we shold have a new simple module in
1657                  //  odl-parent, which has *.java that we compile, and then just depend on it here and call one-line
1658                  //  static class methods only - it will be MUCH easier to write!)
1659                  void copy(File root, String glob, File target) {
1660                      java.nio.file.DirectoryStream dirStream = java.nio.file.Files.newDirectoryStream(root.toPath(), glob);
1661                      Iterator dirStreamIterator = dirStream.iterator();
1662                      while (dirStreamIterator.hasNext()) {
1663                          java.nio.file.Path path = dirStreamIterator.next();
1664                          java.nio.file.Files.copy(path, new File(target, path.toFile().getName()).toPath(),
1665                              new java.nio.file.CopyOption[] {
1666                                  java.nio.file.StandardCopyOption.REPLACE_EXISTING,
1667                                  java.nio.file.StandardCopyOption.COPY_ATTRIBUTES
1668                              }
1669                          );
1670                      }
1671                      dirStream.close();
1672                  }
1673
1674                  File gitRepoRootDir = project.basedir;
1675                  while (!new File(gitRepoRootDir, ".git").exists() &amp;&amp; gitRepoRootDir.getParentFile() != null) {
1676                      gitRepoRootDir = gitRepoRootDir.getParentFile();
1677                  }
1678
1679                  File target = new File(project.build.outputDirectory);
1680                  target.mkdirs();
1681                  copy(gitRepoRootDir, "README*", target);
1682                  copy(gitRepoRootDir, "CONTRIBUTING*", target);
1683                  copy(gitRepoRootDir, "PROJECT_INFO.yaml", target);
1684                </script>
1685              </configuration>
1686            </execution>
1687          </executions>
1688          <dependencies>
1689            <dependency>
1690              <groupId>org.apache-extras.beanshell</groupId>
1691              <artifactId>bsh</artifactId>
1692              <version>2.0b6</version>
1693            </dependency>
1694          </dependencies>
1695       </plugin>
1696     </plugins>
1697   </build>
1698
1699   <reporting>
1700     <plugins>
1701       <plugin>
1702         <artifactId>maven-checkstyle-plugin</artifactId>
1703         <version>3.1.0</version>
1704       </plugin>
1705
1706       <!-- FIXME: activate this
1707       <plugin>
1708         <artifactId>maven-project-info-reports-plugin</artifactId>
1709       </plugin-->
1710       <plugin>
1711         <groupId>org.codehaus.mojo</groupId>
1712         <artifactId>jdepend-maven-plugin</artifactId>
1713         <reportSets>
1714           <reportSet>
1715             <reports>
1716               <report>generate-no-fork</report>
1717             </reports>
1718           </reportSet>
1719         </reportSets>
1720       </plugin>
1721     </plugins>
1722   </reporting>
1723 </project>
1724