This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git
The following commit(s) were added to refs/heads/master by this push:
new edfd5b1 [MENFORCER-425] Clarify usage of maven-enforcer-rules (#215)
edfd5b1 is described below
commit edfd5b10706684655e058cb14e61eaf0932ed303
Author: Konrad Windszus <[email protected]>
AuthorDate: Sun Jan 1 12:47:16 2023 +0100
[MENFORCER-425] Clarify usage of maven-enforcer-rules (#215)
---
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
++---+