You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Yan Huang <az...@gmail.com> on 2007/10/04 19:11:21 UTC

an issue with maven clean plug-in

Hello,

It seems to me that maven clean plug-in doesn't handle "excludes"
configuration well. For example, I have this configuration:

      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>src</directory>
              <includes>
                <include>**/*.xml</include>
                <include>**/*.sql</include>
              </includes>
              <excludes>
                <exclude>**/*.init.xml</exclude>
              </excludes>
          …</plugin>

My attention is to delete all *.xml file under "src" but leave "*.init.xml"
alone. However, the plug-in removes everything including *.init.xml. Did
anyone encounter the same issue? If so, how did you work around it? using
"antrun" plug-in instead?

Thanks
Yan

Re: an issue with maven clean plug-in

Posted by Yan Huang <az...@gmail.com>.
I tried it but it didn't work

On 10/4/07, Sonar, Nishant <ni...@wachovia.com> wrote:
>
> Hi
>
> You can try different workaround of specifying the excludes first and
> then includes.
>
> I never tried it but you can give it a shot...
>
> Like
>
> <plugin>
>         <artifactId>maven-clean-plugin</artifactId>
>         <configuration>
>           <filesets>
>             <fileset>
>               <directory>src</directory>
>                 <excludes>
>                 <exclude>**/*.init.xml</exclude>
>               </excludes>
>               <includes>
>                 <include>**/*.xml</include>
>                 <include>**/*.sql</include>
>               </includes>
>
>           ...</plugin>
>
>
> -Nishant
>
> -----Original Message-----
> From: Yan Huang [mailto:azyhuang@gmail.com]
> Sent: Thursday, October 04, 2007 1:11 PM
> To: Maven Users List
> Subject: an issue with maven clean plug-in
>
> Hello,
>
> It seems to me that maven clean plug-in doesn't handle "excludes"
> configuration well. For example, I have this configuration:
>
>       <plugin>
>         <artifactId>maven-clean-plugin</artifactId>
>         <configuration>
>           <filesets>
>             <fileset>
>               <directory>src</directory>
>               <includes>
>                 <include>**/*.xml</include>
>                 <include>**/*.sql</include>
>               </includes>
>               <excludes>
>                 <exclude>**/*.init.xml</exclude>
>               </excludes>
>           ...</plugin>
>
> My attention is to delete all *.xml file under "src" but leave
> "*.init.xml"
> alone. However, the plug-in removes everything including *.init.xml. Did
> anyone encounter the same issue? If so, how did you work around it?
> using
> "antrun" plug-in instead?
>
> Thanks
> Yan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: an issue with maven clean plug-in

Posted by "Sonar, Nishant" <ni...@wachovia.com>.
Hi

You can try different workaround of specifying the excludes first and
then includes.

I never tried it but you can give it a shot...

Like

<plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>src</directory>
	    	<excludes>
                <exclude>**/*.init.xml</exclude>
              </excludes>
              <includes>
                <include>**/*.xml</include>
                <include>**/*.sql</include>
              </includes>
              
          ...</plugin>


-Nishant

-----Original Message-----
From: Yan Huang [mailto:azyhuang@gmail.com] 
Sent: Thursday, October 04, 2007 1:11 PM
To: Maven Users List
Subject: an issue with maven clean plug-in

Hello,

It seems to me that maven clean plug-in doesn't handle "excludes"
configuration well. For example, I have this configuration:

      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>src</directory>
              <includes>
                <include>**/*.xml</include>
                <include>**/*.sql</include>
              </includes>
              <excludes>
                <exclude>**/*.init.xml</exclude>
              </excludes>
          ...</plugin>

My attention is to delete all *.xml file under "src" but leave
"*.init.xml"
alone. However, the plug-in removes everything including *.init.xml. Did
anyone encounter the same issue? If so, how did you work around it?
using
"antrun" plug-in instead?

Thanks
Yan

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