You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by ArvindSaraswat <ar...@huawei.com> on 2009/07/24 17:57:21 UTC
Compile only if files have changed
I am sure this question has been answered several times. Allow me to explain
the problem once more.
I have two directories:
a) latest-code: contains the latest code from VSS
b) backup-code: before I get latest from VSS, I will backup the entore code
here.
The ANT script is like below:
1. delete old backup-code
2. create backup from latest-code to backup-code
3. get latest from VSS
4. If any files have changed (other than .scc files), trigger build. Else do
not.
--
View this message in context: http://www.nabble.com/Compile-only-if-files-have-changed-tp24647169p24647169.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
AW: AW: Compile only if files have changed
Posted by Ja...@rzf.fin-nrw.de.
A <fileset> scans a directory for files to select.
The standard 'selectors' matches against file names, but other are configurable.
<modified> calculates MD5 hashes for files and selects files which MD5 differs from earlier stored values.
Jan
http://ant.apache.org/manual/CoreTypes/selectors.html
http://ant.apache.org/manual/CoreTypes/selectors.html#modified
>-----Ursprüngliche Nachricht-----
>Von: ArvindSaraswat [mailto:arvinds@huawei.com]
>Gesendet: Montag, 27. Juli 2009 08:07
>An: user@ant.apache.org
>Betreff: Re: AW: Compile only if files have changed
>
>
>can you be more specific about the below part of the code? What is
><modified/>?
>
><condition property="changedfiles">
> <resourcecount when="greater" count="0">
> <fileset dir="LATEST">
> <modified/>
>
>
>Jan.Materne wrote:
>>
>>>I have two directories:
>>>a) latest-code: contains the latest code from VSS
>>>b) backup-code: before I get latest from VSS, I will backup
>>>the entore code
>>>here.
>>>
>>>The ANT script is like below:
>>>1. delete old backup-code
>>
>> <delete>
>>
>>
>>>2. create backup from latest-code to backup-code
>>
>> <copy>
>>
>>
>>>3. get latest from VSS
>>
>> VSS Antlib from the sandbox
>>
>http://ant.apache.org/antlibs/sandbox.html#VSS%20-%20Microsoft%
>20Visual%
>> 20SourceSafe%20Tasks
>>
>>
>>>4. If any files have changed (other than .scc files), trigger
>>>build. Else do not.
>>
>> <condition property="changedfiles">
>> <resourcecount when="greater" count="0">
>> <fileset dir="LATEST">
>> <modified/>
>>
>>
>> Jan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>>
>
>--
>View this message in context:
>http://www.nabble.com/Compile-only-if-files-have-changed-tp2464
>7169p24673988.html
>Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: AW: Compile only if files have changed
Posted by ArvindSaraswat <ar...@huawei.com>.
can you be more specific about the below part of the code? What is
<modified/>?
<condition property="changedfiles">
<resourcecount when="greater" count="0">
<fileset dir="LATEST">
<modified/>
Jan.Materne wrote:
>
>>I have two directories:
>>a) latest-code: contains the latest code from VSS
>>b) backup-code: before I get latest from VSS, I will backup
>>the entore code
>>here.
>>
>>The ANT script is like below:
>>1. delete old backup-code
>
> <delete>
>
>
>>2. create backup from latest-code to backup-code
>
> <copy>
>
>
>>3. get latest from VSS
>
> VSS Antlib from the sandbox
> http://ant.apache.org/antlibs/sandbox.html#VSS%20-%20Microsoft%20Visual%
> 20SourceSafe%20Tasks
>
>
>>4. If any files have changed (other than .scc files), trigger
>>build. Else do not.
>
> <condition property="changedfiles">
> <resourcecount when="greater" count="0">
> <fileset dir="LATEST">
> <modified/>
>
>
> Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Compile-only-if-files-have-changed-tp24647169p24673988.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
AW: Compile only if files have changed
Posted by Ja...@rzf.fin-nrw.de.
>I have two directories:
>a) latest-code: contains the latest code from VSS
>b) backup-code: before I get latest from VSS, I will backup
>the entore code
>here.
>
>The ANT script is like below:
>1. delete old backup-code
<delete>
>2. create backup from latest-code to backup-code
<copy>
>3. get latest from VSS
VSS Antlib from the sandbox
http://ant.apache.org/antlibs/sandbox.html#VSS%20-%20Microsoft%20Visual%
20SourceSafe%20Tasks
>4. If any files have changed (other than .scc files), trigger
>build. Else do not.
<condition property="changedfiles">
<resourcecount when="greater" count="0">
<fileset dir="LATEST">
<modified/>
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org