Uploaded image for project: 'Maven Enforcer Plugin'
  1. Maven Enforcer Plugin
  2. MENFORCER-425

Clarify class loading for custom Enforcer rules

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.2.0, 3.2.1
    • Documentation
    • None

    Description

      Currently the documentation at https://maven.apache.org/enforcer/enforcer-api/writing-a-custom-rule.html#writing-a-custom-rule has an example leveraging the default (i.e. compile) scope for all dependencies.
      IMHO custom rules share the classloader with the embedding m-enforcer-p and therefore don't need "compile" scope for any of the dependencies which are always loaded by m-enforcer-p (compare with MPLUGIN-370). Those dependencies are https://github.com/apache/maven-enforcer/blob/master/maven-enforcer-plugin/pom.xml#L63-L70. That should be mentioned in the documentation for custom rules as well.

      Attachments

        Activity

          People

            sjaranowski Slawomir Jaranowski
            kwin Konrad Windszus
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: