code: public void execute( EnforcerRuleHelper helper )
          throws EnforcerRuleException
      {
          try
          {
              RuntimeInformation rti = (RuntimeInformation) helper.getComponent( RuntimeInformation.class );
              ArtifactVersion detectedMavenVersion = rti.getApplicationVersion();
              helper.getLog().debug( "Detected Maven Version: " + detectedMavenVersion );
              enforceVersion( helper.getLog(), "Maven", getVersion(), detectedMavenVersion );
          }
          catch ( ComponentLookupException e )
          {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  
      }
docs: /*
  (non-Javadoc)
  
  @see org.apache.maven.enforcer.rule.api.EnforcerRule#execute(org.apache.maven.enforcer.rule.api.EnforcerRuleHelper)