org.apache.maven.plugins.enforcer
Class RequireActiveProfile
java.lang.Object
org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule
org.apache.maven.plugins.enforcer.RequireActiveProfile
public class RequireActiveProfile
- extends AbstractNonCacheableEnforcerRule
This rule checks that some profiles are active.
- Author:
- Brian Fox
Field Summary |
boolean |
all
If all profiles must be active. |
String |
profiles
Comma separated list of profiles to check. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
profiles
public String profiles
- Comma separated list of profiles to check.
all
public boolean all
- If all profiles must be active. If false, only one must be active
RequireActiveProfile
public RequireActiveProfile()
execute
public void execute(EnforcerRuleHelper theHelper)
throws EnforcerRuleException
- Throws:
EnforcerRuleException
isProfileActive
protected boolean isProfileActive(MavenProject project,
String profileName)
- Checks if profile is active.
- Parameters:
project
- the projectprofileName
- the profile name
- Returns:
true
if profile is active, otherwise false
Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.