public class RequireActiveProfile extends AbstractNonCacheableEnforcerRule
| Constructor and Description | 
|---|
RequireActiveProfile()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
execute(EnforcerRuleHelper theHelper)
This is the interface into the rule. 
 | 
String | 
getProfiles()  | 
boolean | 
isAll()  | 
protected boolean | 
isProfileActive(org.apache.maven.project.MavenProject project,
                              String profileName)
Checks if profile is active. 
 | 
void | 
setAll(boolean all)  | 
void | 
setProfiles(String profiles)  | 
getCacheId, isCacheable, isResultValidgetLevel, getMessage, setLevel, setMessagepublic RequireActiveProfile()
public final String getProfiles()
public final void setProfiles(String profiles)
public final boolean isAll()
public final void setAll(boolean all)
public void execute(EnforcerRuleHelper theHelper) throws EnforcerRuleException
EnforcerRuletheHelper - 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 exceptionprotected boolean isProfileActive(org.apache.maven.project.MavenProject project, String profileName)
project - the projectprofileName - the profile nametrue if profile is active, otherwise falseCopyright © 2007–2015 The Apache Software Foundation. All rights reserved.