maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Fox (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MENFORCER-31) Incorrect documentation for writing a custom rule
Date Thu, 18 Sep 2008 17:07:49 GMT

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

Brian Fox commented on MENFORCER-31:
------------------------------------

Sorry about the api change, it was done >year ago and I just overlooked it. I don't anticipate
the api changing at all, in fact this was originally scheduled to be 1.0, but i had some issues
with the plugin rule that i want to redo first. 

The noSnapshots rule was renamed and is doc'd, it's called requireReleaseDeps: http://maven.apache.org/enforcer/enforcer-rules/requireReleaseDeps.html

There is a "noSnapshots" rule, but it prints a deprecation warning and then calls the one
above.

> 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

        

Mime
View raw message