org.apache.maven.plugins.enforcer
Class RequireProperty

java.lang.Object
  extended by org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
      extended by org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule
          extended by org.apache.maven.plugins.enforcer.RequireProperty

public class RequireProperty
extends AbstractNonCacheableEnforcerRule

This rule checks that certain properties are set.

Author:
Paul Gier

Field Summary
 String property
          Specify the required property.
 String regex
          Match the property value to a given regular expression.
 String regexMessage
          Specify a warning message if the regular expression is not matched.
 
Fields inherited from class org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
message
 
Constructor Summary
RequireProperty()
           
 
Method Summary
 void execute(EnforcerRuleHelper helper)
          Execute the rule.
 
Methods inherited from class org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule
getCacheId, isCacheable, isResultValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

property

public String property
Specify the required property.


regex

public String regex
Match the property value to a given regular expression. Defaults to null (any value is ok).


regexMessage

public String regexMessage
Specify a warning message if the regular expression is not matched.

Constructor Detail

RequireProperty

public RequireProperty()
Method Detail

execute

public void execute(EnforcerRuleHelper helper)
             throws EnforcerRuleException
Execute the rule.

Parameters:
helper - the helper
Throws:
EnforcerRuleException - the enforcer rule exception


Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.