You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Stefan Ferstl (JIRA)" <ji...@codehaus.org> on 2011/02/06 20:48:22 UTC

[jira] Created: (MRELEASE-645) Allow File/Directory Patterns for the checkModificationExcludes Option

Allow File/Directory Patterns for the checkModificationExcludes Option
----------------------------------------------------------------------

                 Key: MRELEASE-645
                 URL: http://jira.codehaus.org/browse/MRELEASE-645
             Project: Maven 2.x Release Plugin
          Issue Type: Improvement
          Components: branch, prepare, scm
    Affects Versions: 2.1
         Environment: all
            Reporter: Stefan Ferstl
            Priority: Minor
         Attachments: modification-excludes.patch

The {{checkModificationExcludes}} option does currently only allow the definition single files to be excluded from the SCM modification check. If this option is defined, all files anywhere in the maven project structure with the specified name will be excluded from the check. It is currently not possible to exclude files only within a specific directory or to exclude classes of files, i.e. all files matching a specific file name pattern.
If the {{checkModificationExcludes}} option allowed the definition of file and directory patterns, these things would be possible.

*Example 1*: I'd like to exclude a test resource {{src/test/resources/foo.properties}} from the modification check but the real foo.properties in {{src/main/resources}} should still be checked.
{code:xml} 
<checkModificationExcludes>
  <checkModificationExclude>src/test/resources/foo.properties</checkModificationExclude>
</checkModificationExcludes>
{code}

*Example 2*: I'd like to exclude all properties files with the prefix {{bar}} from the modification check:
{code:xml} 
<checkModificationExcludes>
  <checkModificationExclude>**/bar*.properties</checkModificationExclude>
</checkModificationExcludes>
{code}

The attached patch modifies the {{ScmCheckModificationsPhase}} to use the {{DirectoryScanner}} from plexus-utils instead of doing a strict file name comparison. The patch does not provide more unit tests for this feature but it adjusts the existing tests to run without any failures.

-- 
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] (MRELEASE-645) Allow File/Directory Patterns for the checkModificationExcludes Option

Posted by "Robert Scholte (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=296014#comment-296014 ] 

Robert Scholte commented on MRELEASE-645:
-----------------------------------------

James,

I've got a couple of problems with the current patch:
* it has merge conflicts since there has been some refactoring since it was created. But this shouldn't be too hard to fix.
* I'd prefer a different test. Now it is based on a stub. What I would like to see is either a testcase based on Mocks (we're using Mockito) or an integration-test (just check out the code, there are enough examples).
So the base looks good, but it we need better tests. So you could help by fixing the patch you could help us a lot and I can apply it for the 2.3 release.
                
> Allow File/Directory Patterns for the checkModificationExcludes Option
> ----------------------------------------------------------------------
>
>                 Key: MRELEASE-645
>                 URL: https://jira.codehaus.org/browse/MRELEASE-645
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: branch, prepare, scm
>    Affects Versions: 2.1
>         Environment: all
>            Reporter: Stefan Ferstl
>            Priority: Minor
>         Attachments: modification-excludes.patch
>
>
> The {{checkModificationExcludes}} option does currently only allow the definition single files to be excluded from the SCM modification check. If this option is defined, all files anywhere in the maven project structure with the specified name will be excluded from the check. It is currently not possible to exclude files only within a specific directory or to exclude classes of files, i.e. all files matching a specific file name pattern.
> If the {{checkModificationExcludes}} option allowed the definition of file and directory patterns, these things would be possible.
> *Example 1*: I'd like to exclude a test resource {{src/test/resources/foo.properties}} from the modification check but the real foo.properties in {{src/main/resources}} should still be checked.
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>src/test/resources/foo.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> *Example 2*: I'd like to exclude all properties files with the prefix {{bar}} from the modification check:
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>**/bar*.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> The attached patch modifies the {{ScmCheckModificationsPhase}} to use the {{DirectoryScanner}} from plexus-utils instead of doing a strict file name comparison. The patch does not provide more unit tests for this feature but it adjusts the existing tests to run without any failures.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRELEASE-645) Allow File/Directory Patterns for the checkModificationExcludes Option

Posted by "Stefan Ferstl (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MRELEASE-645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Ferstl updated MRELEASE-645:
-----------------------------------

    Attachment: maven-release-plugin-it.patch
                maven-release-manager-r1305146.patch

