99851ee38ef4437de10fc85d4f440c99d579561a
[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.1-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.68</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.1-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.39</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.58.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
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       <dependency>
556         <groupId>org.osgi</groupId>
557         <artifactId>org.osgi.service.component.annotations</artifactId>
558         <version>1.4.0</version>
559         <scope>provided</scope>
560       </dependency>
561       <dependency>
562         <groupId>org.osgi</groupId>
563         <artifactId>org.osgi.service.metatype.annotations</artifactId>
564         <version>1.4.0</version>
565       </dependency>
566
567       <dependency>
568         <groupId>org.osgi</groupId>
569         <artifactId>osgi.annotation</artifactId>
570         <version>7.0.0</version>
571         <scope>provided</scope>
572       </dependency>
573       <dependency>
574         <groupId>org.osgi</groupId>
575         <artifactId>osgi.cmpn</artifactId>
576         <version>7.0.0</version>
577         <scope>provided</scope>
578       </dependency>
579       <dependency>
580         <groupId>org.osgi</groupId>
581         <artifactId>osgi.core</artifactId>
582         <version>7.0.0</version>
583         <scope>provided</scope>
584       </dependency>
585       <!-- For backwards compatibility -->
586       <!-- FIXME: 9.0.0: remove this declaration -->
587       <dependency>
588         <groupId>org.osgi</groupId>
589         <artifactId>org.osgi.core</artifactId>
590         <version>6.0.0</version>
591         <scope>provided</scope>
592       </dependency>
593
594       <dependency>
595         <groupId>org.osgi</groupId>
596         <!-- for https://bugs.opendaylight.org/show_bug.cgi?id=4290 -->
597         <artifactId>org.osgi.service.event</artifactId>
598         <version>1.4.0</version>
599       </dependency>
600       <dependency>
601         <groupId>org.apache.aries.quiesce</groupId>
602         <artifactId>org.apache.aries.quiesce.api</artifactId>
603         <version>1.0.0</version>
604       </dependency>
605
606       <!-- LMAX Disruptor -->
607       <dependency>
608         <groupId>com.lmax</groupId>
609         <artifactId>disruptor</artifactId>
610         <version>3.4.2</version>
611       </dependency>
612
613       <!-- Add Pax Exam -->
614       <dependency>
615         <groupId>org.ops4j.pax.exam</groupId>
616         <artifactId>pax-exam</artifactId>
617         <version>4.13.4</version>
618         <scope>test</scope>
619       </dependency>
620       <dependency>
621         <groupId>org.ops4j.pax.exam</groupId>
622         <artifactId>pax-exam-container-forked</artifactId>
623         <version>4.13.4</version>
624         <scope>test</scope>
625       </dependency>
626       <dependency>
627         <groupId>org.ops4j.pax.exam</groupId>
628         <artifactId>pax-exam-container-karaf</artifactId>
629         <version>4.13.4</version>
630         <scope>test</scope>
631       </dependency>
632       <dependency>
633         <groupId>org.ops4j.pax.exam</groupId>
634         <artifactId>pax-exam-container-native</artifactId>
635         <version>4.13.4</version>
636         <scope>test</scope>
637       </dependency>
638       <dependency>
639         <groupId>org.ops4j.pax.exam</groupId>
640         <artifactId>pax-exam-extender-service</artifactId>
641         <version>4.13.4</version>
642         <scope>test</scope>
643       </dependency>
644       <dependency>
645         <groupId>org.ops4j.pax.exam</groupId>
646         <artifactId>pax-exam-inject</artifactId>
647         <version>4.13.4</version>
648         <scope>test</scope>
649       </dependency>
650       <dependency>
651         <groupId>org.ops4j.pax.exam</groupId>
652         <artifactId>pax-exam-invoker-junit</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-features</artifactId>
659         <version>4.13.4</version>
660         <type>xml</type>
661         <scope>test</scope>
662       </dependency>
663       <dependency>
664         <groupId>org.ops4j.pax.exam</groupId>
665         <artifactId>pax-exam-junit4</artifactId>
666         <version>4.13.4</version>
667         <scope>test</scope>
668       </dependency>
669       <dependency>
670         <groupId>org.ops4j.pax.exam</groupId>
671         <artifactId>pax-exam-link-mvn</artifactId>
672         <version>4.13.4</version>
673         <scope>test</scope>
674       </dependency>
675       <dependency>
676         <groupId>org.ops4j.pax.exam</groupId>
677         <artifactId>pax-exam-link-assembly</artifactId>
678         <version>4.13.4</version>
679         <scope>test</scope>
680       </dependency>
681
682       <dependency>
683         <groupId>org.ops4j.pax.url</groupId>
684         <artifactId>pax-url-link</artifactId>
685         <version>2.5.4</version>
686         <scope>test</scope>
687       </dependency>
688       <dependency>
689         <groupId>org.ops4j.pax.url</groupId>
690         <artifactId>pax-url-aether</artifactId>
691         <version>2.5.4</version>
692         <scope>test</scope>
693       </dependency>
694       <dependency>
695         <groupId>org.ops4j.pax.url</groupId>
696         <artifactId>pax-url-wrap</artifactId>
697         <version>2.5.4</version>
698       </dependency>
699
700       <dependency>
701         <groupId>org.ops4j.pax.web</groupId>
702         <artifactId>pax-web-api</artifactId>
703         <!-- Note: keep this version synchronized with karaf -->
704         <version>7.3.9</version>
705       </dependency>
706
707       <dependency>
708         <groupId>org.springframework.osgi</groupId>
709         <artifactId>spring-osgi-mock</artifactId>
710         <version>1.2.1</version>
711         <scope>test</scope>
712       </dependency>
713
714       <dependency>
715         <groupId>org.xmlunit</groupId>
716         <artifactId>xmlunit-core</artifactId>
717         <version>2.8.2</version>
718         <scope>test</scope>
719       </dependency>
720       <dependency>
721         <groupId>org.xmlunit</groupId>
722         <artifactId>xmlunit-assertj</artifactId>
723         <version>2.8.2</version>
724         <scope>test</scope>
725       </dependency>
726       <dependency>
727         <groupId>org.xmlunit</groupId>
728         <artifactId>xmlunit-assertj3</artifactId>
729         <version>2.8.2</version>
730         <scope>test</scope>
731       </dependency>
732       <dependency>
733         <groupId>org.xmlunit</groupId>
734         <artifactId>xmlunit-matchers</artifactId>
735         <version>2.8.2</version>
736         <scope>test</scope>
737       </dependency>
738       <!-- FIXME: remove this once we have migrated over -->
739       <dependency>
740         <groupId>org.xmlunit</groupId>
741         <artifactId>xmlunit-legacy</artifactId>
742         <version>2.8.2</version>
743         <scope>test</scope>
744       </dependency>
745
746       <!-- Annotations for modernizer-maven-plugin -->
747       <dependency>
748         <groupId>org.gaul</groupId>
749         <artifactId>modernizer-maven-annotations</artifactId>
750         <!-- This should match the plugin version below -->
751         <version>2.1.0</version>
752         <scope>provided</scope>
753       </dependency>
754
755       <dependency>
756         <groupId>org.eclipse.jetty</groupId>
757         <artifactId>jetty-bom</artifactId>
758         <version>9.4.31.v20200723</version>
759         <scope>import</scope>
760         <type>pom</type>
761       </dependency>
762
763       <dependency>
764         <groupId>com.h2database</groupId>
765         <artifactId>h2</artifactId>
766         <version>1.4.200</version>
767       </dependency>
768
769       <!-- Xtend http://xtend-lang.org
770            NOTE: When you increase the version here,
771            then remember to also increase it for the
772            xtend-maven-plugin below! (We don't want to
773            use a Maven property, in order not to "leak" that.)
774        -->
775       <dependency>
776           <groupId>org.eclipse.xtend</groupId>
777           <artifactId>org.eclipse.xtend.lib</artifactId>
778           <version>2.24.0</version>
779       </dependency>
780       <dependency>
781           <groupId>org.eclipse.xtend</groupId>
782           <artifactId>org.eclipse.xtend.lib.macro</artifactId>
783           <version>2.24.0</version>
784       </dependency>
785       <dependency>
786           <groupId>org.eclipse.xtext</groupId>
787           <artifactId>org.eclipse.xtext.xbase.lib</artifactId>
788           <version>2.24.0</version>
789       </dependency>
790
791       <!-- Annotations -->
792       <!-- FIXME: ODLPARENT-246: remove this declaration -->
793       <dependency>
794         <groupId>javax.inject</groupId>
795         <artifactId>javax.inject</artifactId>
796         <version>1</version>
797         <optional>true</optional>
798       </dependency>
799       <!-- A better alternative for javax.inject, from https://guicedee.com/ -->
800       <dependency>
801         <groupId>com.guicedee.services</groupId>
802         <artifactId>javax.inject</artifactId>
803         <version>1.0.20.0</version>
804         <scope>provided</scope>
805         <optional>true</optional>
806       </dependency>
807
808       <!-- jung, a graph library -->
809       <dependency>
810         <groupId>net.sf.jung</groupId>
811         <artifactId>jung-api</artifactId>
812         <version>2.1.1</version>
813       </dependency>
814       <dependency>
815         <groupId>net.sf.jung</groupId>
816         <artifactId>jung-algorithms</artifactId>
817         <version>2.1.1</version>
818       </dependency>
819       <dependency>
820         <groupId>net.sf.jung</groupId>
821         <artifactId>jung-graph-impl</artifactId>
822         <version>2.1.1</version>
823       </dependency>
824
825       <!-- Karaf console support -->
826       <dependency>
827         <groupId>org.apache.karaf.shell</groupId>
828         <artifactId>org.apache.karaf.shell.core</artifactId>
829         <version>${karaf.version}</version>
830         <scope>provided</scope>
831       </dependency>
832       <dependency>
833         <groupId>org.apache.karaf.shell</groupId>
834         <artifactId>org.apache.karaf.shell.console</artifactId>
835         <version>${karaf.version}</version>
836         <scope>provided</scope>
837       </dependency>
838
839       <!-- ThreeTen-Extra, date/time complements -->
840       <dependency>
841         <groupId>org.threeten</groupId>
842         <artifactId>threeten-extra</artifactId>
843         <version>1.5.0</version>
844       </dependency>
845
846       <!-- When updating this version, consider antl4-maven-plugin below -->
847       <dependency>
848         <groupId>org.antlr</groupId>
849         <artifactId>antlr4-runtime</artifactId>
850         <version>4.8-1</version>
851       </dependency>
852       <!-- Aries' Blueprint version should be kept in sync to the version actually
853            used by our ${karaf[4].version} ... please bump this when increasing that.
854            TODO Find a smarter way to inherit this from a (TBD..) Karaf artifacts BOM! -->
855       <dependency>
856         <groupId>org.apache.aries.blueprint</groupId>
857         <artifactId>org.apache.aries.blueprint.core</artifactId>
858         <version>1.10.2</version>
859       </dependency>
860       <dependency>
861         <groupId>org.apache.aries.blueprint</groupId>
862         <artifactId>blueprint-maven-plugin-annotation</artifactId>
863         <version>1.3.0</version>
864         <optional>true</optional>
865       </dependency>
866
867       <!-- TrieMap library -->
868       <dependency>
869         <groupId>tech.pantheon.triemap</groupId>
870         <artifactId>bom</artifactId>
871         <version>1.2.0</version>
872         <scope>import</scope>
873         <type>pom</type>
874       </dependency>
875
876       <!-- Dropwizard metrics -->
877       <dependency>
878         <groupId>io.dropwizard.metrics</groupId>
879         <artifactId>metrics-bom</artifactId>
880         <version>4.1.12.1</version>
881         <scope>import</scope>
882         <type>pom</type>
883       </dependency>
884
885       <!-- JAXB for Java 11+, match this with Karaf -->
886       <dependency>
887         <groupId>jakarta.xml.bind</groupId>
888         <artifactId>jakarta.xml.bind-api</artifactId>
889         <version>2.3.2</version>
890       </dependency>
891       <dependency>
892         <groupId>org.glassfish.jaxb</groupId>
893         <artifactId>jaxb-runtime</artifactId>
894         <version>2.3.2</version>
895       </dependency>
896     </dependencies>
897   </dependencyManagement>
898
899   <dependencies>
900     <!--
901          We expect slf4j-api to be provided by the platform.
902          Karaf provides it, other containers need to provide it themselves.
903     -->
904     <dependency>
905       <groupId>org.slf4j</groupId>
906       <artifactId>slf4j-api</artifactId>
907       <scope>provided</scope>
908     </dependency>
909
910     <!--
911           Enable useful code quality annotations everywhere. Since these annotations
912           are not required at runtime.
913     -->
914     <dependency>
915       <groupId>org.eclipse.jdt</groupId>
916       <artifactId>org.eclipse.jdt.annotation</artifactId>
917       <scope>provided</scope>
918     </dependency>
919     <dependency>
920       <groupId>com.github.spotbugs</groupId>
921       <artifactId>spotbugs-annotations</artifactId>
922       <scope>provided</scope>
923       <optional>true</optional>
924     </dependency>
925     <dependency>
926       <groupId>org.gaul</groupId>
927       <artifactId>modernizer-maven-annotations</artifactId>
928       <scope>provided</scope>
929     </dependency>
930
931     <!--
932           Testing output should be routed through slf4j-simple.
933     -->
934     <dependency>
935       <groupId>org.slf4j</groupId>
936       <artifactId>slf4j-simple</artifactId>
937       <scope>test</scope>
938     </dependency>
939
940     <!--
941           Unit tests can use JUnit + Mockito + Hamcrest by default.
942     -->
943     <dependency>
944       <groupId>org.hamcrest</groupId>
945       <artifactId>hamcrest</artifactId>
946       <scope>test</scope>
947     </dependency>
948     <dependency>
949       <!-- This dependency needs to come before junit until we upgrade to JUnit 5. -->
950       <groupId>org.hamcrest</groupId>
951       <artifactId>hamcrest-library</artifactId>
952       <scope>test</scope>
953     </dependency>
954     <dependency>
955       <groupId>junit</groupId>
956       <artifactId>junit</artifactId>
957       <scope>test</scope>
958     </dependency>
959     <dependency>
960       <groupId>org.mockito</groupId>
961       <artifactId>mockito-core</artifactId>
962       <scope>test</scope>
963     </dependency>
964   </dependencies>
965
966   <build>
967     <pluginManagement>
968       <plugins>
969         <!-- Official maven plugins, alpha-sorted by artifactId.
970              We do not need to specify the groupId. -->
971         <plugin>
972           <artifactId>maven-checkstyle-plugin</artifactId>
973           <version>3.1.1</version>
974           <dependencies>
975             <dependency>
976               <groupId>com.puppycrawl.tools</groupId>
977               <artifactId>checkstyle</artifactId>
978               <!-- This should match the dependency management on com.puppycrawl.tools:checkstyle above -->
979               <version>8.39</version>
980             </dependency>
981             <dependency>
982               <groupId>org.opendaylight.odlparent</groupId>
983               <artifactId>checkstyle</artifactId>
984               <version>8.1.1-SNAPSHOT</version>
985             </dependency>
986             <dependency>
987               <groupId>com.github.sevntu-checkstyle</groupId>
988               <artifactId>sevntu-checks</artifactId>
989               <version>1.38.0</version>
990             </dependency>
991           </dependencies>
992           <configuration>
993             <configLocation>odl_checks.xml</configLocation>
994             <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
995             <!-- <sourceDirectories> are needed so that checkstyle ignores the
996                  generated sources directory -->
997             <sourceDirectories>
998               <directory>${project.build.sourceDirectory}</directory>
999             </sourceDirectories>
1000             <includeResources>true</includeResources>
1001             <includeTestSourceDirectory>true</includeTestSourceDirectory>
1002             <includeTestResources>true</includeTestResources>
1003             <includes>**\/*.java, **\/*.xtend</includes>
1004             <excludes>
1005               org/opendaylight/yang/gen/**,
1006               **/protobuff/messages/**,
1007               **/thrift/gen/*.java,
1008               **/module-info.java
1009             </excludes>
1010             <failsOnError>false</failsOnError>
1011             <consoleOutput>true</consoleOutput>
1012           </configuration>
1013           <executions>
1014             <execution>
1015               <id>check-license</id>
1016               <goals>
1017                 <goal>check</goal>
1018               </goals>
1019               <phase>process-sources</phase>
1020               <configuration>
1021                 <configLocation>check-license.xml</configLocation>
1022                 <headerLocation>EPL-LICENSE.regexp.txt</headerLocation>
1023                 <includeResources>false</includeResources>
1024                 <includeTestSourceDirectory>true</includeTestSourceDirectory>
1025                 <includeTestResources>false</includeTestResources>
1026                 <sourceDirectories>
1027                   <directory>${project.build.sourceDirectory}</directory>
1028                 </sourceDirectories>
1029                 <excludes>
1030                   org/opendaylight/yang/gen/**,
1031                   **/protobuff/messages/**,
1032                   **/thrift/gen/*.java
1033                 </excludes>
1034                 <failsOnError>false</failsOnError>
1035                 <consoleOutput>true</consoleOutput>
1036               </configuration>
1037             </execution>
1038             <execution>
1039               <goals>
1040                 <goal>check</goal>
1041               </goals>
1042               <phase>process-sources</phase>
1043               <configuration>
1044                 <failOnViolation>${odlparent.checkstyle.enforce}</failOnViolation>
1045                 <skip>${odlparent.checkstyle.skip}</skip>
1046                 <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
1047               </configuration>
1048             </execution>
1049           </executions>
1050         </plugin>
1051         <plugin>
1052           <groupId>org.apache.maven.plugins</groupId>
1053           <artifactId>maven-pmd-plugin</artifactId>
1054           <version>3.14.0</version>
1055           <executions>
1056             <execution>
1057               <id>cpd</id>
1058               <phase>process-sources</phase>
1059               <goals>
1060                 <goal>cpd-check</goal>
1061               </goals>
1062               <configuration>
1063                 <failOnViolation>${pmd.cpd.fail}</failOnViolation>
1064                 <!-- 100 "tokens" here correspond to approx. 5-10 lines of code -->
1065                 <minimumTokens>101</minimumTokens>
1066                 <printFailingErrors>true</printFailingErrors>
1067                 <excludeRoots>
1068                   <!-- FIXME: this should be a wildcard, but PMD is brain-damaged and does
1069                               not understand path prefixes nor wildcards. Details are available
1070                               at http://stackoverflow.com/questions/15647771/pmd-exclude-not-working
1071                               Hence people introducing new generated sources have to include
1072                               PMD config too.
1073                    -->
1074                   <excludeRoot>${project.build.directory}/generated-sources</excludeRoot>
1075                   <excludeRoot>${project.build.directory}/generated-test-sources</excludeRoot>
1076                 </excludeRoots>
1077                 <linkXRef>false</linkXRef>
1078               </configuration>
1079             </execution>
1080           </executions>
1081         </plugin>
1082         <plugin>
1083           <artifactId>maven-compiler-plugin</artifactId>
1084           <version>3.8.1</version>
1085           <configuration>
1086             <showWarnings>true</showWarnings>
1087             <compilerArgs>
1088               <arg>-parameters</arg>
1089               <arg>-Xlint:deprecation</arg>
1090               <arg>-Xlint:unchecked</arg>
1091             </compilerArgs>
1092             <annotationProcessorPaths>
1093               <dependency>
1094                 <groupId>org.immutables</groupId>
1095                 <artifactId>value</artifactId>
1096                 <!-- Keep this version in sync with dependency declaration above -->
1097                 <version>2.8.8</version>
1098               </dependency>
1099               <dependency>
1100                 <groupId>org.kohsuke.metainf-services</groupId>
1101                 <artifactId>metainf-services</artifactId>
1102                 <!-- Keep this version in sync with dependency declaration above -->
1103                 <version>1.8</version>
1104               </dependency>
1105             </annotationProcessorPaths>
1106           </configuration>
1107         </plugin>
1108         <plugin>
1109           <artifactId>maven-failsafe-plugin</artifactId>
1110           <version>2.22.2</version>
1111         </plugin>
1112         <plugin>
1113           <artifactId>maven-invoker-plugin</artifactId>
1114           <version>3.2.1</version>
1115         </plugin>
1116         <plugin>
1117           <artifactId>maven-dependency-plugin</artifactId>
1118           <executions>
1119             <execution>
1120               <id>unpack-license</id>
1121               <phase>generate-resources</phase>
1122               <goals>
1123                 <goal>copy</goal>
1124               </goals>
1125               <configuration>
1126                 <artifactItems>
1127                   <artifactItem>
1128                     <groupId>org.opendaylight.odlparent</groupId>
1129                     <artifactId>odl-license</artifactId>
1130                     <version>8.1.1-SNAPSHOT</version>
1131                     <type>license</type>
1132                     <outputDirectory>${project.build.outputDirectory}</outputDirectory>
1133                     <destFileName>LICENSE</destFileName>
1134                     <overWrite>false</overWrite>
1135                   </artifactItem>
1136                 </artifactItems>
1137                 <silent>true</silent>
1138               </configuration>
1139             </execution>
1140           </executions>
1141         </plugin>
1142
1143         <plugin>
1144           <artifactId>maven-plugin-plugin</artifactId>
1145           <version>3.6.0</version>
1146         </plugin>
1147
1148         <plugin>
1149           <artifactId>maven-remote-resources-plugin</artifactId>
1150           <version>1.7.0</version>
1151         </plugin>
1152         <plugin>
1153           <artifactId>maven-shade-plugin</artifactId>
1154           <version>3.2.4</version>
1155         </plugin>
1156         <plugin>
1157           <artifactId>maven-source-plugin</artifactId>
1158           <version>3.2.1</version>
1159           <executions>
1160             <execution>
1161               <id>attach-sources</id>
1162               <phase>verify</phase>
1163               <goals>
1164                 <goal>jar-no-fork</goal>
1165               </goals>
1166             </execution>
1167           </executions>
1168         </plugin>
1169         <plugin>
1170           <artifactId>maven-surefire-plugin</artifactId>
1171           <version>2.22.2</version>
1172           <configuration>
1173             <redirectTestOutputToFile>${maven.test.redirectTestOutputToFile}</redirectTestOutputToFile>
1174             <trimStackTrace>false</trimStackTrace>
1175           </configuration>
1176         </plugin>
1177
1178         <!-- Third-party plugins, grouped by groupId, alpha-sorted by artifactId -->
1179         <plugin>
1180           <!-- Support Blueprint XML construction using annotations -->
1181           <groupId>org.apache.aries.blueprint</groupId>
1182           <artifactId>blueprint-maven-plugin</artifactId>
1183           <version>1.10.0</version>
1184           <!-- TODO remove dependencies when we bump from 1.10.0 to 1.11.0 (or 1.10.1);
1185              see https://jira.opendaylight.org/browse/ODLPARENT-167 & https://jira.apache.org/jira/browse/ARIES-1826 -->
1186           <dependencies>
1187             <dependency>
1188               <groupId>org.apache.xbean</groupId>
1189               <artifactId>xbean-finder-shaded</artifactId>
1190               <version>4.18</version>
1191             </dependency>
1192           </dependencies>
1193           <configuration>
1194             <scanPaths>
1195               <scanPath>${project.groupId}</scanPath>
1196             </scanPaths>
1197           </configuration>
1198           <executions>
1199             <execution>
1200               <goals>
1201                 <goal>blueprint-generate</goal>
1202               </goals>
1203             </execution>
1204           </executions>
1205         </plugin>
1206
1207         <plugin>
1208           <groupId>org.apache.felix</groupId>
1209           <artifactId>maven-bundle-plugin</artifactId>
1210           <version>4.2.1</version>
1211           <extensions>true</extensions>
1212           <configuration>
1213             <instructions>
1214               <!-- Note the '-' for git.properties.. this is required because git-commit-id-plugin has <failOnNoGitDirectory>false,
1215                    so that the build doesn't fail if there is no .../.git/ - so git.properties is effectively optional;
1216                    and so the '-' there is needed to make the maven-bundle-plugin if that resource is not present.  -->
1217               <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>
1218
1219               <!-- Based on https://dev.eclipse.org/mhonarc/lists/equinox-dev/msg01088.html we do want
1220                    to generate Import-Service and Export-Service headers. -->
1221               <_removeheaders>Import-Service,Export-Service</_removeheaders>
1222             </instructions>
1223           </configuration>
1224         </plugin>
1225
1226         <plugin>
1227           <groupId>org.apache.karaf.tooling</groupId>
1228           <artifactId>karaf-maven-plugin</artifactId>
1229           <version>${karaf.version}</version>
1230         </plugin>
1231
1232         <plugin>
1233           <groupId>org.apache.servicemix.tooling</groupId>
1234           <artifactId>depends-maven-plugin</artifactId>
1235           <version>1.4.0</version>
1236           <executions>
1237             <execution>
1238               <id>generate-depends-file</id>
1239               <goals>
1240                 <goal>generate-depends-file</goal>
1241               </goals>
1242             </execution>
1243           </executions>
1244         </plugin>
1245
1246         <plugin>
1247           <groupId>com.webcohesion.enunciate</groupId>
1248           <artifactId>enunciate-maven-plugin</artifactId>
1249           <!-- This must be aligned with the version of enunciate-core-annotations specified above -->
1250           <version>2.13.2</version>
1251         </plugin>
1252
1253         <plugin>
1254           <groupId>org.gaul</groupId>
1255           <artifactId>modernizer-maven-plugin</artifactId>
1256           <version>2.1.0</version>
1257           <configuration>
1258             <javaVersion>${odlparent.modernizer.target}</javaVersion>
1259             <failOnViolations>${odlparent.modernizer.enforce}</failOnViolations>
1260             <skip>${odlparent.modernizer.skip}</skip>
1261
1262             <exclusionPatterns>
1263               <!-- We are using Guava as per normal and we have grown a large body of code
1264                    around the patterns there. Furthermore the suggested replacements have
1265                    different behavior, hence we do NOT want to blindly migrate. Examples
1266                    include:
1267
1268                    - ImmutableCollection et al. are not just implementation details, they
1269                      form an API contract.
1270                    - ImmutableMap/ImmutableSet retain iteration order, whereas their
1271                      Map.of()/Set.of() counterparts have unstable iteration order (by design)
1272               -->
1273               <exclusionPattern>com/google/common/collect/Immutable.*</exclusionPattern>
1274             </exclusionPatterns>
1275           </configuration>
1276
1277           <executions>
1278             <execution>
1279               <id>modernizer</id>
1280               <phase>verify</phase>
1281               <goals>
1282                 <goal>modernizer</goal>
1283               </goals>
1284             </execution>
1285           </executions>
1286         </plugin>
1287
1288         <plugin>
1289           <groupId>com.github.spotbugs</groupId>
1290           <artifactId>spotbugs-maven-plugin</artifactId>
1291           <version>3.1.12.2</version>
1292           <dependencies>
1293             <dependency>
1294               <groupId>com.github.spotbugs</groupId>
1295               <artifactId>spotbugs</artifactId>
1296               <version>3.1.12</version>
1297             </dependency>
1298             <dependency>
1299               <groupId>org.opendaylight.odlparent</groupId>
1300               <artifactId>spotbugs</artifactId>
1301               <version>8.1.1-SNAPSHOT</version>
1302             </dependency>
1303             <dependency>
1304               <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
1305               <groupId>org.slf4j</groupId>
1306               <artifactId>slf4j-simple</artifactId>
1307               <version>1.8.0-beta2</version>
1308             </dependency>
1309           </dependencies>
1310           <configuration>
1311             <plugins>
1312               <plugin>
1313                 <groupId>jp.skypencil.findbugs.slf4j</groupId>
1314                 <artifactId>bug-pattern</artifactId>
1315                 <version>1.5.0</version>
1316               </plugin>
1317             </plugins>
1318             <!--
1319               Enables analysis which takes more memory but finds more bugs.
1320               If you run out of memory, changes the value of the effort element
1321               to 'Low'.
1322             -->
1323             <effort>Max</effort>
1324             <!-- Reports all bugs (other values are medium and max) -->
1325             <threshold>Low</threshold>
1326             <!-- Build doesn't fail if problems are found -->
1327             <failOnError>${odlparent.spotbugs.enforce}</failOnError>
1328             <skip>${odlparent.spotbugs.skip}</skip>
1329             <!-- References the excluded rules -->
1330             <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
1331             <!-- Produces XML report -->
1332             <xmlOutput>true</xmlOutput>
1333             <!-- Configures the directory in which the XML report is created -->
1334             <findbugsXmlOutputDirectory>${project.build.directory}/spotbugs</findbugsXmlOutputDirectory>
1335           </configuration>
1336           <executions>
1337             <!--
1338               Ensures that SpotBugs inspects source code when project is compiled.
1339             -->
1340             <execution>
1341               <id>analyze-compile</id>
1342               <phase>compile</phase>
1343               <goals>
1344                 <goal>check</goal>
1345               </goals>
1346             </execution>
1347           </executions>
1348         </plugin>
1349         <plugin>
1350           <groupId>org.codehaus.mojo</groupId>
1351           <artifactId>properties-maven-plugin</artifactId>
1352           <version>1.0.0</version>
1353         </plugin>
1354         <plugin>
1355           <groupId>org.eclipse.xtend</groupId>
1356           <artifactId>xtend-maven-plugin</artifactId>
1357           <!-- NOTE: This version MUST be kept in sync with the Xtend version in <dependencyManagement> -->
1358           <version>2.24.0</version>
1359           <executions>
1360             <execution>
1361               <goals>
1362                 <goal>compile</goal>
1363                 <goal>testCompile</goal>
1364               </goals>
1365               <configuration>
1366                 <outputDirectory>${project.build.directory}/generated-sources/xtend</outputDirectory>
1367                 <testOutputDirectory>${project.build.directory}/generated-test-sources/xtend</testOutputDirectory>
1368               </configuration>
1369             </execution>
1370           </executions>
1371         </plugin>
1372         <plugin>
1373           <groupId>org.eclipse.m2e</groupId>
1374           <artifactId>lifecycle-mapping</artifactId>
1375           <version>1.0.0</version>
1376           <configuration>
1377             <lifecycleMappingMetadata>
1378               <pluginExecutions>
1379                 <pluginExecution>
1380                   <pluginExecutionFilter>
1381                     <groupId>org.apache.felix</groupId>
1382                     <artifactId>maven-bundle-plugin</artifactId>
1383                     <versionRange>[1.0,)</versionRange>
1384                     <goals>
1385                       <goal>manifest</goal>
1386                     </goals>
1387                   </pluginExecutionFilter>
1388                   <action>
1389                     <execute/>
1390                   </action>
1391                 </pluginExecution>
1392                 <pluginExecution>
1393                   <pluginExecutionFilter>
1394                     <groupId>org.apache.maven.plugins</groupId>
1395                     <artifactId>maven-enforcer-plugin</artifactId>
1396                     <versionRange>[1.0.0,)</versionRange>
1397                     <goals>
1398                       <goal>enforce</goal>
1399                     </goals>
1400                   </pluginExecutionFilter>
1401                   <action>
1402                     <ignore/>
1403                   </action>
1404                 </pluginExecution>
1405                 <pluginExecution>
1406                   <pluginExecutionFilter>
1407                     <groupId>org.apache.maven.plugins</groupId>
1408                     <artifactId>maven-dependency-plugin</artifactId>
1409                     <versionRange>[2.10,)</versionRange>
1410                     <goals>
1411                       <goal>copy</goal>
1412                     </goals>
1413                   </pluginExecutionFilter>
1414                   <action>
1415                     <ignore/>
1416                   </action>
1417                 </pluginExecution>
1418                 <pluginExecution>
1419                   <pluginExecutionFilter>
1420                     <groupId>org.apache.maven.plugins</groupId>
1421                     <artifactId>maven-pmd-plugin</artifactId>
1422                     <versionRange>[3.6,)</versionRange>
1423                     <goals>
1424                       <goal>cpd-check</goal>
1425                     </goals>
1426                   </pluginExecutionFilter>
1427                   <action>
1428                     <ignore/>
1429                   </action>
1430                 </pluginExecution>
1431                 <!-- The plugin will eventually be removed, remove this too at that point -->
1432                 <pluginExecution>
1433                   <pluginExecutionFilter>
1434                     <groupId>org.apache.maven.plugins</groupId>
1435                     <artifactId>maven-antrun-plugin</artifactId>
1436                     <versionRange>[1.8,)</versionRange>
1437                     <goals>
1438                       <goal>run</goal>
1439                     </goals>
1440                   </pluginExecutionFilter>
1441                   <action>
1442                     <ignore/>
1443                   </action>
1444                 </pluginExecution>
1445                 <pluginExecution>
1446                   <pluginExecutionFilter>
1447                     <groupId>org.apache.servicemix.tooling</groupId>
1448                     <artifactId>depends-maven-plugin</artifactId>
1449                     <versionRange>[1.2,)</versionRange>
1450                     <goals>
1451                       <goal>generate-depends-file</goal>
1452                     </goals>
1453                   </pluginExecutionFilter>
1454                   <action>
1455                     <execute/>
1456                   </action>
1457                 </pluginExecution>
1458                 <pluginExecution>
1459                   <pluginExecutionFilter>
1460                     <groupId>org.jacoco</groupId>
1461                     <artifactId>jacoco-maven-plugin</artifactId>
1462                     <versionRange>[0.7.0,)</versionRange>
1463                     <goals>
1464                       <goal>prepare-agent</goal>
1465                     </goals>
1466                   </pluginExecutionFilter>
1467                   <action>
1468                     <ignore/>
1469                   </action>
1470                 </pluginExecution>
1471
1472                 <pluginExecution>
1473                   <pluginExecutionFilter>
1474                     <groupId>org.ops4j.pax.exam</groupId>
1475                     <artifactId>maven-paxexam-plugin</artifactId>
1476                     <versionRange>[1.2.4,)</versionRange>
1477                     <goals>
1478                       <goal>generate-depends-file</goal>
1479                     </goals>
1480                   </pluginExecutionFilter>
1481                   <action>
1482                     <ignore/>
1483                   </action>
1484                 </pluginExecution>
1485
1486                 <pluginExecution>
1487                   <pluginExecutionFilter>
1488                     <groupId>org.basepom.maven</groupId>
1489                     <artifactId>
1490                       duplicate-finder-maven-plugin
1491                     </artifactId>
1492                     <versionRange>[1.2.1,)</versionRange>
1493                     <goals>
1494                       <goal>check</goal>
1495                     </goals>
1496                   </pluginExecutionFilter>
1497                   <action>
1498                     <ignore></ignore>
1499                   </action>
1500                 </pluginExecution>
1501               </pluginExecutions>
1502             </lifecycleMappingMetadata>
1503           </configuration>
1504         </plugin>
1505
1506         <plugin>
1507           <groupId>org.jacoco</groupId>
1508           <artifactId>jacoco-maven-plugin</artifactId>
1509           <configuration>
1510             <!-- Note: This exclusion list should match <sonar.exclusions>
1511                        property above -->
1512             <excludes>
1513               <exclude>**/gen/**</exclude>
1514               <exclude>**/generated-sources/**</exclude>
1515               <exclude>**/generated-test-sources/**</exclude>
1516               <exclude>**/yang-gen/**</exclude>
1517               <exclude>**/yang-gen-config/**</exclude>
1518               <exclude>**/yang-gen-sal/**</exclude>
1519               <exclude>**/yang-gen-code/**</exclude>
1520               <exclude>**/pax/**</exclude>
1521             </excludes>
1522           </configuration>
1523         </plugin>
1524
1525         <plugin>
1526           <groupId>org.ops4j.pax.exam</groupId>
1527           <artifactId>maven-paxexam-plugin</artifactId>
1528           <version>1.2.4</version>
1529         </plugin>
1530
1531         <!-- When updating this version, consider antl4-runtime above -->
1532         <plugin>
1533           <groupId>org.antlr</groupId>
1534           <artifactId>antlr4-maven-plugin</artifactId>
1535           <version>4.8-1</version>
1536         </plugin>
1537       </plugins>
1538     </pluginManagement>
1539
1540     <plugins>
1541       <plugin>
1542         <artifactId>maven-enforcer-plugin</artifactId>
1543         <executions>
1544           <execution>
1545             <id>enforce-banned-dependencies</id>
1546             <goals>
1547               <goal>enforce</goal>
1548             </goals>
1549             <configuration>
1550               <rules>
1551                 <bannedDependencies>
1552                   <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>
1553                   <excludes>
1554                     <exclude>org.mockito:mockito-all</exclude>
1555                     <exclude>com.google.code.findbugs:annotations</exclude>
1556                   </excludes>
1557                 </bannedDependencies>
1558               </rules>
1559               <fail>true</fail>
1560             </configuration>
1561           </execution>
1562         </executions>
1563       </plugin>
1564       <plugin>
1565         <groupId>org.basepom.maven</groupId>
1566         <artifactId>duplicate-finder-maven-plugin</artifactId>
1567         <version>1.5.0</version>
1568         <executions>
1569           <execution>
1570             <id>find-duplicate-classpath-entries</id>
1571             <phase>verify</phase>
1572             <goals>
1573               <goal>check</goal>
1574             </goals>
1575           </execution>
1576         </executions>
1577         <configuration>
1578             <!-- https://github.com/basepom/duplicate-finder-maven-plugin/wiki -->
1579             <failBuildInCaseOfConflict>false</failBuildInCaseOfConflict>
1580             <failBuildInCaseOfDifferentContentConflict>true</failBuildInCaseOfDifferentContentConflict>
1581             <failBuildInCaseOfEqualContentConflict>false</failBuildInCaseOfEqualContentConflict>
1582             <printEqualFiles>false</printEqualFiles>
1583             <quiet>true</quiet>
1584             <!-- In addition to https://github.com/basepom/duplicate-finder-maven-plugin/wiki/Default%20ignored%20elements,
1585                  as explained on https://github.com/basepom/duplicate-finder-maven-plugin/wiki/Ignoring%20Dependencies%20and%20Resources,
1586                  we use resources not dependencies (see https://github.com/basepom/duplicate-finder-maven-plugin/wiki/Classpath%20Exceptions)
1587                  also ignore: -->
1588             <ignoredResourcePatterns>
1589               <ignoredResourcePattern>org/opendaylight/blueprint/.*\.xml$</ignoredResourcePattern>
1590               <ignoredResourcePattern>OSGI-OPT/bnd.bnd$</ignoredResourcePattern>
1591               <ignoredResourcePattern>WEB-INF/web.xml</ignoredResourcePattern>
1592               <ignoredResourcePattern>README.*$</ignoredResourcePattern>
1593               <ignoredResourcePattern>.*\.html$</ignoredResourcePattern>
1594               <ignoredResourcePattern>reference.conf</ignoredResourcePattern>
1595             </ignoredResourcePatterns>
1596             <ignoredDependencies>
1597               <ignoredDependency>
1598                 <groupId>org.slf4j</groupId>
1599                 <artifactId>slf4j-simple</artifactId>
1600               </ignoredDependency>
1601               <ignoredDependency>
1602                 <groupId>org.opendaylight.odlparent</groupId>
1603                 <artifactId>opendaylight-karaf-empty</artifactId>
1604               </ignoredDependency>
1605             </ignoredDependencies>
1606         </configuration>
1607       </plugin>
1608       <plugin>
1609         <artifactId>maven-dependency-plugin</artifactId>
1610       </plugin>
1611       <plugin>
1612         <artifactId>maven-checkstyle-plugin</artifactId>
1613       </plugin>
1614       <plugin>
1615           <artifactId>maven-pmd-plugin</artifactId>
1616       </plugin>
1617       <plugin>
1618         <artifactId>maven-source-plugin</artifactId>
1619       </plugin>
1620       <plugin>
1621         <artifactId>maven-javadoc-plugin</artifactId>
1622       </plugin>
1623       <plugin>
1624         <groupId>org.gaul</groupId>
1625         <artifactId>modernizer-maven-plugin</artifactId>
1626       </plugin>
1627       <plugin>
1628         <groupId>com.github.spotbugs</groupId>
1629         <artifactId>spotbugs-maven-plugin</artifactId>
1630       </plugin>
1631
1632       <!-- Jacoco / Sonar -->
1633       <plugin>
1634         <groupId>org.jacoco</groupId>
1635         <artifactId>jacoco-maven-plugin</artifactId>
1636         <executions>
1637           <execution>
1638             <id>pre-unit-test</id>
1639             <goals>
1640               <goal>prepare-agent</goal>
1641             </goals>
1642           </execution>
1643           <execution>
1644             <id>report</id>
1645             <goals>
1646               <goal>report</goal>
1647             </goals>
1648           </execution>
1649         </executions>
1650       </plugin>
1651
1652       <plugin>
1653         <groupId>com.alexecollins.maven.plugin</groupId>
1654         <artifactId>script-maven-plugin</artifactId>
1655         <version>1.0.0</version>
1656         <executions>
1657            <execution>
1658              <phase>prepare-package</phase>
1659              <goals>
1660                <goal>execute</goal>
1661              </goals>
1662              <configuration>
1663                <script>
1664                  // BeanShell is 2005-ish and thus doesn't support generics, varargs, try-with-resources or lambdas, so:
1665                  // (If we do this kind of inline code in pom.xml more often, we shold have a new simple module in
1666                  //  odl-parent, which has *.java that we compile, and then just depend on it here and call one-line
1667                  //  static class methods only - it will be MUCH easier to write!)
1668                  void copy(File root, String glob, File target) {
1669                      java.nio.file.DirectoryStream dirStream = java.nio.file.Files.newDirectoryStream(root.toPath(), glob);
1670                      Iterator dirStreamIterator = dirStream.iterator();
1671                      while (dirStreamIterator.hasNext()) {
1672                          java.nio.file.Path path = dirStreamIterator.next();
1673                          java.nio.file.Files.copy(path, new File(target, path.toFile().getName()).toPath(),
1674                              new java.nio.file.CopyOption[] {
1675                                  java.nio.file.StandardCopyOption.REPLACE_EXISTING,
1676                                  java.nio.file.StandardCopyOption.COPY_ATTRIBUTES
1677                              }
1678                          );
1679                      }
1680                      dirStream.close();
1681                  }
1682
1683                  File gitRepoRootDir = project.basedir;
1684                  while (!new File(gitRepoRootDir, ".git").exists() &amp;&amp; gitRepoRootDir.getParentFile() != null) {
1685                      gitRepoRootDir = gitRepoRootDir.getParentFile();
1686                  }
1687
1688                  File target = new File(project.build.outputDirectory);
1689                  target.mkdirs();
1690                  copy(gitRepoRootDir, "README*", target);
1691                  copy(gitRepoRootDir, "CONTRIBUTING*", target);
1692                  copy(gitRepoRootDir, "PROJECT_INFO.yaml", target);
1693                </script>
1694              </configuration>
1695            </execution>
1696          </executions>
1697          <dependencies>
1698            <dependency>
1699              <groupId>org.apache-extras.beanshell</groupId>
1700              <artifactId>bsh</artifactId>
1701              <version>2.0b6</version>
1702            </dependency>
1703          </dependencies>
1704       </plugin>
1705     </plugins>
1706   </build>
1707
1708   <reporting>
1709     <plugins>
1710       <plugin>
1711         <artifactId>maven-checkstyle-plugin</artifactId>
1712         <version>3.1.0</version>
1713       </plugin>
1714
1715       <!-- FIXME: activate this
1716       <plugin>
1717         <artifactId>maven-project-info-reports-plugin</artifactId>
1718       </plugin-->
1719       <plugin>
1720         <groupId>org.codehaus.mojo</groupId>
1721         <artifactId>jdepend-maven-plugin</artifactId>
1722         <reportSets>
1723           <reportSet>
1724             <reports>
1725               <report>generate-no-fork</report>
1726             </reports>
1727           </reportSet>
1728         </reportSets>
1729       </plugin>
1730     </plugins>
1731   </reporting>
1732 </project>
1733