You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Ben Lidgey (JIRA)" <ji...@codehaus.org> on 2008/03/14 17:42:29 UTC

[jira] Created: (MENFORCER-41) Enforcer rules for ChangesFileExists and ChangesFileHasPomVersion

Enforcer rules for ChangesFileExists and ChangesFileHasPomVersion
-----------------------------------------------------------------

                 Key: MENFORCER-41
                 URL: http://jira.codehaus.org/browse/MENFORCER-41
             Project: Maven 2.x Enforcer Plugin
          Issue Type: New Feature
          Components: Standard Rules
            Reporter: Ben Lidgey
            Assignee: Brian Fox
         Attachments: MavenEnforcerChangesRules.zip

New code to implement two rules:

* ChangesFileExists -- checks there is a src/changes/changes.xml file
* ChangesFileHasPomVersion -- checks the changes.xml has an entry with a version matching the current version in the pom.


-- 
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

        

[jira] Commented: (MENFORCER-41) Enforcer rules for ChangesFileExists and ChangesFileHasPomVersion

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MENFORCER-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159056#action_159056 ] 

Brett Porter commented on MENFORCER-41:
---------------------------------------

I think so too... even if the changes plugin is providing rules for the enforcer plugin to utilise, the enforcer can't grow limitlessly with plugin config testing.

Can we close this as won't fix?

> Enforcer rules for ChangesFileExists and ChangesFileHasPomVersion
> -----------------------------------------------------------------
>
>                 Key: MENFORCER-41
>                 URL: http://jira.codehaus.org/browse/MENFORCER-41
>             Project: Maven 2.x Enforcer Plugin
>          Issue Type: New Feature
>          Components: Standard Rules
>            Reporter: Ben Lidgey
>            Assignee: Brian Fox
>         Attachments: MavenEnforcerChangesRules.zip
>
>
> New code to implement two rules:
> * ChangesFileExists -- checks there is a src/changes/changes.xml file
> * ChangesFileHasPomVersion -- checks the changes.xml has an entry with a version matching the current version in the pom.

-- 
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

        

[jira] Closed: (MENFORCER-41) Enforcer rules for ChangesFileExists and ChangesFileHasPomVersion

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MENFORCER-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Fox closed MENFORCER-41.
------------------------------

    Resolution: Won't Fix

See last comment.

> Enforcer rules for ChangesFileExists and ChangesFileHasPomVersion
> -----------------------------------------------------------------
>
>                 Key: MENFORCER-41
>                 URL: http://jira.codehaus.org/browse/MENFORCER-41
>             Project: Maven 2.x Enforcer Plugin
>          Issue Type: New Feature
>          Components: Standard Rules
>            Reporter: Ben Lidgey
>            Assignee: Brian Fox
>         Attachments: MavenEnforcerChangesRules.zip
>
>
> New code to implement two rules:
> * ChangesFileExists -- checks there is a src/changes/changes.xml file
> * ChangesFileHasPomVersion -- checks the changes.xml has an entry with a version matching the current version in the pom.

-- 
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

        

[jira] Commented: (MENFORCER-41) Enforcer rules for ChangesFileExists and ChangesFileHasPomVersion

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MENFORCER-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=145269#action_145269 ] 

Brian Fox commented on MENFORCER-41:
------------------------------------

I agree that the the first rule is superceded and parsing of the changes file itself belongs in the changes plugin

> Enforcer rules for ChangesFileExists and ChangesFileHasPomVersion
> -----------------------------------------------------------------
>
>                 Key: MENFORCER-41
>                 URL: http://jira.codehaus.org/browse/MENFORCER-41
>             Project: Maven 2.x Enforcer Plugin
>          Issue Type: New Feature
>          Components: Standard Rules
>            Reporter: Ben Lidgey
>            Assignee: Brian Fox
>         Attachments: MavenEnforcerChangesRules.zip
>
>
> New code to implement two rules:
> * ChangesFileExists -- checks there is a src/changes/changes.xml file
> * ChangesFileHasPomVersion -- checks the changes.xml has an entry with a version matching the current version in the pom.

-- 
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

        

