maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Pellow (JIRA)" <j...@codehaus.org>
Subject [jira] Issue Comment Edited: (MCLEAN-38) Allow a global set of include and exclude filters
Date Wed, 17 Sep 2008 07:54:48 GMT

    [ http://jira.codehaus.org/browse/MCLEAN-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=148156#action_148156
] 

npellow edited comment on MCLEAN-38 at 9/17/08 2:53 AM:
------------------------------------------------------------

I saw MCLEAN-33, and it is not fine grained or flexible enough.
ie - the clean plugin can either delete all default directories, or none.

I considered excluding the default directories from cleaning, and then using the filesets
parameter. The problems with this approach however are:
# users are required to have duplicate configuration (ie - the build directory locations)
in their pom.xml
# the maven-clean-plugin will need to be added to the users pom

Allowing a simple String to be used, instead of a Collection, allows the patterns to be passed
in on the command line.
{code}
 -Dexcludes=**/expensive.file1
{code}

It also allows other plugins (this is my use case), which are bound to the pre-clean phase
to set this property on the project to avoid specific files being deleted when clean is run.


I agree that this usage is somewhat inconsistent. You would have to agree however, that it
is extremely practical.

IMO, maven should support splitting of comma and space separated Strings into Collection parameters
automatically. This is exactly what Ant does. It would make the pom a lot more readable, and
allow passing of collection arguments on the command line. 



      was (Author: npellow):
    I saw MCLEAN-33, and it is not fine grained or flexible enough.
ie - the clean plugin can either delete all default directories, or none.

I considered excluding the default directories from cleaning, and then using the filesets
parameter. The problems with this approach however are:
# users are required to have duplicate configuration (ie - the build directory locations)
in their pom.xml
# the maven-clean-plugin will need to be added to the users pom

Allowing a simple String to be used, instead of a Collection, allows the patterns to be passed
in on the command line.
{code}
 -Dexcludes=**/expensive.file1
{code}

It also allows other plugins (this is my use case), which are bound to the pre-clean phase
to set this property on the project to avoid specific files being deleted when clean is run.


IMO, maven should support splitting of comma and space separated Strings into Collection parameters
automatically. This is exactly what Ant does. It would make the pom a lot more readable, and
allow passing of collection arguments on the command line. 


  
> Allow a global set of include and exclude filters
> -------------------------------------------------
>
>                 Key: MCLEAN-38
>                 URL: http://jira.codehaus.org/browse/MCLEAN-38
>             Project: Maven 2.x Clean Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.2
>            Reporter: Nick Pellow
>         Attachments: MCLEAN-38-maven-clean-plugin.patch
>
>
> I am about to submit a patch to the maven-clean-plugin which will allow a global includes
and excludes patterns to be configured.
> Currently, it is not possibly to easily do a clean and have specific files in the default
output directories preserved.
> The patch will allow a comma separated list of exclusions and inclusions to use when
removing the default output directories.

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