Class RequireProjectUrl

  • All Implemented Interfaces:
    org.apache.maven.enforcer.rule.api.EnforcerRuleBase

    @Named("requireProjectUrl")
    public class RequireProjectUrl
    extends org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
    This rule enforces the presence of an URL and optionally matches the URL against a regex
    Since:
    1.0-beta-4
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.apache.maven.project.MavenProject project  
      private java.lang.String regex
      The regex that the url must match.
    • Constructor Summary

      Constructors 
      Constructor Description
      RequireProjectUrl​(org.apache.maven.project.MavenProject project)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()  
      org.apache.maven.enforcer.rule.api.EnforcerLogger getLog()  
      void setLog​(org.apache.maven.enforcer.rule.api.EnforcerLogger arg0)  
      java.lang.String toString()  
      • Methods inherited from class org.apache.maven.enforcer.rule.api.AbstractEnforcerRule

        getCacheId, getLevel
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • regex

        private java.lang.String regex
        The regex that the url must match. Default is a non-empty URL
      • project

        private final org.apache.maven.project.MavenProject project
    • Constructor Detail

      • RequireProjectUrl

        @Inject
        RequireProjectUrl​(org.apache.maven.project.MavenProject project)
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.enforcer.rule.api.EnforcerRuleException
        Specified by:
        execute in class org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
        Throws:
        org.apache.maven.enforcer.rule.api.EnforcerRuleException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setLog

        public void setLog​(org.apache.maven.enforcer.rule.api.EnforcerLogger arg0)
        Specified by:
        setLog in interface org.apache.maven.enforcer.rule.api.EnforcerRuleBase
      • getLog

        public org.apache.maven.enforcer.rule.api.EnforcerLogger getLog()