code: public void execute( EnforcerRuleHelper theHelper )
          throws EnforcerRuleException
      {
  
          MavenProject project = getProject( theHelper );
  
          if ( project.getArtifact().isSnapshot() )
          {
              String message = getMessage();
              StringBuffer buf = new StringBuffer();
              if ( message != null )
              {
                  buf.append( message ).append( '\n' );
              }
              buf.append( "This project cannot be a snapshot:" ).append( project.getArtifact().getId() );
              throw new EnforcerRuleException( buf.toString() );
          }
          if ( failWhenParentIsSnapshot )
          {
              Artifact parentArtifact = project.getParentArtifact();
              if ( parentArtifact != null && parentArtifact.isSnapshot() )
              {
                  throw new EnforcerRuleException( "Parent Cannot be a snapshot: " + parentArtifact.getId() );
              }
          }
  
      }
docs: /*
  (non-Javadoc)
  
  @see org.apache.maven.enforcer.rule.api.EnforcerRule#execute(org.apache.maven.enforcer.rule.api.EnforcerRuleHelper)