ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabricio M. Sanchez" <fabri...@pstonline.co.uk>
Subject SOLVED: Regenerating Modified Selector cache file (after it's deleted)
Date Mon, 20 Aug 2007 14:36:56 GMT
Thankyou Jan, 

I've modified my "reset" target to include the pathconvert task and the
cache file was successfully regenerated:

	<target name="check">
		<copy todir="mod_src">
			<fileset dir="src">
				<and>
					<modified update="true"
seldirs="true" cache="propertyfile"	algorithm="digest"
comparator="equal">
						<param
name="cache.cachefile"     value="cache.properties"/>
						<param
name="algorithm.algorithm" value="MD5"/>
					</modified>
					<type type="file"/>
				</and>
			</fileset>
		</copy>
	</target>

	
	<target name="reset">
	  <!-- delete the cache to force an update -->
    <delete file="cache.properties"/>
    
	  <!-- update the cache without copying files -->
    <pathconvert property="not-used">
      <fileset dir="src">
			  <modified update="true" seldirs="true"
cache="propertyfile"	algorithm="digest" comparator="equal">
				  <param name="cache.cachefile"
value="cache.properties"/>
				  <param name="algorithm.algorithm"
value="MD5"/>
			  </modified>
		  </fileset>
	  </pathconvert> 
	</target>



Fabricio.


-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de] 
Sent: 20 August 2007 15:24
To: user@ant.apache.org
Subject: AW: Regenerating Modified Selector cache file (after it's deleted) 


You have to enforce a directory scanning, so that the modified selector has
to do something. Without any write operation (move, copy) the simplest thing
is storing the file list.

<pathconvert property="not-used">
   <fileset> <modified>


Jan 

-----Urspr√ľngliche Nachricht-----
Von: Fabricio M. Sanchez [mailto:fabricio@pstonline.co.uk] 
Gesendet: Montag, 20. August 2007 16:21
An: user@ant.apache.org
Betreff: Regenerating Modified Selector cache file (after it's deleted) 

Hi there,

I've been using google for a while with no useful answers... Hopefully
someone can point me in the right direction.

My "check" target works fine, it copies any files that are different to the
cache.properties file into my mod_src directory (excluding directories).

However, I am trying to regenerate my cache file with the "reset" target and
I don't know how.

Is there a way to just regenerate the cache from scratch (after it's been
deleted)? (Without copying all the files as part of the process).


	<target name="check">
		<copy todir="mod_src">
			<fileset dir="src">
				<and>
					<modified update="true"
seldirs="true" cache="propertyfile"	algorithm="digest"
comparator="equal">
						<param
name="cache.cachefile"     value="cache.properties"/>
						<param
name="algorithm.algorithm" value="MD5"/>
					</modified>
					<type type="file"/>
				</and>
			</fileset>
		</copy>
	</target>

	
	<target name="reset">
	  <!-- delete the cache to force an update -->
    <delete file="cache.properties"/>
    
	  <!-- update the cache without copying files -->
    <fileset dir="src">
			<modified update="true" seldirs="true"
cache="propertyfile"	algorithm="digest" comparator="equal">
				<param name="cache.cachefile"
value="cache.properties"/>
				<param name="algorithm.algorithm"
value="MD5"/>
			</modified>
		</fileset>
	  
	</target>


Thank you,

Fabricio

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.484 / Virus Database: 269.12.0/961 - Release Date: 19/08/2007
07:27
 


---------------------------------------------------------------------
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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.484 / Virus Database: 269.12.0/961 - Release Date: 19/08/2007
07:27
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.484 / Virus Database: 269.12.0/961 - Release Date: 19/08/2007
07:27
 


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


Mime
View raw message