* New patch based on the latest trunk revision of the maven-release-manager (1305146)
* integration test that checks the build.log for the correct excluded files
                
> Allow File/Directory Patterns for the checkModificationExcludes Option
> ----------------------------------------------------------------------
>
>                 Key: MRELEASE-645
>                 URL: https://jira.codehaus.org/browse/MRELEASE-645
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: branch, prepare, scm
>    Affects Versions: 2.1
>         Environment: all
>            Reporter: Stefan Ferstl
>            Priority: Minor
>         Attachments: maven-release-manager-r1305146.patch, maven-release-plugin-it.patch, modification-excludes.patch
>
>
> The {{checkModificationExcludes}} option does currently only allow the definition single files to be excluded from the SCM modification check. If this option is defined, all files anywhere in the maven project structure with the specified name will be excluded from the check. It is currently not possible to exclude files only within a specific directory or to exclude classes of files, i.e. all files matching a specific file name pattern.
> If the {{checkModificationExcludes}} option allowed the definition of file and directory patterns, these things would be possible.
> *Example 1*: I'd like to exclude a test resource {{src/test/resources/foo.properties}} from the modification check but the real foo.properties in {{src/main/resources}} should still be checked.
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>src/test/resources/foo.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> *Example 2*: I'd like to exclude all properties files with the prefix {{bar}} from the modification check:
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>**/bar*.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> The attached patch modifies the {{ScmCheckModificationsPhase}} to use the {{DirectoryScanner}} from plexus-utils instead of doing a strict file name comparison. The patch does not provide more unit tests for this feature but it adjusts the existing tests to run without any failures.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRELEASE-645) Allow File/Directory Patterns for the checkModificationExcludes Option

Posted by "Stefan Ferstl (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=296174#comment-296174 ] 

Stefan Ferstl commented on MRELEASE-645:
----------------------------------------

I modified the integration test so that it uses a dummy scm provider (src/it/setup/maven-scm-provider-mrelease-645). The {{status()}} method of this scm provider indicates modified files that are excluded in the POM of the integration test.
What is still missing, is a negative integration test which fails when files are modified but not excluded. However, I haven't figured out yet how to write such a test (i.e. how to configure the invoker-plugin to consider a build failure as success).
Here is the new patch (maven-release-plugin-it-with-scm-provider.patch).
                
> Allow File/Directory Patterns for the checkModificationExcludes Option
> ----------------------------------------------------------------------
>
>                 Key: MRELEASE-645
>                 URL: https://jira.codehaus.org/browse/MRELEASE-645
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: branch, prepare, scm
>    Affects Versions: 2.1
>         Environment: all
>            Reporter: Stefan Ferstl
>            Assignee: Robert Scholte
>            Priority: Minor
>         Attachments: maven-release-manager-r1305146.patch, maven-release-plugin-it.patch, maven-release-plugin-it-with-scm-provider.patch, modification-excludes.patch, MRELEASE-645.patch
>
>
> The {{checkModificationExcludes}} option does currently only allow the definition single files to be excluded from the SCM modification check. If this option is defined, all files anywhere in the maven project structure with the specified name will be excluded from the check. It is currently not possible to exclude files only within a specific directory or to exclude classes of files, i.e. all files matching a specific file name pattern.
> If the {{checkModificationExcludes}} option allowed the definition of file and directory patterns, these things would be possible.
> *Example 1*: I'd like to exclude a test resource {{src/test/resources/foo.properties}} from the modification check but the real foo.properties in {{src/main/resources}} should still be checked.
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>src/test/resources/foo.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> *Example 2*: I'd like to exclude all properties files with the prefix {{bar}} from the modification check:
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>**/bar*.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> The attached patch modifies the {{ScmCheckModificationsPhase}} to use the {{DirectoryScanner}} from plexus-utils instead of doing a strict file name comparison. The patch does not provide more unit tests for this feature but it adjusts the existing tests to run without any failures.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRELEASE-645) Allow File/Directory Patterns for the checkModificationExcludes Option

Posted by "Stefan Ferstl (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MRELEASE-645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Ferstl updated MRELEASE-645:
-----------------------------------

    Attachment: maven-release-plugin-it-with-scm-provider.patch

