Package org.gaul.modernizer_maven_plugin
Class ModernizerMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.gaul.modernizer_maven_plugin.ModernizerMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="modernizer",
defaultPhase=PROCESS_TEST_CLASSES,
threadSafe=true)
public final class ModernizerMojo
extends org.apache.maven.plugin.AbstractMojo
-
Field Summary
FieldsModifier and TypeFieldDescriptionViolation patterns to disable.Violations to disable.protected booleanFail phase if Modernizer detects any violations.Fully qualified class names (incl.Package prefixes to ignore, specified using <ignorePackage> child elements.protected booleanRun Modernizer on test classes.protected booleanSkips the plugin execution.protected StringUser-specified violation file.User-specified violation files.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
failOnViolations
@Parameter(defaultValue="true", property="modernizer.failOnViolations") protected boolean failOnViolationsFail phase if Modernizer detects any violations. -
includeTestClasses
@Parameter(defaultValue="true", property="modernizer.includeTestClasses") protected boolean includeTestClassesRun Modernizer on test classes. -
violationsFile
User-specified violation file. Also disables standard violation checks. Can point to files from classpath using an absolute path, e.g.: classpath:/modernizer.xml for the default violations file. -
violationsFiles
User-specified violation files. The violations loaded from violationsFiles override the ones specified in violationsFile (or the default violations file if no violationsFile is given). Violations from the latter files override violations from the former files. Can point to files from classpath using an absolute path, e.g.: classpath:/modernizer.xml for the default violations file. -
exclusions
Violations to disable. Each exclusion should be in the javap format: java/lang/String.getBytes:(Ljava/lang/String;)[B. -
exclusionPatterns
Violation patterns to disable. Each exclusion should be a regular expression that matches the javap format: java/lang/.* -
ignorePackages
Package prefixes to ignore, specified using <ignorePackage> child elements. Specifying foo.bar subsequently ignores foo.bar.*, foo.bar.baz.* and so on. -
ignoreClassNamePatterns
Fully qualified class names (incl. package) to ignore by regular expression, specified using <ignoreClassNamePattern> child elements. Specifying .*.bar.* ignores foo.bar.*, foo.bar.baz.* but also bar.* and so on; or .*Immutable ignores all class with names ending in Immutable in all packages. -
skip
@Parameter(defaultValue="false", property="modernizer.skip") protected boolean skipSkips the plugin execution.- Since:
- 1.4.0
-
-
Constructor Details
-
ModernizerMojo
public ModernizerMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-