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