'clean' target specifying all files 'except' a given fileset

View: New views
9 Messages — Rating Filter:   Alert me  

'clean' target specifying all files 'except' a given fileset

by Tim Visher-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey Everyone,

I'm trying to develop a clean target that essentially deletes
everything but a given set of files, rather than explicitly specifying
everything to delete.  This seems like a slightly more elegant
solution than the alternative, but I'm having very little success at
the moment.  I've included the contents of the clean target here
(since it's pretty small at the moment).  Any help would be greatly
appreciated.

Now:
<target name="clean" depends="init" >
        <delete failonerror="false">
            <fileset>
                <not>
                    <filename name="build.xml" />
                    <filename name="test.xml" />
                    <filename name="src/*" />
                    <filename name="tests/*" />
                </not>
            </fileset>
        </delete>
</target>

Former:
<target name="clean" depends="init" >
        <delete dir="${build}" />
        <delete dir="${dist}" />
        <delete dir="${doc}" />
        <delete dir="${tests:out}" />
        <delete dir="${tests:reports}" />
</target>

FYI: I'm actually failing on an error, a Null Pointer Exception to be
exact.  So it's not only not deleting the desired fileset; it's not
even executing.

--

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


Re: 'clean' target specifying all files 'except' a given fileset

by Tim Visher-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Partially solved my own problem at this point.  No longer getting
NullPointer but I still can't get the right includes.  My syntax must
be off or something.  Good news is that the exclude seems to be
working.

Current target contents:
<target name="clean" depends="init" >
        <delete>
            <fileset dir="." includes="**/*">
                <exclude name="build.xml" />
                <exclude name="test.xml" />
                <exclude name="src/*" />
                <exclude name="test/*" />
            </fileset>
        </delete>
    </target>

On Mon, Jun 16, 2008 at 10:46 AM, Tim Visher <tim.visher@...> wrote:

> Hey Everyone,
>
> I'm trying to develop a clean target that essentially deletes
> everything but a given set of files, rather than explicitly specifying
> everything to delete.  This seems like a slightly more elegant
> solution than the alternative, but I'm having very little success at
> the moment.  I've included the contents of the clean target here
> (since it's pretty small at the moment).  Any help would be greatly
> appreciated.
>
> Now:
> <target name="clean" depends="init" >
>        <delete failonerror="false">
>            <fileset>
>                <not>
>                    <filename name="build.xml" />
>                    <filename name="test.xml" />
>                    <filename name="src/*" />
>                    <filename name="tests/*" />
>                </not>
>            </fileset>
>        </delete>
> </target>
>
> Former:
> <target name="clean" depends="init" >
>        <delete dir="${build}" />
>        <delete dir="${dist}" />
>        <delete dir="${doc}" />
>        <delete dir="${tests:out}" />
>        <delete dir="${tests:reports}" />
> </target>
>
> FYI: I'm actually failing on an error, a Null Pointer Exception to be
> exact.  So it's not only not deleting the desired fileset; it's not
> even executing.
>
> --
>
> In Christ,
>
> Timmy V.
>
> http://burningones.com/
> http://five.sentenc.es/ - Spend less time on e-mail
>



--

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


Re: 'clean' target specifying all files 'except' a given fileset

by qazwart-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Built a quick test myself:

<project name="test" default="test" basedir=".">
    <target name="test">
        <delete>
            <fileset dir="${basedir}">
                <exclude name="build.xml"/>
                <exclude name="src/**"/>
            </fileset>
        </delete>
    </target>
</project>


This works great -- except it doesn't delete directories. Filesets
delete files, not directories. However, adding a "includeemptydirs"
parameter to the delete task seems to do the job:

"<project name="test" default="test" basedir=".">
    <target name="test">
        <delete
            includeemptydirs="true">
            <fileset dir="${basedir}">
                <exclude name="build.xml"/>
                <exclude name="src/**"/>
            </fileset>
        </delete>
    </target>
</project>

One hint which will make things easier in the future: Build everything
under a single directory. As a standard at my work, we put everything
created by the antfile under the "_build" directory: All tests,
javadocs, *.class files, etc. That way, I can clean up by just
deleting "_build".
--
David Weintraub
qazwart@...


On Mon, Jun 16, 2008 at 10:57 AM, Tim Visher <tim.visher@...> wrote:

> Partially solved my own problem at this point.  No longer getting
> NullPointer but I still can't get the right includes.  My syntax must
> be off or something.  Good news is that the exclude seems to be
> working.
>
> Current target contents:
> <target name="clean" depends="init" >
>        <delete>
>            <fileset dir="." includes="**/*">
>                <exclude name="build.xml" />
>                <exclude name="test.xml" />
>                <exclude name="src/*" />
>                <exclude name="test/*" />
>            </fileset>
>        </delete>
>    </target>
>
> On Mon, Jun 16, 2008 at 10:46 AM, Tim Visher <tim.visher@...> wrote:
>> Hey Everyone,
>>
>> I'm trying to develop a clean target that essentially deletes
>> everything but a given set of files, rather than explicitly specifying
>> everything to delete.  This seems like a slightly more elegant
>> solution than the alternative, but I'm having very little success at
>> the moment.  I've included the contents of the clean target here
>> (since it's pretty small at the moment).  Any help would be greatly
>> appreciated.
>>
>> Now:
>> <target name="clean" depends="init" >
>>        <delete failonerror="false">
>>            <fileset>
>>                <not>
>>                    <filename name="build.xml" />
>>                    <filename name="test.xml" />
>>                    <filename name="src/*" />
>>                    <filename name="tests/*" />
>>                </not>
>>            </fileset>
>>        </delete>
>> </target>
>>
>> Former:
>> <target name="clean" depends="init" >
>>        <delete dir="${build}" />
>>        <delete dir="${dist}" />
>>        <delete dir="${doc}" />
>>        <delete dir="${tests:out}" />
>>        <delete dir="${tests:reports}" />
>> </target>
>>
>> FYI: I'm actually failing on an error, a Null Pointer Exception to be
>> exact.  So it's not only not deleting the desired fileset; it's not
>> even executing.
>>
>> --
>>
>> In Christ,
>>
>> Timmy V.
>>
>> http://burningones.com/
>> http://five.sentenc.es/ - Spend less time on e-mail
>>
>
>
>
> --
>
> In Christ,
>
> Timmy V.
>
> http://burningones.com/
> http://five.sentenc.es/ - Spend less time on e-mail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


Re: 'clean' target specifying all files 'except' a given fileset

by qazwart-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

One more thing I just noticed (bad eyesight due to staring at computer
screens for way too long), You have just "src/*" and "test/*". You
probably want "src/**" and "test/**". A single asterisk means just the
current directory. A double asterisk means all subdirectories too.

--
David Weintraub
qazwart@...


On Mon, Jun 16, 2008 at 10:57 AM, Tim Visher <tim.visher@...> wrote:

> Partially solved my own problem at this point.  No longer getting
> NullPointer but I still can't get the right includes.  My syntax must
> be off or something.  Good news is that the exclude seems to be
> working.
>
> Current target contents:
> <target name="clean" depends="init" >
>        <delete>
>            <fileset dir="." includes="**/*">
>                <exclude name="build.xml" />
>                <exclude name="test.xml" />
>                <exclude name="src/*" />
>                <exclude name="test/*" />
>            </fileset>
>        </delete>
>    </target>
>
> On Mon, Jun 16, 2008 at 10:46 AM, Tim Visher <tim.visher@...> wrote:
>> Hey Everyone,
>>
>> I'm trying to develop a clean target that essentially deletes
>> everything but a given set of files, rather than explicitly specifying
>> everything to delete.  This seems like a slightly more elegant
>> solution than the alternative, but I'm having very little success at
>> the moment.  I've included the contents of the clean target here
>> (since it's pretty small at the moment).  Any help would be greatly
>> appreciated.
>>
>> Now:
>> <target name="clean" depends="init" >
>>        <delete failonerror="false">
>>            <fileset>
>>                <not>
>>                    <filename name="build.xml" />
>>                    <filename name="test.xml" />
>>                    <filename name="src/*" />
>>                    <filename name="tests/*" />
>>                </not>
>>            </fileset>
>>        </delete>
>> </target>
>>
>> Former:
>> <target name="clean" depends="init" >
>>        <delete dir="${build}" />
>>        <delete dir="${dist}" />
>>        <delete dir="${doc}" />
>>        <delete dir="${tests:out}" />
>>        <delete dir="${tests:reports}" />
>> </target>
>>
>> FYI: I'm actually failing on an error, a Null Pointer Exception to be
>> exact.  So it's not only not deleting the desired fileset; it's not
>> even executing.
>>
>> --
>>
>> In Christ,
>>
>> Timmy V.
>>
>> http://burningones.com/
>> http://five.sentenc.es/ - Spend less time on e-mail
>>
>
>
>
> --
>
> In Christ,
>
> Timmy V.
>
> http://burningones.com/
> http://five.sentenc.es/ - Spend less time on e-mail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


Re: 'clean' target specifying all files 'except' a given fileset

by Tim Visher-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey David,

Thanks for the help.  This is the final copy, and it appears to be working.

    <target name="clean" depends="init" >
        <delete includeemptydirs="true">
            <fileset dir="${basedir}">
                <exclude name="build.xml"/>
                <exclude name="test.xml"/>
                <exclude name="src/**/*"/>
                <exclude name="tests/**/*"/>
            </fileset>
        </delete>
    </target>

I had to add the /* to the end of the directories to get the actual
files under those directory trees to be excluded, but other than that
it's pretty much what you had.  In the docs, they say you're supposed
to be able to have each of the exclude/include statements incorporate
a group of patterns, separated by ',' or ' ', but I haven't been able
to get this to work.  Anyone know anything about those?

On Mon, Jun 16, 2008 at 11:21 AM, David Weintraub <qazwart@...> wrote:

> One more thing I just noticed (bad eyesight due to staring at computer
> screens for way too long), You have just "src/*" and "test/*". You
> probably want "src/**" and "test/**". A single asterisk means just the
> current directory. A double asterisk means all subdirectories too.
>
> --
> David Weintraub
> qazwart@...
>
>
> On Mon, Jun 16, 2008 at 10:57 AM, Tim Visher <tim.visher@...> wrote:
>> Partially solved my own problem at this point.  No longer getting
>> NullPointer but I still can't get the right includes.  My syntax must
>> be off or something.  Good news is that the exclude seems to be
>> working.
>>
>> Current target contents:
>> <target name="clean" depends="init" >
>>        <delete>
>>            <fileset dir="." includes="**/*">
>>                <exclude name="build.xml" />
>>                <exclude name="test.xml" />
>>                <exclude name="src/*" />
>>                <exclude name="test/*" />
>>            </fileset>
>>        </delete>
>>    </target>
>>
>> On Mon, Jun 16, 2008 at 10:46 AM, Tim Visher <tim.visher@...> wrote:
>>> Hey Everyone,
>>>
>>> I'm trying to develop a clean target that essentially deletes
>>> everything but a given set of files, rather than explicitly specifying
>>> everything to delete.  This seems like a slightly more elegant
>>> solution than the alternative, but I'm having very little success at
>>> the moment.  I've included the contents of the clean target here
>>> (since it's pretty small at the moment).  Any help would be greatly
>>> appreciated.
>>>
>>> Now:
>>> <target name="clean" depends="init" >
>>>        <delete failonerror="false">
>>>            <fileset>
>>>                <not>
>>>                    <filename name="build.xml" />
>>>                    <filename name="test.xml" />
>>>                    <filename name="src/*" />
>>>                    <filename name="tests/*" />
>>>                </not>
>>>            </fileset>
>>>        </delete>
>>> </target>
>>>
>>> Former:
>>> <target name="clean" depends="init" >
>>>        <delete dir="${build}" />
>>>        <delete dir="${dist}" />
>>>        <delete dir="${doc}" />
>>>        <delete dir="${tests:out}" />
>>>        <delete dir="${tests:reports}" />
>>> </target>
>>>
>>> FYI: I'm actually failing on an error, a Null Pointer Exception to be
>>> exact.  So it's not only not deleting the desired fileset; it's not
>>> even executing.
>>>
>>> --
>>>
>>> In Christ,
>>>
>>> Timmy V.
>>>
>>> http://burningones.com/
>>> http://five.sentenc.es/ - Spend less time on e-mail
>>>
>>
>>
>>
>> --
>>
>> In Christ,
>>
>> Timmy V.
>>
>> http://burningones.com/
>> http://five.sentenc.es/ - Spend less time on e-mail
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@...
>> For additional commands, e-mail: user-help@...
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>



--

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


Re: 'clean' target specifying all files 'except' a given fileset

by Peter Reilly-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This would work.

However, it it very dangerous, it it too easy to
delete stuff that you do not wont to.

I would place *all* the generated artifacts of a build in a
special directory - "build" or "target", and for
the clean target, simply delete that directory.

<delete dir="build"/>

Peter


On Mon, Jun 16, 2008 at 4:29 PM, Tim Visher <tim.visher@...> wrote:

> Hey David,
>
> Thanks for the help.  This is the final copy, and it appears to be working.
>
>    <target name="clean" depends="init" >
>        <delete includeemptydirs="true">
>            <fileset dir="${basedir}">
>                <exclude name="build.xml"/>
>                <exclude name="test.xml"/>
>                <exclude name="src/**/*"/>
>                <exclude name="tests/**/*"/>
>            </fileset>
>        </delete>
>    </target>
>
> I had to add the /* to the end of the directories to get the actual
> files under those directory trees to be excluded, but other than that
> it's pretty much what you had.  In the docs, they say you're supposed
> to be able to have each of the exclude/include statements incorporate
> a group of patterns, separated by ',' or ' ', but I haven't been able
> to get this to work.  Anyone know anything about those?
>
> On Mon, Jun 16, 2008 at 11:21 AM, David Weintraub <qazwart@...> wrote:
>> One more thing I just noticed (bad eyesight due to staring at computer
>> screens for way too long), You have just "src/*" and "test/*". You
>> probably want "src/**" and "test/**". A single asterisk means just the
>> current directory. A double asterisk means all subdirectories too.
>>
>> --
>> David Weintraub
>> qazwart@...
>>
>>
>> On Mon, Jun 16, 2008 at 10:57 AM, Tim Visher <tim.visher@...> wrote:
>>> Partially solved my own problem at this point.  No longer getting
>>> NullPointer but I still can't get the right includes.  My syntax must
>>> be off or something.  Good news is that the exclude seems to be
>>> working.
>>>
>>> Current target contents:
>>> <target name="clean" depends="init" >
>>>        <delete>
>>>            <fileset dir="." includes="**/*">
>>>                <exclude name="build.xml" />
>>>                <exclude name="test.xml" />
>>>                <exclude name="src/*" />
>>>                <exclude name="test/*" />
>>>            </fileset>
>>>        </delete>
>>>    </target>
>>>
>>> On Mon, Jun 16, 2008 at 10:46 AM, Tim Visher <tim.visher@...> wrote:
>>>> Hey Everyone,
>>>>
>>>> I'm trying to develop a clean target that essentially deletes
>>>> everything but a given set of files, rather than explicitly specifying
>>>> everything to delete.  This seems like a slightly more elegant
>>>> solution than the alternative, but I'm having very little success at
>>>> the moment.  I've included the contents of the clean target here
>>>> (since it's pretty small at the moment).  Any help would be greatly
>>>> appreciated.
>>>>
>>>> Now:
>>>> <target name="clean" depends="init" >
>>>>        <delete failonerror="false">
>>>>            <fileset>
>>>>                <not>
>>>>                    <filename name="build.xml" />
>>>>                    <filename name="test.xml" />
>>>>                    <filename name="src/*" />
>>>>                    <filename name="tests/*" />
>>>>                </not>
>>>>            </fileset>
>>>>        </delete>
>>>> </target>
>>>>
>>>> Former:
>>>> <target name="clean" depends="init" >
>>>>        <delete dir="${build}" />
>>>>        <delete dir="${dist}" />
>>>>        <delete dir="${doc}" />
>>>>        <delete dir="${tests:out}" />
>>>>        <delete dir="${tests:reports}" />
>>>> </target>
>>>>
>>>> FYI: I'm actually failing on an error, a Null Pointer Exception to be
>>>> exact.  So it's not only not deleting the desired fileset; it's not
>>>> even executing.
>>>>
>>>> --
>>>>
>>>> In Christ,
>>>>
>>>> Timmy V.
>>>>
>>>> http://burningones.com/
>>>> http://five.sentenc.es/ - Spend less time on e-mail
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> In Christ,
>>>
>>> Timmy V.
>>>
>>> http://burningones.com/
>>> http://five.sentenc.es/ - Spend less time on e-mail
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@...
>>> For additional commands, e-mail: user-help@...
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@...
>> For additional commands, e-mail: user-help@...
>>
>>
>
>
>
> --
>
> In Christ,
>
> Timmy V.
>
> http://burningones.com/
> http://five.sentenc.es/ - Spend less time on e-mail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


Re: 'clean' target specifying all files 'except' a given fileset

by qazwart-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You have "src/**/*" instead of just "src/**".

I believe they both mean the same, but I can't say for certain. The
"**" means all the files in the current directory and all files in the
subdirectories too.

You can have something like this:

<exclude name="src/**/*.java"/>

which will exclude all files in all directories with the *.java suffix, but in

<exclude name="src/**/*"/>

The single asterisk will match all file names anyway. But, there might
be some circumstance where this might not be true.

BTW, I also recommend that you add "${basedir}" to your excludes.
Otherwise, if the build.xml is callled from a different location, you
might be deleting files you don't want to delete.

As someone already said and I hinted at: It is a bit dangerous to
specify a <delete> and hope you're somehow you specified all the
directories you don't want to touch. If you use <delete> and forget to
specify a directory to delete, you didn't really do any harm. But if
you use <delete> and specify the files you want to keep, but forget a
directory, you're up a rather smelly estuary without the means of
propulsion.

The best thing to do is put all files that your build.xml creates
under a single directory, then your "clean" command just specifies
that directory.

--
David Weintraub
qazwart@...


On Mon, Jun 16, 2008 at 11:29 AM, Tim Visher <tim.visher@...> wrote:

> Hey David,
>
> Thanks for the help.  This is the final copy, and it appears to be working.
>
>    <target name="clean" depends="init" >
>        <delete includeemptydirs="true">
>            <fileset dir="${basedir}">
>                <exclude name="build.xml"/>
>                <exclude name="test.xml"/>
>                <exclude name="src/**/*"/>
>                <exclude name="tests/**/*"/>
>            </fileset>
>        </delete>
>    </target>
>
> I had to add the /* to the end of the directories to get the actual
> files under those directory trees to be excluded, but other than that
> it's pretty much what you had.  In the docs, they say you're supposed
> to be able to have each of the exclude/include statements incorporate
> a group of patterns, separated by ',' or ' ', but I haven't been able
> to get this to work.  Anyone know anything about those?
>
> On Mon, Jun 16, 2008 at 11:21 AM, David Weintraub <qazwart@...> wrote:
>> One more thing I just noticed (bad eyesight due to staring at computer
>> screens for way too long), You have just "src/*" and "test/*". You
>> probably want "src/**" and "test/**". A single asterisk means just the
>> current directory. A double asterisk means all subdirectories too.
>>
>> --
>> David Weintraub
>> qazwart@...
>>
>>
>> On Mon, Jun 16, 2008 at 10:57 AM, Tim Visher <tim.visher@...> wrote:
>>> Partially solved my own problem at this point.  No longer getting
>>> NullPointer but I still can't get the right includes.  My syntax must
>>> be off or something.  Good news is that the exclude seems to be
>>> working.
>>>
>>> Current target contents:
>>> <target name="clean" depends="init" >
>>>        <delete>
>>>            <fileset dir="." includes="**/*">
>>>                <exclude name="build.xml" />
>>>                <exclude name="test.xml" />
>>>                <exclude name="src/*" />
>>>                <exclude name="test/*" />
>>>            </fileset>
>>>        </delete>
>>>    </target>
>>>
>>> On Mon, Jun 16, 2008 at 10:46 AM, Tim Visher <tim.visher@...> wrote:
>>>> Hey Everyone,
>>>>
>>>> I'm trying to develop a clean target that essentially deletes
>>>> everything but a given set of files, rather than explicitly specifying
>>>> everything to delete.  This seems like a slightly more elegant
>>>> solution than the alternative, but I'm having very little success at
>>>> the moment.  I've included the contents of the clean target here
>>>> (since it's pretty small at the moment).  Any help would be greatly
>>>> appreciated.
>>>>
>>>> Now:
>>>> <target name="clean" depends="init" >
>>>>        <delete failonerror="false">
>>>>            <fileset>
>>>>                <not>
>>>>                    <filename name="build.xml" />
>>>>                    <filename name="test.xml" />
>>>>                    <filename name="src/*" />
>>>>                    <filename name="tests/*" />
>>>>                </not>
>>>>            </fileset>
>>>>        </delete>
>>>> </target>
>>>>
>>>> Former:
>>>> <target name="clean" depends="init" >
>>>>        <delete dir="${build}" />
>>>>        <delete dir="${dist}" />
>>>>        <delete dir="${doc}" />
>>>>        <delete dir="${tests:out}" />
>>>>        <delete dir="${tests:reports}" />
>>>> </target>
>>>>
>>>> FYI: I'm actually failing on an error, a Null Pointer Exception to be
>>>> exact.  So it's not only not deleting the desired fileset; it's not
>>>> even executing.
>>>>
>>>> --
>>>>
>>>> In Christ,
>>>>
>>>> Timmy V.
>>>>
>>>> http://burningones.com/
>>>> http://five.sentenc.es/ - Spend less time on e-mail
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> In Christ,
>>>
>>> Timmy V.
>>>
>>> http://burningones.com/
>>> http://five.sentenc.es/ - Spend less time on e-mail
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@...
>>> For additional commands, e-mail: user-help@...
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@...
>> For additional commands, e-mail: user-help@...
>>
>>
>
>
>
> --
>
> In Christ,
>
> Timmy V.
>
> http://burningones.com/
> http://five.sentenc.es/ - Spend less time on e-mail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


RE: 'clean' target specifying all files 'except' a given fileset

by Vallon, Justin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Let me second that, with a further example:  I would be "frustrated" if
an "ant clean" deleted my scratch files, notes, etc, that might be
sitting at the top-level of a project.

-Justin
office 8-383-6725, 212-272-6725; cell 917-861-6042
-----Original Message-----
From: David Weintraub [mailto:qazwart@...]
Sent: Monday, June 16, 2008 11:52 AM
To: Ant Users List
Subject: Re: 'clean' target specifying all files 'except' a given
fileset

...
As someone already said and I hinted at: It is a bit dangerous to
specify a <delete> and hope you're somehow you specified all the
directories you don't want to touch. If you use <delete> and forget to
specify a directory to delete, you didn't really do any harm. But if
you use <delete> and specify the files you want to keep, but forget a
directory, you're up a rather smelly estuary without the means of
propulsion.

The best thing to do is put all files that your build.xml creates
under a single directory, then your "clean" command just specifies
that directory.
...




***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


Re: 'clean' target specifying all files 'except' a given fileset

by Tim Visher-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the tips everyone.  I've 'fixed' the build file and now
have all artifacts of ant sent to the build directory.

On Mon, Jun 16, 2008 at 12:11 PM, Vallon, Justin <jvallon@...> wrote:

> Let me second that, with a further example:  I would be "frustrated" if
> an "ant clean" deleted my scratch files, notes, etc, that might be
> sitting at the top-level of a project.
>
> -Justin
> office 8-383-6725, 212-272-6725; cell 917-861-6042
> -----Original Message-----
> From: David Weintraub [mailto:qazwart@...]
> Sent: Monday, June 16, 2008 11:52 AM
> To: Ant Users List
> Subject: Re: 'clean' target specifying all files 'except' a given
> fileset
>
> ...
> As someone already said and I hinted at: It is a bit dangerous to
> specify a <delete> and hope you're somehow you specified all the
> directories you don't want to touch. If you use <delete> and forget to
> specify a directory to delete, you didn't really do any harm. But if
> you use <delete> and specify the files you want to keep, but forget a
> directory, you're up a rather smelly estuary without the means of
> propulsion.
>
> The best thing to do is put all files that your build.xml creates
> under a single directory, then your "clean" command just specifies
> that directory.
> ...
>
>
>
>
> ***********************************************************************
> Bear Stearns is not responsible for any recommendation, solicitation,
> offer or agreement or any information about any transaction, customer
> account or account activity contained in this communication.
> ***********************************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>



--

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...

LightInTheBox - Buy quality products at wholesale price!