[jira] Commented: (MENFORCER-41) Enforcer rules for ChangesFileExists and ChangesFileHasPomVersion

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MENFORCER-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159129#action_159129 ] 

Brian Fox commented on MENFORCER-41:
------------------------------------

We should move this to the changes plugin to define the rule, similar to how we handled the doxia rule.

> Enforcer rules for ChangesFileExists and ChangesFileHasPomVersion
> -----------------------------------------------------------------
>
>                 Key: MENFORCER-41
>                 URL: http://jira.codehaus.org/browse/MENFORCER-41
>             Project: Maven 2.x Enforcer Plugin
>          Issue Type: New Feature
>          Components: Standard Rules
>            Reporter: Ben Lidgey
>            Assignee: Brian Fox
>         Attachments: MavenEnforcerChangesRules.zip
>
>
> New code to implement two rules:
> * ChangesFileExists -- checks there is a src/changes/changes.xml file
> * ChangesFileHasPomVersion -- checks the changes.xml has an entry with a version matching the current version in the pom.

-- 
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

        

[jira] Commented: (MENFORCER-41) Enforcer rules for ChangesFileExists and ChangesFileHasPomVersion

Posted by "Ben Lidgey (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MENFORCER-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_127260 ] 

Ben Lidgey commented on MENFORCER-41:
-------------------------------------

Surely the Enforcer plugin is a framework for writing rules?

In ChangesFileExists I have hard coded the location of the changes.xml as this is a first version. I agree for flexibility the location could be parameterised. 

I was not aware of the RequireFilesExist rule.

ChangesFileHasPomVersion: it will fail the build regardless of whether reports are run or not. Moving it into the Changes plugin though would make sense from the parsing point of view though.


> Enforcer rules for ChangesFileExists and ChangesFileHasPomVersion
> -----------------------------------------------------------------
>
>                 Key: MENFORCER-41
>                 URL: http://jira.codehaus.org/browse/MENFORCER-41
>             Project: Maven 2.x Enforcer Plugin
>          Issue Type: New Feature
>          Components: Standard Rules
>            Reporter: Ben Lidgey
>            Assignee: Brian Fox
>         Attachments: MavenEnforcerChangesRules.zip
>
>
> New code to implement two rules:
> * ChangesFileExists -- checks there is a src/changes/changes.xml file
> * ChangesFileHasPomVersion -- checks the changes.xml has an entry with a version matching the current version in the pom.

-- 
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

        

[jira] Commented: (MENFORCER-41) Enforcer rules for ChangesFileExists and ChangesFileHasPomVersion

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MENFORCER-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_127248 ] 

Benjamin Bentmann commented on MENFORCER-41:
--------------------------------------------

IMHO questionable additions. You are starting to use the Enforcer as a means to validate an individual plugin configuration. Once we start that road, where will it end?

Besides, ChangesFileExists is not really reusable as is. You have hard-coded the path to the changes.xml but different projects will use different locations. Last but not least, the existing rule RequireFilesExist can already supercede this rule.

As for ChangesFileHasPomVersion: If there is really need for this validation (To my knowledge, the report already fails if it cannot find the version), I think it is best to move this directly into the maven-changes-plugin. The Changes plugin knows pretty well how to parse its changes.xml. Duplicating the parser code in the Enforcer would require an Enforcer update once the Changes plugin introduces a new format, i.e. couples their release cycles. This does not really look right neither.

> Enforcer rules for ChangesFileExists and ChangesFileHasPomVersion
> -----------------------------------------------------------------
>
>                 Key: MENFORCER-41
>                 URL: http://jira.codehaus.org/browse/MENFORCER-41
>             Project: Maven 2.x Enforcer Plugin
>          Issue Type: New Feature
>          Components: Standard Rules
>            Reporter: Ben Lidgey
>            Assignee: Brian Fox
>         Attachments: MavenEnforcerChangesRules.zip
>
>
> New code to implement two rules:
> * ChangesFileExists -- checks there is a src/changes/changes.xml file
> * ChangesFileHasPomVersion -- checks the changes.xml has an entry with a version matching the current version in the pom.

-- 
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