From 8c92bdab3ca264d9747a6d892b093d55ef917955 Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Tue, 4 Jul 2023 19:30:55 +0200 Subject: [PATCH] Clarify availability of AbstractEnforcerRule Improve links to javadoc Fix some typos --- .../apache/maven/enforcer/rule/api/AbstractEnforcerRule.java | 2 +- .../maven/enforcer/rule/api/AbstractEnforcerRuleBase.java | 2 +- .../enforcer/rule/api/AbstractEnforcerRuleConfigProvider.java | 2 +- .../org/apache/maven/enforcer/rule/api/EnforcerLogger.java | 2 +- .../org/apache/maven/enforcer/rule/api/EnforcerRuleBase.java | 2 +- .../org/apache/maven/enforcer/rule/api/EnforcerRuleError.java | 2 +- enforcer-api/src/site/apt/writing-a-custom-rule.apt.vm | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/AbstractEnforcerRule.java b/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/AbstractEnforcerRule.java index d9f9ef8d..6a96cf6b 100644 --- a/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/AbstractEnforcerRule.java +++ b/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/AbstractEnforcerRule.java @@ -25,7 +25,7 @@ * Writing a custom rule * * @author Slawomir Jaranowski - * @since 3.2.0 + * @since 3.2.1 */ public abstract class AbstractEnforcerRule extends AbstractEnforcerRuleBase { diff --git a/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/AbstractEnforcerRuleBase.java b/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/AbstractEnforcerRuleBase.java index a1856727..ae2d54f1 100644 --- a/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/AbstractEnforcerRuleBase.java +++ b/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/AbstractEnforcerRuleBase.java @@ -24,7 +24,7 @@ * Used for internal purpose. * * @author Slawomir Jaranowski - * @since 3.2.0 + * @since 3.2.1 */ abstract class AbstractEnforcerRuleBase implements EnforcerRuleBase { diff --git a/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/AbstractEnforcerRuleConfigProvider.java b/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/AbstractEnforcerRuleConfigProvider.java index 4cf04018..c9d645ad 100644 --- a/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/AbstractEnforcerRuleConfigProvider.java +++ b/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/AbstractEnforcerRuleConfigProvider.java @@ -26,7 +26,7 @@ * Provided configuration will be added to current rules list by {@code Enforcer Mojo} * * @author Slawomir Jaranowski - * @since 3.2.0 + * @since 3.2.1 */ public abstract class AbstractEnforcerRuleConfigProvider extends AbstractEnforcerRuleBase { diff --git a/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerLogger.java b/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerLogger.java index 64c5d0b2..1c156d21 100644 --- a/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerLogger.java +++ b/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerLogger.java @@ -24,7 +24,7 @@ * Logger used by enforcer rule. * * @author Slawomir Jaranowski - * @since 3.2.0 + * @since 3.2.1 */ public interface EnforcerLogger { diff --git a/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleBase.java b/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleBase.java index 0b7ef0ed..3e01bd99 100644 --- a/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleBase.java +++ b/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleBase.java @@ -24,7 +24,7 @@ * Used for internal purpose. * * @author Slawomir Jaranowski - * @since 3.2.0 + * @since 3.2.1 */ public interface EnforcerRuleBase { diff --git a/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleError.java b/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleError.java index 75962cd0..27d4af63 100644 --- a/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleError.java +++ b/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleError.java @@ -25,7 +25,7 @@ * This exception break a build immediate. * * @author Slawomir Jaranowski - * @since 3.2.0 + * @since 3.2.1 */ public class EnforcerRuleError extends EnforcerRuleException { 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 c63d26ae..290c0289 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 @@ -49,7 +49,7 @@ Writing a custom rule * Implementation of custom Enforcer Rule - The rule must extends the {{{./apidocs/index.html}AbstractEnforcerRule}} and implements <<>> method. + The rule must extend {{{./apidocs/org/apache/maven/enforcer/rule/api/AbstractEnforcerRule.html}AbstractEnforcerRule}} (available since API version 3.2.1) and implement its <<>> method. Add annotation <<<@Named("yourRuleName")>>> to your Rule class. Your Rule name must start with lowercase character. @@ -58,7 +58,7 @@ Writing a custom rule Maven component can be injected into Rule by annotation <<<@Inject>>> on field or constructor. Entry point for Rule executing is <<>> method, tf the rule succeeds, it should just simply return. - If the rule fails, it should throw an {{{./apidocs/index.html}EnforcerRuleException}} with a descriptive message telling the user why the rule failed. + If the rule fails, it should throw an {{{./apidocs/org/apache/maven/enforcer/rule/api/EnforcerRuleException.html}EnforcerRuleException}} with a descriptive message telling the user why the rule failed. Enforcer plugin takes decision based on configuration and Enforcer Rule level whether build should pass or fail. In case when you want to brake build immediately, <<>> method can throw an {{{./apidocs/index.html}EnforcerRuleError}}.