Hi Sha,
There are a couple things I can recommend:
* To see what you are deleting, do:
<tasks>
<echo message="Deleting ${the_directory}..."/>
<delete dir="the_directory"/>
</tasks>
Of course, if you are hardcoding a directory as opposed to using e.g.
${basedir}/something, then this won't be very helpful
* Ant's delete task has an annoying habit of deleting *only* the files
inside of a directory, not the directories themselves. To get it ot
delete the directories, you need to:
<delete dir="the_directory" includeemptydirs="true"/>
Thanks,
Ryan Slobojan
-----Original Message-----
From: jiangshachina [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 03, 2006 2:34 AM
To: [email protected]
Subject: Re: delete a directory by maven-antrun-plugin?
Dear dan,
> are you sure you did point ant:delete to a valid directory? ;-)
Really, I don't know the plugin.
How can I get its home page?
a cup of Java, cheers!
Sha Jiang
dan tran wrote:
>
> are you sure you did point ant:delete to a valid directory? ;-)
>
> i works for me here
>
> -D
>
>
> On 12/3/06, jiangshachina <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hi,
>> In fact, I need to delete some directories after checkout one module
>> from CVS.
>> and it seems that I cannot checkout several modules in one pom, then
>> I made the idea.
>>
>> a cup of Java, cheers!
>> Sha Jiang
>>
>>
>> jiangshachina wrote:
>> >
>> > I just want to delete directory,
>> > the work isn't related to "compile", "package", or others.
>> >
>> > a cup of Java, cheers!
>> > Sha Jiang
>> >
>> >
>> > jiangshachina wrote:
>> >>
>> >> Hello dan,
>> >> Exactly, I don't know which phase would be bined :( I used
>> >> <id>initialize</id> <phase>initialize</phase> but the result was
>> >> the same.
>> >>
>> >> a cup of Java, cheers!
>> >> Sha Jiang
>> >>
>> >>
>> >> dan tran wrote:
>> >>>
>> >>> You may want to bind your antrun execution to a phase.
>> >>>
>> >>> -D
>> >>>
>> >>>
>> >>> On 12/2/06, jiangshachina <[EMAIL PROTECTED]> wrote:
>> >>>>
>> >>>>
>> >>>> Hello,
>> >>>> I want to delete a directory by maven-antrun-plugin, I'm using
>> >>>> the scripts below, <plugin>
>> >>>> <groupId>org.apache.maven.plugins</groupId>
>> >>>> <artifactId>maven-antrun-plugin</artifactId>
>> >>>> <version>1.1</version>
>> >>>> <executions>
>> >>>> <execution>
>> >>>> <configuration>
>> >>>> <tasks>
>> >>>> <delete
dir="the_directory"/>
>> >>>> </tasks>
>> >>>> </configuration>
>> >>>> <goals>
>> >>>> <goal>run</goal>
>> >>>> </goals>
>> >>>> </execution>
>> >>>> </executions>
>> >>>> </plugin>
>> >>>> then I run "mvn antrun:run",
>> >>>> unfortunately, Maven didn't delete the directory.
>> >>>> How can I resolve the trouble?
>> >>>>
>> >>>> a cup of Java, cheers!
>> >>>> Sha Jiang
>> >>>> --
>> >>>> View this message in context:
>> >>>>
>> http://www.nabble.com/delete-a-directory-by-maven-antrun-plugin--tf27
>> 45727s177.html#a7660767
>> >>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>> >>>>
>> >>>>
>> >>>>
>> ---------------------------------------------------------------------
>> >>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >>>> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>>>
>> >>>>
>> >>>
>> >>>
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/delete-a-directory-by-maven-antrun-plugin--tf27
>> 45727s177.html#a7661328 Sent from the Maven - Users mailing list
>> archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/delete-a-directory-by-maven-antrun-plugin--tf27457
27s177.html#a7661702
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]