Class RequireContributorRoles
java.lang.Object
org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
org.codehaus.mojo.extraenforcer.model.RequireContributorRoles
- All Implemented Interfaces:
org.apache.maven.enforcer.rule.api.EnforcerRuleBase
@Named("requireContributorRoles")
public class RequireContributorRoles
extends org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
This rule verifies that certain contributor roles are filled.
- Since:
- 1.0-alpha-3
- Author:
- Mirko Friedenhagen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Execute the rule.org.apache.maven.enforcer.rule.api.EnforcerLogger
getLog()
protected final String
Returns the rolename.protected List
<org.apache.maven.model.Contributor> getRoles
(org.apache.maven.project.MavenProject mavenProject) Returns the roles from the POM.void
setLog
(org.apache.maven.enforcer.rule.api.EnforcerLogger arg0) Methods inherited from class org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
getCacheId, getLevel
-
Constructor Details
-
RequireContributorRoles
@Inject public RequireContributorRoles(org.apache.maven.project.MavenProject project)
-
-
Method Details
-
getRoleName
-
getRoles
protected List<org.apache.maven.model.Contributor> getRoles(org.apache.maven.project.MavenProject mavenProject) Returns the roles from the POM.- Parameters:
mavenProject
-- Returns:
- the list of
Contributor
s orDeveloper
s.
-
execute
public void execute() throws org.apache.maven.enforcer.rule.api.EnforcerRuleExceptionExecute the rule.- Specified by:
execute
in classorg.apache.maven.enforcer.rule.api.AbstractEnforcerRule
- Throws:
org.apache.maven.enforcer.rule.api.EnforcerRuleException
- the enforcer rule exception
-
setLog
public void setLog(org.apache.maven.enforcer.rule.api.EnforcerLogger arg0) - Specified by:
setLog
in interfaceorg.apache.maven.enforcer.rule.api.EnforcerRuleBase
-
getLog
public org.apache.maven.enforcer.rule.api.EnforcerLogger getLog()
-