public class RequireActiveProfile extends AbstractNonCacheableEnforcerRule
Modifier and Type | Field and Description |
---|---|
boolean |
all
If all profiles must be active.
|
String |
profiles
Comma separated list of profiles to check.
|
message
Constructor and Description |
---|
RequireActiveProfile() |
Modifier and Type | Method and Description |
---|---|
void |
execute(EnforcerRuleHelper theHelper)
This is the interface into the rule.
|
protected boolean |
isProfileActive(org.apache.maven.project.MavenProject project,
String profileName)
Checks if profile is active.
|
getCacheId, isCacheable, isResultValid
public String profiles
public boolean all
public void execute(EnforcerRuleHelper theHelper) throws EnforcerRuleException
EnforcerRule
theHelper
- 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 activeCopyright © 2007-2012 Apache Software Foundation. All Rights Reserved.