new patch as described before
                
> Allow File/Directory Patterns for the checkModificationExcludes Option
> ----------------------------------------------------------------------
>
>                 Key: MRELEASE-645
>                 URL: https://jira.codehaus.org/browse/MRELEASE-645
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: branch, prepare, scm
>    Affects Versions: 2.1
>         Environment: all
>            Reporter: Stefan Ferstl
>            Assignee: Robert Scholte
>            Priority: Minor
>         Attachments: maven-release-manager-r1305146.patch, maven-release-plugin-it.patch, maven-release-plugin-it-with-scm-provider.patch, modification-excludes.patch, MRELEASE-645.patch
>
>
> The {{checkModificationExcludes}} option does currently only allow the definition single files to be excluded from the SCM modification check. If this option is defined, all files anywhere in the maven project structure with the specified name will be excluded from the check. It is currently not possible to exclude files only within a specific directory or to exclude classes of files, i.e. all files matching a specific file name pattern.
> If the {{checkModificationExcludes}} option allowed the definition of file and directory patterns, these things would be possible.
> *Example 1*: I'd like to exclude a test resource {{src/test/resources/foo.properties}} from the modification check but the real foo.properties in {{src/main/resources}} should still be checked.
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>src/test/resources/foo.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> *Example 2*: I'd like to exclude all properties files with the prefix {{bar}} from the modification check:
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>**/bar*.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> The attached patch modifies the {{ScmCheckModificationsPhase}} to use the {{DirectoryScanner}} from plexus-utils instead of doing a strict file name comparison. The patch does not provide more unit tests for this feature but it adjusts the existing tests to run without any failures.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRELEASE-645) Allow File/Directory Patterns for the checkModificationExcludes Option

Posted by "Robert Scholte (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=296180#comment-296180 ] 

Robert Scholte commented on MRELEASE-645:
-----------------------------------------

To let the invoker-plugin check for a build failure you should add a {{invoker.properties}} with {{invoker.buildResult = failure}} (see http://maven.apache.org/plugins/maven-invoker-plugin/run-mojo.html#invokerPropertiesFile)
After going through the SCM-code, it looks like a consumer is used to read the output and to filter out the files. I'd hoped that an {{ScmFile.getPath()}} always returns me a path relative to the working directory, but it looks like it cannot guarantee that. In that case it doesn't matter if there's an IT. 
I'll try to figure out what different SCM's can return and see if I should add some adjustments. 
                
> Allow File/Directory Patterns for the checkModificationExcludes Option
> ----------------------------------------------------------------------
>
>                 Key: MRELEASE-645
>                 URL: https://jira.codehaus.org/browse/MRELEASE-645
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: branch, prepare, scm
>    Affects Versions: 2.1
>         Environment: all
>            Reporter: Stefan Ferstl
>            Assignee: Robert Scholte
>            Priority: Minor
>         Attachments: maven-release-manager-r1305146.patch, maven-release-plugin-it.patch, maven-release-plugin-it-with-scm-provider.patch, modification-excludes.patch, MRELEASE-645.patch
>
>
> The {{checkModificationExcludes}} option does currently only allow the definition single files to be excluded from the SCM modification check. If this option is defined, all files anywhere in the maven project structure with the specified name will be excluded from the check. It is currently not possible to exclude files only within a specific directory or to exclude classes of files, i.e. all files matching a specific file name pattern.
> If the {{checkModificationExcludes}} option allowed the definition of file and directory patterns, these things would be possible.
> *Example 1*: I'd like to exclude a test resource {{src/test/resources/foo.properties}} from the modification check but the real foo.properties in {{src/main/resources}} should still be checked.
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>src/test/resources/foo.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> *Example 2*: I'd like to exclude all properties files with the prefix {{bar}} from the modification check:
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>**/bar*.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> The attached patch modifies the {{ScmCheckModificationsPhase}} to use the {{DirectoryScanner}} from plexus-utils instead of doing a strict file name comparison. The patch does not provide more unit tests for this feature but it adjusts the existing tests to run without any failures.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MRELEASE-645) Allow File/Directory Patterns for the checkModificationExcludes Option

Posted by "Mike Whittemore (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=257913#action_257913 ] 

Mike Whittemore commented on MRELEASE-645:
------------------------------------------

