Enforcer rule that will check the bytecode version of each class of each dependency.
Adapted from org.apache.maven.plugins.enforcer.EnforceBytecodeVersion
.
Modifiers | Name | Description |
---|---|---|
protected static class |
EnforceBytecodeVersion.ArtifactMatcher |
|
static class |
EnforceBytecodeVersion.Dependency |
Type | Name and description |
---|---|
ListProperty<String> |
configurations Optional list of dependency configurations to search. |
ListProperty<Dependency> |
excludes |
ListProperty<String> |
ignoreClasses List of classes to ignore. |
ListProperty<Dependency> |
includes |
Property<Integer> |
maxJavaMajorVersionNumber If unsure, don't use that parameter. |
Property<Integer> |
maxJavaMinorVersionNumber This parameter is here for potentially advanced use cases, but it seems like it is actually always 0. |
Property<String> |
maxJdkVersion JDK version as used for example in the maven-compiler-plugin: 1.5, 1.6 and so on. |
Property<Boolean> |
showErrors |
Constructor and description |
---|
EnforceBytecodeVersion
(ObjectFactory objects) |
Type Params | Return Type | Name and description |
---|---|---|
|
protected Map<ResolvedArtifact, String> |
checkDependencies(EnforcerContext context, Set<ResolvedArtifact> dependencies) |
|
protected void |
doExecute(EnforcerContext context) |
|
protected void |
doValidate(EnforcerContext context) |
|
void |
exclude(String str) |
|
void |
exclude(Map<String, String> map) |
|
void |
ignore(String str) |
|
void |
include(String str) |
|
void |
include(Map<String, String> map) |
|
static String |
renderVersion(int major, int minor) |
Methods inherited from class | Name |
---|---|
class AbstractResolveDependencies |
asRegex |
class AbstractFilteringEnforcerRule |
doValidate, execute, setPhases |
class AbstractEnforcerRule |
doExecute, doValidate, execute, fail, fail, fail, illegalArgumentException, illegalArgumentException, resolveClassName, setEnforcerLevel, validate |
Optional list of dependency configurations to search.
List of classes to ignore. Wildcard at the end accepted
If unsure, don't use that parameter. Better look at maxJdkVersion. Mandatory if maxJdkVersion is not specified. see http://en.wikipedia.org/wiki/Java_class_file#General_layout
This parameter is here for potentially advanced use cases, but it seems like it is actually always 0.
JDK version as used for example in the maven-compiler-plugin: 1.5, 1.6 and so on. If in need of more precise configuration please see maxJavaMajorVersionNumber and maxJavaMinorVersionNumber Mandatory if maxJavaMajorVersionNumber not specified.
Groovy Documentation