You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Al Dispennette <Al...@clairmail.com> on 2012/03/19 18:38:12 UTC

Maven resources plugin exclude not working

I am trying to use the resources plugin to copy files from one location to another.
I only want certain files to be copied so I am using the include and exclude stanzas.
It seems these are being ignored though.
Here is my configuration:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
    <outputDirectory>${user.home}/cms/conf</outputDirectory>
    <resources>
        <resource>
        <directory>${basedir}/src/main/resources</directory>
        <includes>
            <include>**/*.properties</include>
        </includes>
        <excludes>
            <exclude>**/*.*</exclude>
        </excludes>
        <filtering>true</filtering>
        </resource>
    </resources>
</configuration>
</plugin>

Am I missing something or is this a bug.

Al Dispennette
Customer Software Sustaining
Sr. Development Support Engineer

781 Lincoln Ave., Suite 200
San Rafael, CA 94901
Phone: (415) 526-7000 ext 7206
Cell: (309) 868-1401
Fax: (415) 526-7099
al.dispennette@Clairmail.com<ma...@Clairmail.com>
[cid:image001.jpg@01CD05BC.62175820]
*********************************************************************************************************

This email and any attachment may contain confidential, proprietary, and/or privileged information.  It is intended solely for the recipient.  If you have received this email in error or are not able or willing to take reasonable steps to protect the information contained herein from improper disclosure, please notify the sender immediately by reply email and destroy all copies.

*********************************************************************************************************


Re: Maven resources plugin exclude not working

Posted by Robert Scholte <ap...@sourcegrounds.com>.
Excludes is always a subset of includes, but since excludes matches every  
include nothing is filtered.
Try it without the excludes-section

-Robert


Op Mon, 19 Mar 2012 18:38:12 +0100 schreef Al Dispennette  
<Al...@clairmail.com>:

> I am trying to use the resources plugin to copy files from one location  
> to another.
> I only want certain files to be copied so I am using the include and  
> exclude stanzas.
> It seems these are being ignored though.
> Here is my configuration:
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-resources-plugin</artifactId>
> <version>2.5</version>
> <configuration>
>     <outputDirectory>${user.home}/cms/conf</outputDirectory>
>     <resources>
>         <resource>
>         <directory>${basedir}/src/main/resources</directory>
>         <includes>
>             <include>**/*.properties</include>
>         </includes>
>         <excludes>
>             <exclude>**/*.*</exclude>
>         </excludes>
>         <filtering>true</filtering>
>         </resource>
>     </resources>
> </configuration>
> </plugin>
>
> Am I missing something or is this a bug.
>
> Al Dispennette
> Customer Software Sustaining
> Sr. Development Support Engineer
>
> 781 Lincoln Ave., Suite 200
> San Rafael, CA 94901
> Phone: (415) 526-7000 ext 7206
> Cell: (309) 868-1401
> Fax: (415) 526-7099
> al.dispennette@Clairmail.com<ma...@Clairmail.com>
> [cid:image001.jpg@01CD05BC.62175820]
> *********************************************************************************************************
>
> This email and any attachment may contain confidential, proprietary,  
> and/or privileged information.  It is intended solely for the  
> recipient.  If you have received this email in error or are not able or  
> willing to take reasonable steps to protect the information contained  
> herein from improper disclosure, please notify the sender immediately by  
> reply email and destroy all copies.
>
> *********************************************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org