This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch kwin-patch-1 in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git
commit 9936551a09aaa39376a54457de8c3eb0ec76e774 Author: Konrad Windszus <[email protected]> AuthorDate: Sun Jan 1 11:30:05 2023 +0100 [MENFORCER-425] Clarify usage of maven-enforcer-rules --- enforcer-api/src/site/apt/writing-a-custom-rule.apt.vm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/enforcer-api/src/site/apt/writing-a-custom-rule.apt.vm b/enforcer-api/src/site/apt/writing-a-custom-rule.apt.vm index bfa61ca..b0472dd 100644 --- a/enforcer-api/src/site/apt/writing-a-custom-rule.apt.vm +++ b/enforcer-api/src/site/apt/writing-a-custom-rule.apt.vm @@ -75,9 +75,10 @@ Writing a custom rule </build> </project> +---+ - Note that the classloader is shared with the embedding <<<maven-enforcer-plugin>>> (a regular {{{https://maven.apache.org/guides/mini/guide-maven-classloading.html#3-plugin-classloaders}plugin classloader}}) + Note that the classloader is shared with the embedding <<<maven-enforcer-plugin>>> (a regular {{{https://maven.apache.org/guides/mini/guide-maven-classloading.html#Plugin_Classloaders}plugin classloader}}) and therefore the artifacts <<<org.apache.maven.enforcer:enforcer-api>>> and <<<org.apache.maven.enforcer:enforcer-rules>>> are always loaded in the same version as the embedding <<<maven-enforcer-plugin>>>. - Custom rule artifacts should therefore only depend on them and core Maven artifacts with <<<provided>>> scope (for details refer to {{{https://issues.apache.org/jira/browse/MNG-7097}MNG-7097}}). + Custom rule artifacts should therefore only depend on `enforcer-api` and core Maven artifacts with <<<provided>>> scope (for details refer to {{{https://issues.apache.org/jira/browse/MNG-7097}MNG-7097}}). + The classes available from `enforcer-rules` must not be used from custom rules, as those are not considered API and may change in backwards-incompatible ways with every `maven-enforcer` version (even minor ones). [[2]] Create your rule class. The rule must implement the {{{./apidocs/index.html}EnforcerRule}} interface. The rule can get access to components and the log via the {{{./apidocs/index.html}EnforcerRuleHelper}} interface. @@ -285,4 +286,4 @@ public class MyCustomRule </build> ... </project> -+---+ \ No newline at end of file ++---+