I would very much like to see the suggested improvements. Plus they would make this plugin's configuration consistent with most other plugins.

> Allow File/Directory Patterns for the checkModificationExcludes Option
> ----------------------------------------------------------------------
>
>                 Key: MRELEASE-645
>                 URL: http://jira.codehaus.org/browse/MRELEASE-645
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: branch, prepare, scm
>    Affects Versions: 2.1
>         Environment: all
>            Reporter: Stefan Ferstl
>            Priority: Minor
>         Attachments: modification-excludes.patch
>
>
> The {{checkModificationExcludes}} option does currently only allow the definition single files to be excluded from the SCM modification check. If this option is defined, all files anywhere in the maven project structure with the specified name will be excluded from the check. It is currently not possible to exclude files only within a specific directory or to exclude classes of files, i.e. all files matching a specific file name pattern.
> If the {{checkModificationExcludes}} option allowed the definition of file and directory patterns, these things would be possible.
> *Example 1*: I'd like to exclude a test resource {{src/test/resources/foo.properties}} from the modification check but the real foo.properties in {{src/main/resources}} should still be checked.
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>src/test/resources/foo.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> *Example 2*: I'd like to exclude all properties files with the prefix {{bar}} from the modification check:
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>**/bar*.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> The attached patch modifies the {{ScmCheckModificationsPhase}} to use the {{DirectoryScanner}} from plexus-utils instead of doing a strict file name comparison. The patch does not provide more unit tests for this feature but it adjusts the existing tests to run without any failures.

-- 
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] (MRELEASE-645) Allow File/Directory Patterns for the checkModificationExcludes Option

Posted by "Stefan Ferstl (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=296035#comment-296035 ] 

Stefan Ferstl edited comment on MRELEASE-645 at 4/7/12 1:39 PM:
----------------------------------------------------------------

I added two new patches to this issue. The first one does the same code modifications based on the latest trunk revision of the maven-release-manager (r1305146). The second adds a new integration test to the maven-release-plugin. The integration test checks the build.log file for the correct set of excluded files.
Unfortunately, I didn't find a better solution for the {{ScmCheckModificationsPhaseTest}}. The {{ScmCheckModificationsPhase}} is retrieved via Plexus but the {{getExcludedFiles()}} method does not work in the unit test because the files to be excluded do not exist.
                
      was (Author: sferstl):
    I added two new patches to this issue. The first one does the same code modifications based on the latest trunk revision of the maven-release-manager (r1305146). The second adds a new integration test to the maven-release-plugin. The integration test checks the build.log for the correct excluded files.
Unfortunately, I didn't find a better solution for the {{ScmCheckModificationsPhaseTest}}. The {{ScmCheckModificationsPhase}} is retrieved via Plexus but the {{getExcludedFiles()}} does not work in the unit test because the files to be excluded do not exist.
                  
> Allow File/Directory Patterns for the checkModificationExcludes Option
> ----------------------------------------------------------------------
>
>                 Key: MRELEASE-645
>                 URL: https://jira.codehaus.org/browse/MRELEASE-645
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: branch, prepare, scm
>    Affects Versions: 2.1
>         Environment: all
>            Reporter: Stefan Ferstl
>            Priority: Minor
>         Attachments: maven-release-manager-r1305146.patch, maven-release-plugin-it.patch, modification-excludes.patch
>
>
> The {{checkModificationExcludes}} option does currently only allow the definition single files to be excluded from the SCM modification check. If this option is defined, all files anywhere in the maven project structure with the specified name will be excluded from the check. It is currently not possible to exclude files only within a specific directory or to exclude classes of files, i.e. all files matching a specific file name pattern.
> If the {{checkModificationExcludes}} option allowed the definition of file and directory patterns, these things would be possible.
> *Example 1*: I'd like to exclude a test resource {{src/test/resources/foo.properties}} from the modification check but the real foo.properties in {{src/main/resources}} should still be checked.
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>src/test/resources/foo.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> *Example 2*: I'd like to exclude all properties files with the prefix {{bar}} from the modification check:
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>**/bar*.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> The attached patch modifies the {{ScmCheckModificationsPhase}} to use the {{DirectoryScanner}} from plexus-utils instead of doing a strict file name comparison. The patch does not provide more unit tests for this feature but it adjusts the existing tests to run without any failures.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRELEASE-645) Allow File/Directory Patterns for the checkModificationExcludes Option

