-
Notifications
You must be signed in to change notification settings - Fork 2
/
pom.xml
143 lines (136 loc) · 7.1 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=2 tabstop=2: -->
<!--
Copyright © 2017 Red Hat, Inc. and others. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>bundle-parent</artifactId>
<version>3.0.2</version>
<relativePath />
</parent>
<groupId>org.opendaylight.infrautils</groupId>
<artifactId>parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<!-- <name> formatting is used by autorelease to parse and notify projects on
build failure. Please do not modify this unless you have a good reason. -->
<name>ODL :: infrautils :: ${project.artifactId}</name>
<packaging>pom</packaging>
<properties>
<!-- Enforce all of odlparent's optional code quality checks: -->
<pmd.cpd.fail>true</pmd.cpd.fail> <!-- Fails build for copy/pasted code -->
<duplicate-finder.skip>false</duplicate-finder.skip> <!-- Fails build if duplicate classpath entries on dependencies (odlparent 3.0.0) -->
</properties>
<dependencies>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<!-- Keep this version in line with the one of error_prone_core below -->
<version>2.2.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<failOnError>true</failOnError>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- TODO showWarnings could be removed after https://git.opendaylight.org/gerrit/#/c/65150/ -->
<showWarnings>true</showWarnings>
<compilerId>javac-with-errorprone</compilerId>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<compilerArgs combine.children="append">
<!-- TODO evaluate further which other non-default error prone bug patterns could also be enabled...
http://errorprone.info/bugpatterns -->
<arg>-XepExcludedPaths:.*/target/.*</arg>
<arg>-XepDisableWarningsInGeneratedCode</arg>
<!-- TODO Do we need and want <arg>-Xep:OperatorPrecedence:OFF</arg> ? -->
<!-- There are lots of disabled goodies in error-prone which only emit warnings (which nobody will ever look at!),
so let us enable them all as least as warnings, and then selectively turn some of them into ERROR, and suppress
those we really don't want (or can't enforce for whatever reason) with OFF. -->
<arg>-XepAllDisabledChecksAsWarnings</arg>
<!-- StaticOrDefaultInterfaceMethod is an Android specific warning which we don't care about -->
<arg>-Xep:StaticOrDefaultInterfaceMethod:OFF</arg>
<!-- FieldMissingNullable is badly broken :( https://github.com/google/error-prone/issues/708 -->
<arg>-Xep:FieldMissingNullable:OFF</arg>
<arg>-Xep:ReturnMissingNullable:ERROR</arg>
<arg>-Xep:InconsistentOverloads:ERROR</arg>
<arg>-Xep:ConstructorLeaksThis:OFF</arg><!-- TODO <arg>-Xep:ConstructorLeaksThis:ERROR</arg> after https://github.com/google/error-prone/pull/789 for https://github.com/google/error-prone/issues/655, and maybe also https://github.com/google/error-prone/issues/809? -->
<arg>-Xep:MethodCanBeStatic:ERROR</arg>
<arg>-Xep:ThrowsUncheckedException:OFF</arg>
<!-- TODO <arg>-Xep:TestExceptionChecker:ERROR</arg> once all @Test with expected use org.opendaylight.infrautils.testutils.Asserts.assertThrows() instead -->
<arg>-Xep:Var:ERROR</arg>
<!-- Following are things which seem useful to enforce, found in other projects;
we could relax these again if during enforcement all over infrautils we find them to be too strict -->
<arg>-Xep:ConstantField:ERROR</arg>
<arg>-Xep:EmptySetMultibindingContributions:ERROR</arg>
<arg>-Xep:MixedArrayDimensions:ERROR</arg>
<arg>-Xep:MultipleTopLevelClasses:ERROR</arg>
<arg>-Xep:MultiVariableDeclaration:ERROR</arg>
<arg>-Xep:PackageLocation:ERROR</arg>
<arg>-Xep:PrivateConstructorForNoninstantiableModuleTest:ERROR</arg>
<arg>-Xep:RemoveUnusedImports:ERROR</arg>
<arg>-Xep:UnnecessaryStaticImport:ERROR</arg>
<arg>-Xep:UseBinds:ERROR</arg>
<arg>-Xep:WildcardImport:ERROR</arg>
<!-- FutureReturnValueIgnored is better (stronger) than error-prone's own (and FindBug's) @CheckReturnValue annotation, as it checks that ANY return Future are checked, not just those from methods annotated @CheckReturnValue -->
<arg>-Xep:FutureReturnValueIgnored:ERROR</arg>
<arg>-Xep:IntLongMath:ERROR</arg>
<arg>-Xep:FloatCast:ERROR</arg>
<arg>-Xep:ClassNewInstance:ERROR</arg>
<arg>-Xep:ConstructorInvokesOverridable:ERROR</arg>
<arg>-Xep:ThreeLetterTimeZoneID:ERROR</arg>
<arg>-Xep:UnsafeFinalization:ERROR</arg>
<arg>-Xep:MutableMethodReturnType:ERROR</arg>
<arg>-Xep:SynchronizeOnNonFinalField:ERROR</arg>
<arg>-Xep:WaitNotInLoop:ERROR</arg>
<arg>-Xep:SwitchDefault:ERROR</arg>
<arg>-Xep:ReachabilityFenceUsage:ERROR</arg>
</compilerArgs>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-javac-errorprone</artifactId>
<version>2.8.2</version>
</dependency>
<!-- Override plexus-compiler-javac-errorprone's dependency on Error Prone with the latest version -->
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<!-- Keep this version in line with the one of error_prone_annotations above -->
<version>2.2.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>