1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- vi: set et smarttab sw=2 tabstop=2: -->
4 Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
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>
14 <groupId>org.opendaylight.odlparent</groupId>
15 <artifactId>odlparent-lite</artifactId>
16 <version>9.0.1-SNAPSHOT</version>
17 <relativePath>../odlparent-lite</relativePath>
20 <artifactId>odlparent</artifactId>
21 <packaging>pom</packaging>
22 <name>ODL :: odlparent :: ${project.artifactId}</name>
25 <connection>scm:git:ssh://git.opendaylight.org:29418/odlparent.git</connection>
26 <developerConnection>scm:git:ssh://git.opendaylight.org:29418/odlparent.git</developerConnection>
28 <url>https://wiki.opendaylight.org/view/ODL_Root_Parent:Main</url>
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. -->
37 <nexus.repository.release>opendaylight.release</nexus.repository.release>
38 <nexus.repository.snapshot>opendaylight.snapshot</nexus.repository.snapshot>
40 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
41 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
43 <!-- Java Versions -->
44 <maven.compiler.release>11</maven.compiler.release>
46 <!-- Used in controller, genius, infrautils, netconf, netvirt, ovsdb, serviceutils -->
47 <karaf.version>4.3.1</karaf.version>
49 <!-- Supporting Libraries -->
50 <!-- Only used internally -->
51 <bouncycastle.version>1.68</bouncycastle.version>
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>
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>
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>
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 -->
70 <!-- Redirect test output to files (overridable) -->
71 <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
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>
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>
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>
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>
93 <!-- Opt-in into maven-dependency-plugin dependency declaration consistency
94 enforcement. Defaults to false. Set to 'true' in pom.xml of a project which
95 desires to have the consistency of its dependencies checked and enforced. -->
96 <odlparent.dependency.enforce>false</odlparent.dependency.enforce>
98 <!-- Opt-out from maven-dependency-plugin dependency declaration consistency
99 checking. Defaults to false. Set to 'true' in pom.xml of a project which
100 desires to not check the consistency of its dependencies. -->
101 <odlparent.dependency.skip>false</odlparent.dependency.skip>
104 <dependencyManagement>
108 <groupId>org.opendaylight.odlparent</groupId>
109 <artifactId>odlparent-artifacts</artifactId>
110 <version>9.0.1-SNAPSHOT</version>
111 <scope>import</scope>
115 <!-- We import the Karaf BOM to ensure we converge by default on the versions used there -->
117 <groupId>org.apache.karaf</groupId>
118 <artifactId>karaf-bom</artifactId>
119 <version>${karaf.version}</version>
120 <scope>import</scope>
124 <!-- Build tool dependencies (normally not here in <dependencies>,
125 but in a <dependency> in <pluginManagement> but for Checkstyle this
126 is required so that we can share the same version of Checkstyle
127 for both the Maven plugin below as well as for custom Checkstyle
128 check rule projects, such as yangtools' checkstyle-logging) -->
130 <groupId>com.puppycrawl.tools</groupId>
131 <artifactId>checkstyle</artifactId>
132 <!-- This should match the plugin management on maven-checkstyle-plugin below -->
133 <version>8.41.1</version>
136 <!-- Testing Dependencies -->
137 <!-- JUnit, Hamcrest, Mockito and PowerMock need to be kept in sync -->
139 <groupId>junit</groupId>
140 <artifactId>junit</artifactId>
141 <!-- When bumping this version, remember to also change the JavaDoc link in odlparent-lite -->
142 <version>4.13.2</version>
146 <groupId>org.skyscreamer</groupId>
147 <artifactId>jsonassert</artifactId>
148 <version>1.5.0</version>
152 <groupId>org.mockito</groupId>
153 <artifactId>mockito-core</artifactId>
154 <version>3.9.0</version>
158 <groupId>org.mockito</groupId>
159 <artifactId>mockito-inline</artifactId>
160 <version>3.9.0</version>
164 <groupId>org.hamcrest</groupId>
165 <artifactId>hamcrest</artifactId>
166 <!-- When bumping this version, remember to also change the JavaDoc link in odlparent-lite -->
167 <version>2.2</version>
171 <groupId>org.hamcrest</groupId>
172 <artifactId>hamcrest-core</artifactId>
173 <version>2.2</version>
177 <groupId>org.hamcrest</groupId>
178 <artifactId>hamcrest-library</artifactId>
179 <version>2.2</version>
183 <groupId>com.google.truth</groupId>
184 <artifactId>truth</artifactId>
185 <!-- When bumping this version, remember to also change the JavaDoc link in odlparent-lite -->
186 <version>1.1.2</version>
190 <groupId>com.google.truth.extensions</groupId>
191 <artifactId>truth-java8-extension</artifactId>
192 <version>1.1.2</version>
196 <groupId>org.awaitility</groupId>
197 <artifactId>awaitility</artifactId>
198 <version>4.0.3</version>
202 <groupId>org.powermock</groupId>
203 <artifactId>powermock-api-mockito2</artifactId>
204 <version>2.0.9</version>
208 <groupId>org.powermock</groupId>
209 <artifactId>powermock-api-support</artifactId>
210 <version>2.0.9</version>
214 <groupId>org.powermock</groupId>
215 <artifactId>powermock-core</artifactId>
216 <version>2.0.9</version>
220 <groupId>org.powermock</groupId>
221 <artifactId>powermock-module-junit4</artifactId>
222 <version>2.0.9</version>
226 <groupId>org.powermock</groupId>
227 <artifactId>powermock-reflect</artifactId>
228 <version>2.0.9</version>
233 Annotation Processors
236 <!-- Generates immutable implementations, builders, the works -->
237 <groupId>org.immutables</groupId>
238 <artifactId>value</artifactId>
239 <classifier>annotations</classifier>
240 <!-- Keep this version in sync with annotationProcessorPaths declaration below -->
241 <version>2.8.8</version>
242 <!-- Must be provided; scope=test here breaks APT in Eclipse :( -->
243 <scope>provided</scope>
247 <!-- Generates META-INF/services entries for ServiceLoader -->
248 <groupId>org.kohsuke.metainf-services</groupId>
249 <artifactId>metainf-services</artifactId>
250 <!-- Keep this version in sync with annotationProcessorPaths declaration below -->
251 <version>1.8</version>
252 <optional>true</optional>
253 <scope>provided</scope>
260 <groupId>ch.qos.logback</groupId>
261 <artifactId>logback-core</artifactId>
262 <version>1.2.3</version>
265 <groupId>ch.qos.logback</groupId>
266 <artifactId>logback-classic</artifactId>
267 <version>1.2.3</version>
272 <groupId>org.apache.logging.log4j</groupId>
273 <artifactId>log4j-bom</artifactId>
274 <version>2.14.1</version>
275 <scope>import</scope>
280 <groupId>com.google.guava</groupId>
281 <artifactId>guava</artifactId>
282 <!-- When bumping this version, remember to also change the JavaDoc link in odlparent-lite and docs -->
283 <version>30.1.1-jre</version>
286 <!-- Do not leak JSR305 onto the classpath by default -->
287 <groupId>com.google.code.findbugs</groupId>
288 <artifactId>jsr305</artifactId>
293 <groupId>com.google.guava</groupId>
294 <artifactId>guava-testlib</artifactId>
295 <!-- When bumping this version, remember to also change the JavaDoc link in odlparent-lite and docs -->
296 <version>30.1.1-jre</version>
300 <!-- Do not leak JSR305 onto the classpath by default -->
301 <groupId>com.google.code.findbugs</groupId>
302 <artifactId>jsr305</artifactId>
307 <groupId>org.checkerframework</groupId>
308 <artifactId>checker-qual</artifactId>
309 <version>3.8.0</version>
312 <groupId>com.google.errorprone</groupId>
313 <artifactId>error_prone_annotations</artifactId>
314 <version>2.5.1</version>
318 <groupId>commons-beanutils</groupId>
319 <artifactId>commons-beanutils</artifactId>
320 <version>1.9.4</version>
323 <groupId>org.apache.commons</groupId>
324 <artifactId>commons-lang3</artifactId>
325 <version>3.12.0</version>
328 <groupId>org.apache.commons</groupId>
329 <artifactId>commons-text</artifactId>
330 <version>1.9</version>
333 <groupId>commons-lang</groupId>
334 <artifactId>commons-lang</artifactId>
335 <!-- When bumping this version, remember to also change the JavaDoc link in odlparent-lite and docs -->
336 <version>2.6</version>
339 <groupId>commons-codec</groupId>
340 <artifactId>commons-codec</artifactId>
341 <version>1.15</version>
343 <!-- Jersey for JAXRS -->
345 <groupId>javax.ws.rs</groupId>
346 <artifactId>javax.ws.rs-api</artifactId>
347 <version>2.1.1</version>
350 <groupId>org.glassfish.jersey</groupId>
351 <artifactId>jersey-bom</artifactId>
352 <version>2.27</version>
354 <scope>import</scope>
358 <groupId>jakarta.activation</groupId>
359 <artifactId>jakarta.activation-api</artifactId>
360 <version>1.2.2</version>
364 <groupId>javax.annotation</groupId>
365 <artifactId>javax.annotation-api</artifactId>
366 <version>1.3.1</version>
367 <optional>true</optional>
370 <groupId>xml-apis</groupId>
371 <artifactId>xml-apis</artifactId>
372 <version>1.4.01</version>
375 <!-- Plugin integration -->
377 <groupId>net.java.dev.stax-utils</groupId>
378 <artifactId>stax-utils</artifactId>
379 <version>20070216</version>
382 <groupId>org.sonatype.plexus</groupId>
383 <artifactId>plexus-build-api</artifactId>
384 <version>0.0.7</version>
387 <groupId>org.codehaus.plexus</groupId>
388 <artifactId>plexus-slf4j-logging</artifactId>
389 <version>1.1</version>
392 <!-- These three need to be consistent:
393 jackson-2.11.4 needs woodstox-6.2.3+
394 woodstox-5.3+ needs stax2-api-4.2.x
397 <groupId>org.codehaus.woodstox</groupId>
398 <artifactId>stax2-api</artifactId>
399 <version>4.2.1</version>
402 <groupId>com.fasterxml.woodstox</groupId>
403 <artifactId>woodstox-core</artifactId>
404 <version>6.2.5</version>
407 <groupId>com.fasterxml.jackson</groupId>
408 <artifactId>jackson-bom</artifactId>
409 <version>2.11.4</version>
410 <scope>import</scope>
415 <groupId>com.github.spotbugs</groupId>
416 <artifactId>spotbugs-annotations</artifactId>
417 <version>3.1.12</version>
418 <scope>provided</scope>
419 <!-- Contains retention=RUNTIME annotations, which are not really needed -->
420 <optional>true</optional>
423 <groupId>com.google.code.findbugs</groupId>
424 <artifactId>jsr305</artifactId>
430 <groupId>org.eclipse.jdt</groupId>
431 <artifactId>org.eclipse.jdt.annotation</artifactId>
432 <version>2.2.600</version>
433 <scope>provided</scope>
435 <!-- We're staying on 2.8.5 for now, 2.8.6 has issues:
436 https://github.com/google/gson/issues/1601
437 https://github.com/google/gson/issues/1602
438 https://github.com/google/gson/issues/1608
439 https://github.com/google/gson/issues/1630
442 <groupId>com.google.code.gson</groupId>
443 <artifactId>gson</artifactId>
444 <version>2.8.5</version>
447 <groupId>commons-fileupload</groupId>
448 <artifactId>commons-fileupload</artifactId>
449 <version>1.4</version>
452 <groupId>commons-io</groupId>
453 <artifactId>commons-io</artifactId>
454 <version>2.8.0</version>
457 <groupId>commons-net</groupId>
458 <artifactId>commons-net</artifactId>
459 <version>3.8.0</version>
464 <groupId>io.netty</groupId>
465 <artifactId>netty-bom</artifactId>
466 <!-- If these are updated, the version in features.xml needs to be changed too -->
467 <!-- When bumping this version, remember to also change the JavaDoc link in odlparent-lite -->
468 <version>4.1.63.Final</version>
470 <scope>import</scope>
474 <groupId>javax.ws.rs</groupId>
475 <artifactId>jsr311-api</artifactId>
476 <version>1.1.1</version>
479 <groupId>org.bouncycastle</groupId>
480 <artifactId>bcpkix-jdk15on</artifactId>
481 <version>${bouncycastle.version}</version>
484 <groupId>org.bouncycastle</groupId>
485 <artifactId>bcprov-jdk15on</artifactId>
486 <version>${bouncycastle.version}</version>
489 <groupId>org.bouncycastle</groupId>
490 <artifactId>bcprov-ext-jdk15on</artifactId>
491 <version>${bouncycastle.version}</version>
495 <groupId>com.webcohesion.enunciate</groupId>
496 <artifactId>enunciate-core-annotations</artifactId>
497 <!-- This must be aligned with the version of enunciate-maven-plugin specified below -->
498 <version>2.13.3</version>
502 <groupId>org.javassist</groupId>
503 <artifactId>javassist</artifactId>
504 <version>3.27.0-GA</version>
507 <groupId>org.jboss.spec.javax.transaction</groupId>
508 <artifactId>jboss-transaction-api_1.1_spec</artifactId>
509 <version>1.0.1.Final</version>
512 <groupId>org.jolokia</groupId>
513 <artifactId>jolokia-osgi</artifactId>
514 <version>1.6.2</version>
518 These are usually used through osgi.cmpn, except when you also want
519 to be a JPMS module. In that case you need to depend on these and
520 have a 'require static org.osgi.service.component.annotations;'.
521 This incurs a warning about publishing the module to a public place.
522 We do not heed that warning, as nothing in this package is seen by
523 the runtime - thus the warning can be safely ignored :)
525 Keep this in sync with rest of OSGi:
526 - OSGi R7 (now) = 1.4.0
529 <groupId>org.osgi</groupId>
530 <artifactId>org.osgi.service.component.annotations</artifactId>
531 <version>1.4.0</version>
532 <scope>provided</scope>
535 <groupId>org.osgi</groupId>
536 <artifactId>org.osgi.service.metatype.annotations</artifactId>
537 <version>1.4.0</version>
541 <groupId>org.osgi</groupId>
542 <artifactId>osgi.annotation</artifactId>
543 <version>7.0.0</version>
544 <scope>provided</scope>
547 <groupId>org.osgi</groupId>
548 <artifactId>osgi.cmpn</artifactId>
549 <version>7.0.0</version>
550 <scope>provided</scope>
553 <groupId>org.osgi</groupId>
554 <artifactId>osgi.core</artifactId>
555 <version>7.0.0</version>
556 <scope>provided</scope>
560 <groupId>org.osgi</groupId>
561 <!-- for https://bugs.opendaylight.org/show_bug.cgi?id=4290 -->
562 <artifactId>org.osgi.service.event</artifactId>
563 <version>1.4.0</version>
566 <groupId>org.apache.aries.quiesce</groupId>
567 <artifactId>org.apache.aries.quiesce.api</artifactId>
568 <version>1.0.0</version>
571 <!-- LMAX Disruptor -->
573 <groupId>com.lmax</groupId>
574 <artifactId>disruptor</artifactId>
575 <version>3.4.2</version>
578 <!-- Add Pax Exam -->
580 <groupId>org.ops4j.pax.exam</groupId>
581 <artifactId>pax-exam</artifactId>
582 <version>4.13.4</version>
586 <groupId>org.ops4j.pax.exam</groupId>
587 <artifactId>pax-exam-container-forked</artifactId>
588 <version>4.13.4</version>
592 <groupId>org.ops4j.pax.exam</groupId>
593 <artifactId>pax-exam-container-karaf</artifactId>
594 <version>4.13.4</version>
598 <groupId>org.ops4j.pax.exam</groupId>
599 <artifactId>pax-exam-container-native</artifactId>
600 <version>4.13.4</version>
604 <groupId>org.ops4j.pax.exam</groupId>
605 <artifactId>pax-exam-extender-service</artifactId>
606 <version>4.13.4</version>
610 <groupId>org.ops4j.pax.exam</groupId>
611 <artifactId>pax-exam-inject</artifactId>
612 <version>4.13.4</version>
616 <groupId>org.ops4j.pax.exam</groupId>
617 <artifactId>pax-exam-invoker-junit</artifactId>
618 <version>4.13.4</version>
622 <groupId>org.ops4j.pax.exam</groupId>
623 <artifactId>pax-exam-features</artifactId>
624 <version>4.13.4</version>
629 <groupId>org.ops4j.pax.exam</groupId>
630 <artifactId>pax-exam-junit4</artifactId>
631 <version>4.13.4</version>
635 <groupId>org.ops4j.pax.exam</groupId>
636 <artifactId>pax-exam-link-mvn</artifactId>
637 <version>4.13.4</version>
641 <groupId>org.ops4j.pax.exam</groupId>
642 <artifactId>pax-exam-link-assembly</artifactId>
643 <version>4.13.4</version>
648 <groupId>org.ops4j.pax.url</groupId>
649 <artifactId>pax-url-link</artifactId>
650 <version>2.5.4</version>
654 <groupId>org.ops4j.pax.url</groupId>
655 <artifactId>pax-url-aether</artifactId>
656 <version>2.5.4</version>
660 <groupId>org.ops4j.pax.url</groupId>
661 <artifactId>pax-url-wrap</artifactId>
662 <version>2.5.4</version>
666 <groupId>org.springframework.osgi</groupId>
667 <artifactId>spring-osgi-mock</artifactId>
668 <version>1.2.1</version>
673 <groupId>org.xmlunit</groupId>
674 <artifactId>xmlunit-core</artifactId>
675 <version>2.8.2</version>
679 <groupId>org.xmlunit</groupId>
680 <artifactId>xmlunit-assertj</artifactId>
681 <version>2.8.2</version>
685 <groupId>org.xmlunit</groupId>
686 <artifactId>xmlunit-assertj3</artifactId>
687 <version>2.8.2</version>
691 <groupId>org.xmlunit</groupId>
692 <artifactId>xmlunit-matchers</artifactId>
693 <version>2.8.2</version>
696 <!-- FIXME: remove this once we have migrated over -->
698 <groupId>org.xmlunit</groupId>
699 <artifactId>xmlunit-legacy</artifactId>
700 <version>2.8.2</version>
704 <!-- Annotations for modernizer-maven-plugin -->
706 <groupId>org.gaul</groupId>
707 <artifactId>modernizer-maven-annotations</artifactId>
708 <!-- This should match the plugin version below -->
709 <version>2.2.0</version>
710 <scope>provided</scope>
714 <groupId>org.eclipse.jetty</groupId>
715 <artifactId>jetty-bom</artifactId>
716 <version>9.4.38.v20210224</version>
717 <scope>import</scope>
722 <groupId>com.h2database</groupId>
723 <artifactId>h2</artifactId>
724 <version>1.4.200</version>
727 <!-- Xtend http://xtend-lang.org
728 NOTE: When you increase the version here,
729 then remember to also increase it for the
730 xtend-maven-plugin below! (We don't want to
731 use a Maven property, in order not to "leak" that.)
734 <groupId>org.eclipse.xtend</groupId>
735 <artifactId>org.eclipse.xtend.lib</artifactId>
736 <version>2.25.0</version>
739 <groupId>org.eclipse.xtend</groupId>
740 <artifactId>org.eclipse.xtend.lib.macro</artifactId>
741 <version>2.25.0</version>
744 <groupId>org.eclipse.xtext</groupId>
745 <artifactId>org.eclipse.xtext.xbase.lib</artifactId>
746 <version>2.25.0</version>
750 <!-- A better alternative for javax.inject, from https://guicedee.com/ -->
752 <groupId>com.guicedee.services</groupId>
753 <artifactId>javax.inject</artifactId>
754 <version>1.0.20.0</version>
755 <scope>provided</scope>
756 <optional>true</optional>
759 <!-- jung, a graph library -->
761 <groupId>net.sf.jung</groupId>
762 <artifactId>jung-api</artifactId>
763 <version>2.1.1</version>
766 <groupId>net.sf.jung</groupId>
767 <artifactId>jung-algorithms</artifactId>
768 <version>2.1.1</version>
771 <groupId>net.sf.jung</groupId>
772 <artifactId>jung-graph-impl</artifactId>
773 <version>2.1.1</version>
776 <!-- ThreeTen-Extra, date/time complements -->
778 <groupId>org.threeten</groupId>
779 <artifactId>threeten-extra</artifactId>
780 <version>1.6.0</version>
783 <!-- When updating this version, consider antl4-maven-plugin below -->
785 <groupId>org.antlr</groupId>
786 <artifactId>antlr4-runtime</artifactId>
787 <version>4.9.2</version>
790 <groupId>org.apache.aries.blueprint</groupId>
791 <artifactId>blueprint-maven-plugin-annotation</artifactId>
792 <version>1.3.0</version>
793 <optional>true</optional>
796 <!-- TrieMap library -->
798 <groupId>tech.pantheon.triemap</groupId>
799 <artifactId>bom</artifactId>
800 <version>1.2.0</version>
801 <scope>import</scope>
805 <!-- Dropwizard metrics -->
807 <groupId>io.dropwizard.metrics</groupId>
808 <artifactId>metrics-bom</artifactId>
809 <version>4.1.19</version>
810 <scope>import</scope>
815 </dependencyManagement>
819 We expect slf4j-api to be provided by the platform.
820 Karaf provides it, other containers need to provide it themselves.
823 <groupId>org.slf4j</groupId>
824 <artifactId>slf4j-api</artifactId>
825 <scope>provided</scope>
829 Enable useful code quality annotations everywhere. Since these annotations
830 are not required at runtime.
833 <groupId>org.eclipse.jdt</groupId>
834 <artifactId>org.eclipse.jdt.annotation</artifactId>
835 <scope>provided</scope>
838 <groupId>com.github.spotbugs</groupId>
839 <artifactId>spotbugs-annotations</artifactId>
840 <scope>provided</scope>
841 <optional>true</optional>
844 <groupId>org.gaul</groupId>
845 <artifactId>modernizer-maven-annotations</artifactId>
846 <scope>provided</scope>
850 Testing output should be routed through slf4j-simple.
853 <groupId>org.slf4j</groupId>
854 <artifactId>slf4j-simple</artifactId>
859 Unit tests can use JUnit + Mockito + Hamcrest by default.
862 <groupId>org.hamcrest</groupId>
863 <artifactId>hamcrest</artifactId>
867 <!-- This dependency needs to come before junit until we upgrade to JUnit 5. -->
868 <groupId>org.hamcrest</groupId>
869 <artifactId>hamcrest-library</artifactId>
873 <groupId>junit</groupId>
874 <artifactId>junit</artifactId>
878 <groupId>org.mockito</groupId>
879 <artifactId>mockito-core</artifactId>
887 <!-- Official maven plugins, alpha-sorted by artifactId.
888 We do not need to specify the groupId. -->
890 <artifactId>maven-checkstyle-plugin</artifactId>
891 <version>3.1.2</version>
894 <groupId>com.puppycrawl.tools</groupId>
895 <artifactId>checkstyle</artifactId>
896 <!-- This should match the dependency management on com.puppycrawl.tools:checkstyle above -->
897 <version>8.41.1</version>
900 <groupId>org.opendaylight.odlparent</groupId>
901 <artifactId>checkstyle</artifactId>
902 <version>9.0.1-SNAPSHOT</version>
905 <groupId>com.github.sevntu-checkstyle</groupId>
906 <artifactId>sevntu-checks</artifactId>
907 <version>1.39.0</version>
911 <configLocation>odl_checks.xml</configLocation>
912 <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
913 <!-- <sourceDirectories> are needed so that checkstyle ignores the
914 generated sources directory -->
916 <directory>${project.build.sourceDirectory}</directory>
918 <includeResources>true</includeResources>
919 <includeTestSourceDirectory>true</includeTestSourceDirectory>
920 <includeTestResources>true</includeTestResources>
921 <includes>**\/*.java, **\/*.xtend</includes>
923 org/opendaylight/yang/gen/**,
924 **/protobuff/messages/**,
925 **/thrift/gen/*.java,
928 <failsOnError>false</failsOnError>
929 <consoleOutput>true</consoleOutput>
933 <id>check-license</id>
937 <phase>process-sources</phase>
939 <configLocation>check-license.xml</configLocation>
940 <headerLocation>EPL-LICENSE.regexp.txt</headerLocation>
941 <includeResources>false</includeResources>
942 <includeTestSourceDirectory>true</includeTestSourceDirectory>
943 <includeTestResources>false</includeTestResources>
945 <directory>${project.build.sourceDirectory}</directory>
948 org/opendaylight/yang/gen/**,
949 **/protobuff/messages/**,
952 <failsOnError>false</failsOnError>
953 <consoleOutput>true</consoleOutput>
960 <phase>process-sources</phase>
962 <failOnViolation>${odlparent.checkstyle.enforce}</failOnViolation>
963 <skip>${odlparent.checkstyle.skip}</skip>
964 <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
970 <groupId>org.apache.maven.plugins</groupId>
971 <artifactId>maven-pmd-plugin</artifactId>
972 <version>3.14.0</version>
976 <phase>process-sources</phase>
978 <goal>cpd-check</goal>
981 <failOnViolation>${pmd.cpd.fail}</failOnViolation>
982 <!-- 100 "tokens" here correspond to approx. 5-10 lines of code -->
983 <minimumTokens>101</minimumTokens>
984 <printFailingErrors>true</printFailingErrors>
986 <!-- FIXME: this should be a wildcard, but PMD is brain-damaged and does
987 not understand path prefixes nor wildcards. Details are available
988 at http://stackoverflow.com/questions/15647771/pmd-exclude-not-working
989 Hence people introducing new generated sources have to include
992 <excludeRoot>${project.build.directory}/generated-sources</excludeRoot>
993 <excludeRoot>${project.build.directory}/generated-test-sources</excludeRoot>
995 <linkXRef>false</linkXRef>
1001 <artifactId>maven-compiler-plugin</artifactId>
1002 <version>3.8.1</version>
1004 <showWarnings>true</showWarnings>
1006 <arg>-parameters</arg>
1007 <arg>-Xlint:all</arg>
1008 <!-- Disable 'No processor claimed any of these annotations' -->
1009 <arg>-Xlint:-processing</arg>
1011 <annotationProcessorPaths>
1013 <groupId>org.immutables</groupId>
1014 <artifactId>value</artifactId>
1015 <!-- Keep this version in sync with dependency declaration above -->
1016 <version>2.8.8</version>
1019 <groupId>org.kohsuke.metainf-services</groupId>
1020 <artifactId>metainf-services</artifactId>
1021 <!-- Keep this version in sync with dependency declaration above -->
1022 <version>1.8</version>
1024 </annotationProcessorPaths>
1028 <artifactId>maven-failsafe-plugin</artifactId>
1029 <version>2.22.2</version>
1032 <artifactId>maven-invoker-plugin</artifactId>
1033 <version>3.2.2</version>
1036 <artifactId>maven-dependency-plugin</artifactId>
1039 <id>unpack-license</id>
1040 <phase>generate-resources</phase>
1047 <groupId>org.opendaylight.odlparent</groupId>
1048 <artifactId>odl-license</artifactId>
1049 <version>9.0.1-SNAPSHOT</version>
1050 <type>license</type>
1051 <outputDirectory>${project.build.outputDirectory}</outputDirectory>
1052 <destFileName>LICENSE</destFileName>
1053 <overWrite>false</overWrite>
1056 <silent>true</silent>
1060 <id>analyze-declarations</id>
1062 <goal>analyze-only</goal>
1065 <failOnWarning>${odlparent.dependency.enforce}</failOnWarning>
1066 <ignoreNonCompile>true</ignoreNonCompile>
1067 <skip>${odlparent.dependency.skip}</skip>
1074 <artifactId>maven-plugin-plugin</artifactId>
1075 <version>3.6.0</version>
1079 <artifactId>maven-remote-resources-plugin</artifactId>
1080 <version>1.7.0</version>
1083 <artifactId>maven-shade-plugin</artifactId>
1084 <version>3.2.4</version>
1087 <artifactId>maven-source-plugin</artifactId>
1088 <version>3.2.1</version>
1091 <id>attach-sources</id>
1092 <phase>verify</phase>
1094 <goal>jar-no-fork</goal>
1100 <artifactId>maven-surefire-plugin</artifactId>
1101 <version>2.22.2</version>
1103 <redirectTestOutputToFile>${maven.test.redirectTestOutputToFile}</redirectTestOutputToFile>
1104 <trimStackTrace>false</trimStackTrace>
1108 <!-- Third-party plugins, grouped by groupId, alpha-sorted by artifactId -->
1110 <!-- Support Blueprint XML construction using annotations -->
1111 <groupId>org.apache.aries.blueprint</groupId>
1112 <artifactId>blueprint-maven-plugin</artifactId>
1113 <version>1.10.0</version>
1114 <!-- TODO remove dependencies when we bump from 1.10.0 to 1.11.0 (or 1.10.1);
1115 see https://jira.opendaylight.org/browse/ODLPARENT-167 & https://jira.apache.org/jira/browse/ARIES-1826 -->
1118 <groupId>org.apache.xbean</groupId>
1119 <artifactId>xbean-finder-shaded</artifactId>
1120 <version>4.18</version>
1125 <scanPath>${project.groupId}</scanPath>
1131 <goal>blueprint-generate</goal>
1138 <groupId>com.github.ekryd.echo-maven-plugin</groupId>
1139 <artifactId>echo-maven-plugin</artifactId>
1140 <version>1.3.2</version>
1144 <groupId>org.apache.felix</groupId>
1145 <artifactId>maven-bundle-plugin</artifactId>
1146 <version>4.2.1</version>
1147 <extensions>true</extensions>
1150 <!-- Note the '-' for git.properties.. this is required because git-commit-id-plugin has <failOnNoGitDirectory>false,
1151 so that the build doesn't fail if there is no .../.git/ - so git.properties is effectively optional;
1152 and so the '-' there is needed to make the maven-bundle-plugin if that resource is not present. -->
1153 <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>
1155 <!-- Based on https://dev.eclipse.org/mhonarc/lists/equinox-dev/msg01088.html we do want
1156 to generate Import-Service and Export-Service headers. -->
1157 <_removeheaders>Import-Service,Export-Service</_removeheaders>
1162 <groupId>biz.aQute.bnd</groupId>
1163 <artifactId>biz.aQute.bndlib</artifactId>
1164 <version>5.1.0</version>
1170 <groupId>org.apache.karaf.tooling</groupId>
1171 <artifactId>karaf-maven-plugin</artifactId>
1172 <version>${karaf.version}</version>
1173 <extensions>true</extensions>
1177 <groupId>org.apache.servicemix.tooling</groupId>
1178 <artifactId>depends-maven-plugin</artifactId>
1179 <version>1.4.0</version>
1182 <id>generate-depends-file</id>
1184 <goal>generate-depends-file</goal>
1191 <groupId>com.webcohesion.enunciate</groupId>
1192 <artifactId>enunciate-maven-plugin</artifactId>
1193 <!-- This must be aligned with the version of enunciate-core-annotations specified above -->
1194 <version>2.13.3</version>
1198 <groupId>org.gaul</groupId>
1199 <artifactId>modernizer-maven-plugin</artifactId>
1200 <version>2.2.0</version>
1202 <javaVersion>${odlparent.modernizer.target}</javaVersion>
1203 <failOnViolations>${odlparent.modernizer.enforce}</failOnViolations>
1204 <skip>${odlparent.modernizer.skip}</skip>
1207 <!-- We are using Guava as per normal and we have grown a large body of code
1208 around the patterns there. Furthermore the suggested replacements have
1209 different behavior, hence we do NOT want to blindly migrate. Examples
1212 - ImmutableCollection et al. are not just implementation details, they
1213 form an API contract.
1214 - ImmutableMap/ImmutableSet retain iteration order, whereas their
1215 Map.of()/Set.of() counterparts have unstable iteration order (by design)
1217 <exclusionPattern>com/google/common/collect/Immutable.*</exclusionPattern>
1218 </exclusionPatterns>
1224 <phase>verify</phase>
1226 <goal>modernizer</goal>
1233 <groupId>com.github.spotbugs</groupId>
1234 <artifactId>spotbugs-maven-plugin</artifactId>
1235 <version>3.1.12.2</version>
1238 <groupId>com.github.spotbugs</groupId>
1239 <artifactId>spotbugs</artifactId>
1240 <version>3.1.12</version>
1243 <groupId>org.opendaylight.odlparent</groupId>
1244 <artifactId>spotbugs</artifactId>
1245 <version>9.0.1-SNAPSHOT</version>
1248 <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
1249 <groupId>org.slf4j</groupId>
1250 <artifactId>slf4j-simple</artifactId>
1251 <version>1.8.0-beta2</version>
1257 <groupId>jp.skypencil.findbugs.slf4j</groupId>
1258 <artifactId>bug-pattern</artifactId>
1259 <version>1.5.0</version>
1263 Enables analysis which takes more memory but finds more bugs.
1264 If you run out of memory, changes the value of the effort element
1267 <effort>Max</effort>
1268 <!-- Reports all bugs (other values are medium and max) -->
1269 <threshold>Low</threshold>
1270 <!-- Build doesn't fail if problems are found -->
1271 <failOnError>${odlparent.spotbugs.enforce}</failOnError>
1272 <skip>${odlparent.spotbugs.skip}</skip>
1273 <!-- References the excluded rules -->
1274 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
1275 <!-- Produces XML report -->
1276 <xmlOutput>true</xmlOutput>
1277 <!-- Configures the directory in which the XML report is created -->
1278 <findbugsXmlOutputDirectory>${project.build.directory}/spotbugs</findbugsXmlOutputDirectory>
1282 Ensures that SpotBugs inspects source code when project is compiled.
1285 <id>analyze-compile</id>
1286 <phase>compile</phase>
1294 <groupId>org.codehaus.mojo</groupId>
1295 <artifactId>properties-maven-plugin</artifactId>
1296 <version>1.0.0</version>
1299 <groupId>org.eclipse.xtend</groupId>
1300 <artifactId>xtend-maven-plugin</artifactId>
1301 <!-- NOTE: This version MUST be kept in sync with the Xtend version in <dependencyManagement> -->
1302 <version>2.25.0</version>
1306 <goal>compile</goal>
1307 <goal>testCompile</goal>
1310 <outputDirectory>${project.build.directory}/generated-sources/xtend</outputDirectory>
1311 <testOutputDirectory>${project.build.directory}/generated-test-sources/xtend</testOutputDirectory>
1317 <groupId>org.eclipse.m2e</groupId>
1318 <artifactId>lifecycle-mapping</artifactId>
1319 <version>1.0.0</version>
1321 <lifecycleMappingMetadata>
1324 <pluginExecutionFilter>
1325 <groupId>org.apache.felix</groupId>
1326 <artifactId>maven-bundle-plugin</artifactId>
1327 <versionRange>[1.0,)</versionRange>
1329 <goal>manifest</goal>
1331 </pluginExecutionFilter>
1337 <pluginExecutionFilter>
1338 <groupId>org.apache.maven.plugins</groupId>
1339 <artifactId>maven-enforcer-plugin</artifactId>
1340 <versionRange>[1.0.0,)</versionRange>
1342 <goal>enforce</goal>
1344 </pluginExecutionFilter>
1350 <pluginExecutionFilter>
1351 <groupId>org.apache.maven.plugins</groupId>
1352 <artifactId>maven-dependency-plugin</artifactId>
1353 <versionRange>[2.10,)</versionRange>
1357 </pluginExecutionFilter>
1363 <pluginExecutionFilter>
1364 <groupId>org.apache.maven.plugins</groupId>
1365 <artifactId>maven-pmd-plugin</artifactId>
1366 <versionRange>[3.6,)</versionRange>
1368 <goal>cpd-check</goal>
1370 </pluginExecutionFilter>
1375 <!-- The plugin will eventually be removed, remove this too at that point -->
1377 <pluginExecutionFilter>
1378 <groupId>org.apache.maven.plugins</groupId>
1379 <artifactId>maven-antrun-plugin</artifactId>
1380 <versionRange>[1.8,)</versionRange>
1384 </pluginExecutionFilter>
1390 <pluginExecutionFilter>
1391 <groupId>org.apache.servicemix.tooling</groupId>
1392 <artifactId>depends-maven-plugin</artifactId>
1393 <versionRange>[1.2,)</versionRange>
1395 <goal>generate-depends-file</goal>
1397 </pluginExecutionFilter>
1403 <pluginExecutionFilter>
1404 <groupId>org.jacoco</groupId>
1405 <artifactId>jacoco-maven-plugin</artifactId>
1406 <versionRange>[0.7.0,)</versionRange>
1408 <goal>prepare-agent</goal>
1410 </pluginExecutionFilter>
1417 <pluginExecutionFilter>
1418 <groupId>org.ops4j.pax.exam</groupId>
1419 <artifactId>maven-paxexam-plugin</artifactId>
1420 <versionRange>[1.2.4,)</versionRange>
1422 <goal>generate-depends-file</goal>
1424 </pluginExecutionFilter>
1431 <pluginExecutionFilter>
1432 <groupId>org.basepom.maven</groupId>
1434 duplicate-finder-maven-plugin
1436 <versionRange>[1.2.1,)</versionRange>
1440 </pluginExecutionFilter>
1446 </lifecycleMappingMetadata>
1451 <groupId>org.jacoco</groupId>
1452 <artifactId>jacoco-maven-plugin</artifactId>
1454 <!-- Note: This exclusion list should match <sonar.exclusions>
1457 <exclude>**/gen/**</exclude>
1458 <exclude>**/generated-sources/**</exclude>
1459 <exclude>**/generated-test-sources/**</exclude>
1460 <exclude>**/yang-gen/**</exclude>
1461 <exclude>**/yang-gen-config/**</exclude>
1462 <exclude>**/yang-gen-sal/**</exclude>
1463 <exclude>**/yang-gen-code/**</exclude>
1464 <exclude>**/pax/**</exclude>
1470 <groupId>org.ops4j.pax.exam</groupId>
1471 <artifactId>maven-paxexam-plugin</artifactId>
1472 <version>1.2.4</version>
1475 <!-- When updating this version, consider antl4-runtime above -->
1477 <groupId>org.antlr</groupId>
1478 <artifactId>antlr4-maven-plugin</artifactId>
1479 <version>4.9.2</version>
1486 <artifactId>maven-enforcer-plugin</artifactId>
1489 <id>enforce-banned-dependencies</id>
1491 <goal>enforce</goal>
1495 <bannedDependencies>
1496 <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>
1498 <exclude>org.mockito:mockito-all</exclude>
1499 <exclude>com.google.code.findbugs:annotations</exclude>
1501 </bannedDependencies>
1509 <groupId>org.basepom.maven</groupId>
1510 <artifactId>duplicate-finder-maven-plugin</artifactId>
1511 <version>1.5.0</version>
1514 <id>find-duplicate-classpath-entries</id>
1515 <phase>verify</phase>
1522 <!-- https://github.com/basepom/duplicate-finder-maven-plugin/wiki -->
1523 <failBuildInCaseOfConflict>false</failBuildInCaseOfConflict>
1524 <failBuildInCaseOfDifferentContentConflict>true</failBuildInCaseOfDifferentContentConflict>
1525 <failBuildInCaseOfEqualContentConflict>false</failBuildInCaseOfEqualContentConflict>
1526 <printEqualFiles>false</printEqualFiles>
1528 <!-- In addition to https://github.com/basepom/duplicate-finder-maven-plugin/wiki/Default%20ignored%20elements,
1529 as explained on https://github.com/basepom/duplicate-finder-maven-plugin/wiki/Ignoring%20Dependencies%20and%20Resources,
1530 we use resources not dependencies (see https://github.com/basepom/duplicate-finder-maven-plugin/wiki/Classpath%20Exceptions)
1532 <ignoredResourcePatterns>
1533 <ignoredResourcePattern>org/opendaylight/blueprint/.*\.xml$</ignoredResourcePattern>
1534 <ignoredResourcePattern>OSGI-OPT/bnd.bnd$</ignoredResourcePattern>
1535 <ignoredResourcePattern>WEB-INF/web.xml</ignoredResourcePattern>
1536 <ignoredResourcePattern>README.*$</ignoredResourcePattern>
1537 <ignoredResourcePattern>.*\.html$</ignoredResourcePattern>
1538 <ignoredResourcePattern>reference.conf</ignoredResourcePattern>
1539 </ignoredResourcePatterns>
1540 <ignoredDependencies>
1542 <groupId>org.slf4j</groupId>
1543 <artifactId>slf4j-simple</artifactId>
1544 </ignoredDependency>
1546 <groupId>org.opendaylight.odlparent</groupId>
1547 <artifactId>opendaylight-karaf-empty</artifactId>
1548 </ignoredDependency>
1549 </ignoredDependencies>
1553 <artifactId>maven-dependency-plugin</artifactId>
1556 <artifactId>maven-checkstyle-plugin</artifactId>
1559 <artifactId>maven-pmd-plugin</artifactId>
1562 <artifactId>maven-source-plugin</artifactId>
1565 <artifactId>maven-javadoc-plugin</artifactId>
1568 <groupId>org.gaul</groupId>
1569 <artifactId>modernizer-maven-plugin</artifactId>
1572 <groupId>com.github.spotbugs</groupId>
1573 <artifactId>spotbugs-maven-plugin</artifactId>
1576 <!-- Jacoco / Sonar -->
1578 <groupId>org.jacoco</groupId>
1579 <artifactId>jacoco-maven-plugin</artifactId>
1582 <id>pre-unit-test</id>
1584 <goal>prepare-agent</goal>
1597 <groupId>com.alexecollins.maven.plugin</groupId>
1598 <artifactId>script-maven-plugin</artifactId>
1599 <version>1.0.0</version>
1602 <phase>prepare-package</phase>
1604 <goal>execute</goal>
1608 // BeanShell is 2005-ish and thus doesn't support generics, varargs, try-with-resources or lambdas, so:
1609 // (If we do this kind of inline code in pom.xml more often, we shold have a new simple module in
1610 // odl-parent, which has *.java that we compile, and then just depend on it here and call one-line
1611 // static class methods only - it will be MUCH easier to write!)
1612 void copy(File root, String glob, File target) {
1613 java.nio.file.DirectoryStream dirStream = java.nio.file.Files.newDirectoryStream(root.toPath(), glob);
1614 Iterator dirStreamIterator = dirStream.iterator();
1615 while (dirStreamIterator.hasNext()) {
1616 java.nio.file.Path path = dirStreamIterator.next();
1617 java.nio.file.Files.copy(path, new File(target, path.toFile().getName()).toPath(),
1618 new java.nio.file.CopyOption[] {
1619 java.nio.file.StandardCopyOption.REPLACE_EXISTING,
1620 java.nio.file.StandardCopyOption.COPY_ATTRIBUTES
1627 File gitRepoRootDir = project.basedir;
1628 while (!new File(gitRepoRootDir, ".git").exists() && gitRepoRootDir.getParentFile() != null) {
1629 gitRepoRootDir = gitRepoRootDir.getParentFile();
1632 File target = new File(project.build.outputDirectory);
1634 copy(gitRepoRootDir, "README*", target);
1635 copy(gitRepoRootDir, "CONTRIBUTING*", target);
1636 copy(gitRepoRootDir, "PROJECT_INFO.yaml", target);
1643 <groupId>org.apache-extras.beanshell</groupId>
1644 <artifactId>bsh</artifactId>
1645 <version>2.0b6</version>
1654 <id>disable-spotbugs</id>
1656 <!-- Current spotbugs does not support JDK15+ -->
1661 <odlparent.spotbugs.skip>true</odlparent.spotbugs.skip>
1667 <groupId>com.github.ekryd.echo-maven-plugin</groupId>
1668 <artifactId>echo-maven-plugin</artifactId>
1671 <id>UNTESTED-JDK</id>
1677 <message>Running on JDK newer than 11, which is not supported. Skipping SpotBugs execution.</message>
1690 <artifactId>maven-checkstyle-plugin</artifactId>
1691 <version>3.1.0</version>
1694 <!-- FIXME: activate this
1696 <artifactId>maven-project-info-reports-plugin</artifactId>
1699 <groupId>org.codehaus.mojo</groupId>
1700 <artifactId>jdepend-maven-plugin</artifactId>
1704 <report>generate-no-fork</report>