public class RequirePrerequisite extends AbstractNonCacheableEnforcerRule
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
mavenVersion
Can either be version or a range, e.g.
|
private java.util.List<java.lang.String> |
packagings
Only the projects with one of these packagings will be enforced to have the correct prerequisite.
|
| Constructor and Description |
|---|
RequirePrerequisite() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(EnforcerRuleHelper helper)
This is the interface into the rule.
|
void |
setMavenVersion(java.lang.String mavenVersion)
Set the mavenVersion Can either be version or a range, e.g.
|
void |
setPackagings(java.util.List<java.lang.String> packagings)
Only the projects with one of these packagings will be enforced to have the correct prerequisite.
|
getCacheId, isCacheable, isResultValidgetLevel, getMessage, setLevel, setMessageprivate java.util.List<java.lang.String> packagings
private java.lang.String mavenVersion
2.2.1 or [2.2.1,)public void setMavenVersion(java.lang.String mavenVersion)
2.2.1 or [2.2.1,)mavenVersion - the version or nullpublic void setPackagings(java.util.List<java.lang.String> packagings)
packagings - the list of packagingspublic void execute(EnforcerRuleHelper helper) throws EnforcerRuleException
helper - The helper provides access to the log, MavenSession and has
helpers to get common components. It is also able to lookup components
by class name.EnforcerRuleException - the enforcer rule exception