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