You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Man-Chi Leung <ma...@gmail.com> on 2006/09/29 11:06:38 UTC
Re: [M2] maven-clean-plugin and multi-module build
hi ,
this is my pom.xml
when I did "mvn clean"
it cleaned up my /logs directory but the empty "logs" directory was
not removed!
may I know how to delete directory "logs" as well ?
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/logs</directory>
<includes>
<include>*</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
On 2006-08-28 23:02:40 +0800, Jörg Schaible
<Jo...@Elsag-Solutions.com> said:
> ArneD wrote on Monday, August 28, 2006 3:57 PM:
>
>> I have a multi-module build. In one of the sub-modules I use the
>> maven-clean-plugin in the pom.xml as follows:
>>
>> <plugin>
>> <artifactId>maven-clean-plugin</artifactId> <configuration> <filesets>
>> <fileset>
>> <directory>WebContent/WEB-INF/lib</directory> <includes>
>> <include>*</include>
>> </includes>
>> </fileset>
>> </filesets>
>> </configuration>
>> </plugin>
>>
>> The WebContent/WEB-INF/lib folder gets cleaned, when I call
>> mvn clean on the
>> sub-module. But it does not get cleaned when I call mvn clean
>> on the main
>> module.
>>
>> Should I file a JIRA issue? Or am I making a mistake? Is there any
>> workaround available?
>
> Prepend "${basedir}/" to the directory. Maven does not change the
> working directory for (sub-)modules.
>
> - Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [M2] maven-clean-plugin and multi-module build
Posted by dan tran <da...@gmail.com>.
The present of <includes> means you want to remove all files under
${basedir}/log excluding directory
So remove your <includes> tag would do what you want.
However, having to prefix with ${basedir} is bad, by convention we dont need
to do that for directory/file type.
Clean mojo should be able to fix that. Please file a Jira.
-D
On 9/29/06, Man-Chi Leung <ma...@gmail.com> wrote:
>
> hi ,
>
> this is my pom.xml
>
> when I did "mvn clean"
> it cleaned up my /logs directory but the empty "logs" directory was
> not removed!
> may I know how to delete directory "logs" as well ?
>
>
> <plugin>
> <artifactId>maven-clean-plugin</artifactId>
> <configuration>
> <filesets>
> <fileset>
>
> <directory>${basedir}/logs</directory>
> <includes>
>
> <include>*</include>
> </includes>
> </fileset>
> </filesets>
> </configuration>
> </plugin>
>
>
>
> On 2006-08-28 23:02:40 +0800, Jörg Schaible
> <Jo...@Elsag-Solutions.com> said:
>
> > ArneD wrote on Monday, August 28, 2006 3:57 PM:
> >
> >> I have a multi-module build. In one of the sub-modules I use the
> >> maven-clean-plugin in the pom.xml as follows:
> >>
> >> <plugin>
> >> <artifactId>maven-clean-plugin</artifactId> <configuration>
> <filesets>
> >> <fileset>
> >> <directory>WebContent/WEB-INF/lib</directory> <includes>
> >> <include>*</include>
> >> </includes>
> >> </fileset>
> >> </filesets>
> >> </configuration>
> >> </plugin>
> >>
> >> The WebContent/WEB-INF/lib folder gets cleaned, when I call
> >> mvn clean on the
> >> sub-module. But it does not get cleaned when I call mvn clean
> >> on the main
> >> module.
> >>
> >> Should I file a JIRA issue? Or am I making a mistake? Is there any
> >> workaround available?
> >
> > Prepend "${basedir}/" to the directory. Maven does not change the
> > working directory for (sub-)modules.
> >
> > - Jörg
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>