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
Fields Modifier and Type Field Description protected Set<String>exclusionPatternsViolation patterns to disable.protected Set<String>exclusionsViolations to disable.protected booleanfailOnViolationsFail phase if Modernizer detects any violations.protected Set<String>ignoreClassNamePatternsFully qualified class names (incl.protected Set<String>ignorePackagesPackage prefixes to ignore, specified using <ignorePackage> child elements.protected booleanincludeTestClassesRun Modernizer on test classes.protected booleanskipSkips the plugin execution.protected StringviolationsFileUser-specified violation file.protected List<String>violationsFilesUser-specified violation files.
-
Constructor Summary
Constructors Constructor Description ModernizerMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()
-
-
-
Field Detail
-
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
@Parameter(property="modernizer.violationsFile") protected String 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
@Parameter(property="modernizer.violationsFiles") protected List<String> 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
@Parameter protected Set<String> exclusions
Violations to disable. Each exclusion should be in the javap format: java/lang/String.getBytes:(Ljava/lang/String;)[B.
-
exclusionPatterns
@Parameter protected Set<String> exclusionPatterns
Violation patterns to disable. Each exclusion should be a regular expression that matches the javap format: java/lang/.*
-
ignorePackages
@Parameter protected Set<String> ignorePackages
Package prefixes to ignore, specified using <ignorePackage> child elements. Specifying foo.bar subsequently ignores foo.bar.*, foo.bar.baz.* and so on.
-
ignoreClassNamePatterns
@Parameter protected Set<String> 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
-
-