Posted by "Stefan Ferstl (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=296035#comment-296035 ] 

Stefan Ferstl edited comment on MRELEASE-645 at 4/7/12 11:58 AM:
-----------------------------------------------------------------

I added two new patches to this issue. The first one does the same code modifications based on the latest trunk revision of the maven-release-manager (r1305146). The second adds a new integration test to the maven-release-plugin. The integration test checks the build.log for the correct excluded files.
Unfortunately, I didn't find a better solution for the {{ScmCheckModificationsPhaseTest}}. The {{ScmCheckModificationsPhase}} is retrieved via Plexus but the {{getExcludedFiles()}} does not work in the unit test because the files to be excluded do not exist.
                
      was (Author: sferstl):
    * New patch based on the latest trunk revision of the maven-release-manager (1305146)
* integration test that checks the build.log for the correct excluded files
                  
> Allow File/Directory Patterns for the checkModificationExcludes Option
> ----------------------------------------------------------------------
>
>                 Key: MRELEASE-645
>                 URL: https://jira.codehaus.org/browse/MRELEASE-645
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: branch, prepare, scm
>    Affects Versions: 2.1
>         Environment: all
>            Reporter: Stefan Ferstl
>            Priority: Minor
>         Attachments: maven-release-manager-r1305146.patch, maven-release-plugin-it.patch, modification-excludes.patch
>
>
> The {{checkModificationExcludes}} option does currently only allow the definition single files to be excluded from the SCM modification check. If this option is defined, all files anywhere in the maven project structure with the specified name will be excluded from the check. It is currently not possible to exclude files only within a specific directory or to exclude classes of files, i.e. all files matching a specific file name pattern.
> If the {{checkModificationExcludes}} option allowed the definition of file and directory patterns, these things would be possible.
> *Example 1*: I'd like to exclude a test resource {{src/test/resources/foo.properties}} from the modification check but the real foo.properties in {{src/main/resources}} should still be checked.
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>src/test/resources/foo.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> *Example 2*: I'd like to exclude all properties files with the prefix {{bar}} from the modification check:
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>**/bar*.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> The attached patch modifies the {{ScmCheckModificationsPhase}} to use the {{DirectoryScanner}} from plexus-utils instead of doing a strict file name comparison. The patch does not provide more unit tests for this feature but it adjusts the existing tests to run without any failures.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRELEASE-645) Allow File/Directory Patterns for the checkModificationExcludes Option

Posted by "Robert Scholte (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MRELEASE-645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Scholte updated MRELEASE-645:
------------------------------------

    Attachment: MRELEASE-645.patch

I've rewritten the patch and replaced the {{DirectoryScanner}} with the {{SelectorUtils}} which seems to be a better fit. It should require less IO, because it doesn't have to walk through all the folders on the system, it will only do some ant-pattern-matches.
With this the Mocks can be removed, but the IT will fail, because the match should be done on the status-result of the SCM. I haven't found a way to resolve this yet.
So here's a new patch to start and test with.

                
> Allow File/Directory Patterns for the checkModificationExcludes Option
> ----------------------------------------------------------------------
>
>                 Key: MRELEASE-645
>                 URL: https://jira.codehaus.org/browse/MRELEASE-645
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: branch, prepare, scm
>    Affects Versions: 2.1
>         Environment: all
>            Reporter: Stefan Ferstl
>            Assignee: Robert Scholte
>            Priority: Minor
>         Attachments: maven-release-manager-r1305146.patch, maven-release-plugin-it.patch, modification-excludes.patch, MRELEASE-645.patch
>
>
> The {{checkModificationExcludes}} option does currently only allow the definition single files to be excluded from the SCM modification check. If this option is defined, all files anywhere in the maven project structure with the specified name will be excluded from the check. It is currently not possible to exclude files only within a specific directory or to exclude classes of files, i.e. all files matching a specific file name pattern.
> If the {{checkModificationExcludes}} option allowed the definition of file and directory patterns, these things would be possible.
> *Example 1*: I'd like to exclude a test resource {{src/test/resources/foo.properties}} from the modification check but the real foo.properties in {{src/main/resources}} should still be checked.
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>src/test/resources/foo.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> *Example 2*: I'd like to exclude all properties files with the prefix {{bar}} from the modification check:
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>**/bar*.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> The attached patch modifies the {{ScmCheckModificationsPhase}} to use the {{DirectoryScanner}} from plexus-utils instead of doing a strict file name comparison. The patch does not provide more unit tests for this feature but it adjusts the existing tests to run without any failures.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRELEASE-645) Allow File/Directory Patterns for the checkModificationExcludes Option

