You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Nick Stolwijk (JIRA)" <ji...@codehaus.org> on 2008/06/19 11:17:27 UTC

[jira] Commented: (MENFORCER-31) Incorrect documentation for writing a custom rule

    [ http://jira.codehaus.org/browse/MENFORCER-31?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=138997#action_138997 ] 

Nick Stolwijk commented on MENFORCER-31:
----------------------------------------

The documentation on the site is for 1.0-SNAPSHOT, which has changed GroupId / ArtifactId from version 1.0-alpha-2 to the current SNAPSHOT. So for the current version (SNAPSHOT) the site is right, but for the current alpha release it is not right.

Also the method you've mentioned are necessary in current SNAPSHOT.

> Incorrect documentation for writing a custom rule
> -------------------------------------------------
>
>                 Key: MENFORCER-31
>                 URL: http://jira.codehaus.org/browse/MENFORCER-31
>             Project: Maven 2.x Enforcer Plugin
>          Issue Type: Bug
>          Components: Rule API
>    Affects Versions: 1.0-alpha-3
>            Reporter: Ben Lidgey
>            Assignee: Brian Fox
>             Fix For: 1.0
>
>
> The documentation at http://maven.apache.org/enforcer/enforcer-api/writing-a-custom-rule.html has the wrong dependencies and code examples for creating a custom rule.
> It defines 
> {code:xml}
> <dependency>
>   <groupId>org.apache.maven.enforcer</groupId>
>   <artifactId>enforcer-api</artifactId>
>   <version>${api.version}</version>
>   </dependency>
> {code}
> instead of 
> {code:xml}
> <dependency>
>   <groupId>org.apache.maven.shared</groupId>
>   <artifactId>maven-enforcer-rule-api</artifactId>
>   <version>1.0-alpha-2</version>
> </dependency>
> {code}
> and so the code examples are incorrect because:
> # Incorrect imports:
> #* The imports are for 
> #** {{org.apache.maven.enforcer.rule.api.EnforcerRule}}
> #** {{org.apache.maven.enforcer.rule.api.EnforcerRuleException}}
> #** {{org.apache.maven.enforcer.rule.api.EnforcerRuleHelper}}
> #* instead of 
> #** {{org.apache.maven.shared.enforcer.rule.api.EnforcerRule}}
> #** {{org.apache.maven.shared.enforcer.rule.api.EnforcerRuleException}}
> #** {{org.apache.maven.shared.enforcer.rule.api.EnforcerRuleHelper}}. 
> #* Implementing {{import org.apache.maven.enforcer.rule.api.EnforcerRule}} causes the custom plugin invocation to fail with an ArrayStoreException as the expected type is {{import org.apache.maven.shared.enforcer.rule.api.EnforcerRule}} instead.
> # It shows implementing {{public String getCacheId()}}, {{public boolean isCacheable()}}, {{public boolean isResultValid( EnforcerRule arg0 )}} which are no longer needed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira