Full name:
de.thetaphi:forbiddenapis:1.8:check
Description:
This Mojo exists since version 1.2, replacing the old
forbiddenapis:forbiddenapis
goal. In most cases
its enough to rename the goal on update, the older v1.0 properties
are still available.
Attributes:
compile
.1.2
.process-classes
.Name | Type | Since | Description |
---|---|---|---|
bundledSignatures | String[] |
1.0 |
Specifies built-in signatures
files (e.g., deprecated APIs for specific Java versions, unsafe
method calls using default locale, default charset,...) |
classesDirectory | File |
1.2 |
Directory with the class files to check. Default value is: ${project.build.outputDirectory} . |
excludes | String[] |
1.0 |
List of patterns matching class files to be excluded from checking. |
failOnMissingClasses | boolean |
1.0 |
Fail the build, if a class referenced in the scanned code is
missing. This requires that you pass the whole classpath including
all dependencies to this Mojo (Maven does this by default). Default value is: true . |
failOnUnresolvableSignatures | boolean |
1.4 |
Fail the build if a signature is not resolving. If this parameter
is set to to false, then such signatures are silently ignored. This
is useful in multi-module Maven projects where only some modules
have the dependency to which the signature file(s) apply. Default value is: true . |
failOnUnsupportedJava | boolean |
1.0 |
Fail the build, if the bundled ASM library cannot read the class
file format of the runtime library or the runtime library cannot be
discovered. Default value is: false . |
includes | String[] |
1.0 |
List of patterns matching all class files to be parsed from the
classesDirectory. Can be changed to e.g. exclude several files
(using excludes). The default is a single include with pattern
'**/*.class' |
internalRuntimeForbidden | boolean |
1.0 |
Forbids calls to classes from the internal java runtime (like
sun.misc.Unsafe) Default value is: false . |
signatures | String |
1.0 |
Gives a multiline list of signatures, inline in the pom.xml. Use an
XML CDATA section to do that! The signatures are resolved against
the compile classpath. |
signaturesFiles | File[] |
1.0 |
Lists all files, which contain signatures and comments for
forbidden API calls. The signatures are resolved against the
compile classpath. |
skip | boolean |
1.6 |
Skip entire check. Most useful on the command line via
"-Dforbiddenapis.skip=true". Default value is: false .User property is: forbiddenapis.skip . |
suppressAnnotations | String[] |
1.8 |
List of a custom Java annotations (full class names) that are used
in the checked code to suppress errors. Those annotations must have
at least RetentionPolicy.CLASS . They can be applied to
classes, their methods, or fields. By default,
@de.thetaphi.forbiddenapis.SuppressForbidden can
always be used, but needs the forbidden-apis.jar file
in classpath of compiled project, which may not be wanted. Instead
of a full class name, a glob pattern may be used (e.g.,
**.SuppressForbidden ). |
targetVersion | String |
1.0 |
The default compiler target version used to expand references to
bundled JDK signatures. E.g., if you use "jdk-deprecated", it will
expand to this version. This setting should be identical to the
target version used in the compiler plugin. Default value is: ${maven.compiler.target} . |
java.lang.String[]
1.0
No
java.io.File
1.2
No
${project.build.outputDirectory}
java.lang.String[]
1.0
No
boolean
1.0
No
true
boolean
1.4
No
true
boolean
1.0
No
false
java.lang.String[]
1.0
No
boolean
1.0
No
false
java.lang.String
1.0
No
java.io.File[]
1.0
No
skip:
boolean
1.6
No
forbiddenapis.skip
false
RetentionPolicy.CLASS
. They can be applied to
classes, their methods, or fields. By default,
@de.thetaphi.forbiddenapis.SuppressForbidden
can
always be used, but needs the forbidden-apis.jar
file
in classpath of compiled project, which may not be wanted. Instead
of a full class name, a glob pattern may be used (e.g.,
**.SuppressForbidden
).java.lang.String[]
1.8
No
java.lang.String
1.0
No
${maven.compiler.target}