Posted by "Robert Scholte (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MRELEASE-645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Scholte closed MRELEASE-645.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3

Fixed in [r1325475|http://svn.apache.org/viewvc?rev=1325475&view=rev] and [r1325481|http://svn.apache.org/viewvc?rev=1325481&view=rev]
                
> Allow File/Directory Patterns for the checkModificationExcludes Option
> ----------------------------------------------------------------------
>
>                 Key: MRELEASE-645
>                 URL: https://jira.codehaus.org/browse/MRELEASE-645
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: branch, prepare, scm
>    Affects Versions: 2.1
>         Environment: all
>            Reporter: Stefan Ferstl
>            Assignee: Robert Scholte
>            Priority: Minor
>             Fix For: 2.3
>
>         Attachments: maven-release-manager-r1305146.patch, maven-release-plugin-it.patch, maven-release-plugin-it-with-scm-provider.patch, modification-excludes.patch, MRELEASE-645.patch
>
>
> The {{checkModificationExcludes}} option does currently only allow the definition single files to be excluded from the SCM modification check. If this option is defined, all files anywhere in the maven project structure with the specified name will be excluded from the check. It is currently not possible to exclude files only within a specific directory or to exclude classes of files, i.e. all files matching a specific file name pattern.
> If the {{checkModificationExcludes}} option allowed the definition of file and directory patterns, these things would be possible.
> *Example 1*: I'd like to exclude a test resource {{src/test/resources/foo.properties}} from the modification check but the real foo.properties in {{src/main/resources}} should still be checked.
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>src/test/resources/foo.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> *Example 2*: I'd like to exclude all properties files with the prefix {{bar}} from the modification check:
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>**/bar*.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> The attached patch modifies the {{ScmCheckModificationsPhase}} to use the {{DirectoryScanner}} from plexus-utils instead of doing a strict file name comparison. The patch does not provide more unit tests for this feature but it adjusts the existing tests to run without any failures.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRELEASE-645) Allow File/Directory Patterns for the checkModificationExcludes Option

Posted by "James Levinson (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=295972#comment-295972 ] 

James Levinson commented on MRELEASE-645:
-----------------------------------------

What are the steps to get this patch into the 2.3 pipeline ?
                
> Allow File/Directory Patterns for the checkModificationExcludes Option
> ----------------------------------------------------------------------
>
>                 Key: MRELEASE-645
>                 URL: https://jira.codehaus.org/browse/MRELEASE-645
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: branch, prepare, scm
>    Affects Versions: 2.1
>         Environment: all
>            Reporter: Stefan Ferstl
>            Priority: Minor
>         Attachments: modification-excludes.patch
>
>
> The {{checkModificationExcludes}} option does currently only allow the definition single files to be excluded from the SCM modification check. If this option is defined, all files anywhere in the maven project structure with the specified name will be excluded from the check. It is currently not possible to exclude files only within a specific directory or to exclude classes of files, i.e. all files matching a specific file name pattern.
> If the {{checkModificationExcludes}} option allowed the definition of file and directory patterns, these things would be possible.
> *Example 1*: I'd like to exclude a test resource {{src/test/resources/foo.properties}} from the modification check but the real foo.properties in {{src/main/resources}} should still be checked.
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>src/test/resources/foo.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> *Example 2*: I'd like to exclude all properties files with the prefix {{bar}} from the modification check:
> {code:xml} 
> <checkModificationExcludes>
>   <checkModificationExclude>**/bar*.properties</checkModificationExclude>
> </checkModificationExcludes>
> {code}
> The attached patch modifies the {{ScmCheckModificationsPhase}} to use the {{DirectoryScanner}} from plexus-utils instead of doing a strict file name comparison. The patch does not provide more unit tests for this feature but it adjusts the existing tests to run without any failures.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira