Class EnforceExtension


  • @Named("enforcer")
    public class EnforceExtension
    extends org.apache.maven.AbstractMavenLifecycleParticipant
    Extends every MavenProject with the maven-enforcer-plugin, adding executions as defined in .mvn/enforcer-extension.xml
    Since:
    3.0.0
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterProjectsRead​(org.apache.maven.execution.MavenSession session)  
      private static java.lang.String get​(org.codehaus.plexus.util.xml.Xpp3Dom elm, java.lang.String name, java.lang.String defaultValue)  
      private static org.apache.maven.model.PluginExecution getPluginExecution​(org.codehaus.plexus.util.xml.Xpp3Dom execution)  
      • Methods inherited from class org.apache.maven.AbstractMavenLifecycleParticipant

        afterSessionEnd, afterSessionStart
      • Methods inherited from class java.lang.Object

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

      • ENFORCER_EXTENSION_XML

        private static final java.lang.String ENFORCER_EXTENSION_XML
        See Also:
        Constant Field Values
    • Constructor Detail

      • EnforceExtension

        public EnforceExtension()
    • Method Detail

      • afterProjectsRead

        public void afterProjectsRead​(org.apache.maven.execution.MavenSession session)
                               throws org.apache.maven.MavenExecutionException
        Overrides:
        afterProjectsRead in class org.apache.maven.AbstractMavenLifecycleParticipant
        Throws:
        org.apache.maven.MavenExecutionException
      • getPluginExecution

        private static org.apache.maven.model.PluginExecution getPluginExecution​(org.codehaus.plexus.util.xml.Xpp3Dom execution)
      • get

        private static java.lang.String get​(org.codehaus.plexus.util.xml.Xpp3Dom elm,
                                            java.lang.String name,
                                            java.lang.String defaultValue)