You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Allwicher, Klaus" <Kl...@nuance.com> on 2006/05/11 16:31:04 UTC

Ordered fileset

Hi,

I have to process different files ordered by their creation date. (In more
detail, I have to import them and have to assure the the contents of newer
archives are not overwritten by the contents of older files).
If there a possiblity to define an order for filesets or are there any other
ways to achieve this with standard ANT tasks/types ? 
Or do I have to write a new/extended fileset by my own ?

Currently the ANT target looks something like

	<for param="arc_name">
		<path> <fileset dir="${dir.import}" casesensitive="false"
includes="${arc_pattern}" /> </path>
	<sequential>
		<import archive="@{arcname}" />
	</sequential>
	</for>

Thanks for you help :-)

Klaus

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


Re: Ordered fileset

Posted by "Scot P. Floess" <fl...@mindspring.com>.
Klaus:

Check out the timestampselector in ant contrib.  I see you using the 
"for" task so I assume you are familiar with ant contrib ;)

 From the documentation, it has a count attribute "the number of files 
to find. If more than 1, than the files in the output appear in the 
order indicated by the |age| attribute" and age "the age of the files to 
retrieve, either |eldest| or |youngest|. Defaults to |youngest|."

Allwicher, Klaus wrote:
> Hi,
>
> I have to process different files ordered by their creation date. (In more
> detail, I have to import them and have to assure the the contents of newer
> archives are not overwritten by the contents of older files).
> If there a possiblity to define an order for filesets or are there any other
> ways to achieve this with standard ANT tasks/types ? 
> Or do I have to write a new/extended fileset by my own ?
>
> Currently the ANT target looks something like
>
> 	<for param="arc_name">
> 		<path> <fileset dir="${dir.import}" casesensitive="false"
> includes="${arc_pattern}" /> </path>
> 	<sequential>
> 		<import archive="@{arcname}" />
> 	</sequential>
> 	</for>
>
> Thanks for you help :-)
>
> Klaus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>   

-- 
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate  http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim


java.lang.NullPointerException

Posted by Evi <ev...@evi.pri.ee>.
Hello,

I am totally new to ant and have problems with installing it. Did everything
as suggested in installing instruction but get the following message:

C:\>ant
java.lang.NullPointerException
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:201)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

How to proceed?

Environment is: 

C:\>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
ANT_HOME=C:\!portaal\Allalaetud
tarkvara\apache-ant-1.6.5-bin\apache-ant-1.6.5
APPDATA=C:\Documents and Settings\Evi\Application Data
CI_HOLOS_CLI=C:\Program Files\Seagate Software\Open Olap\
CLASSPATH=%CLASSPATH%;C:\!portaal\Allalaetud
tarkvara\apache-ant-1.6.5-bin\apach
e-ant-1.6.5\lib\ant.jar
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=EVID600
ComSpec=C:\WINDOWS\system32\cmd.exe
HOMEDRIVE=C:
HOMEPATH=\
JAVA_HOME=C:\Sun\AppServer\jdk
LOGONSERVER=\\EVID600
NUMBER_OF_PROCESSORS=1
NWLANGUAGE=ENGLISH
OS=Windows_NT
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\AT
I Technologies\ATI Control Panel;C:\Program Files\Common Files\Adaptec
Shared\Sy
stem;C:\WINDOWS\system32\nls;C:\WINDOWS\system32\nls\ENGLISH;C:\Sun\AppServe
r\bi
n;Z:.;;C:\!portaal\Allalaetud
tarkvara\apache-ant-1.6.5-bin\apache-ant-1.6.5\bin

PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 9 Stepping 5, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0905
ProgramFiles=C:\Program Files
PROMPT=$P$G
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\Evi\LOCALS~1\Temp
TMP=C:\DOCUME~1\Evi\LOCALS~1\Temp
USERDOMAIN=EVID600
USERNAME=Evi
USERPROFILE=C:\Documents and Settings\Evi
windir=C:\WINDOWS
WINDOWS_LOGIN=0


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


Re: Ordered fileset

Posted by Matt Benson <gu...@yahoo.com>.
Ant 1.7 adds resourcecollections including the <sort>
collection which will sort another resourcecollection
(e.g. fileset) according to a specified
resourcecomparator.  If you care to build Ant from svn
HEAD you could try it out now, or wait for 1.7 (2-5
months maybe?)

-Matt

--- "Allwicher, Klaus" <Kl...@nuance.com>
wrote:

> Hi,
> 
> I have to process different files ordered by their
> creation date. (In more
> detail, I have to import them and have to assure the
> the contents of newer
> archives are not overwritten by the contents of
> older files).
> If there a possiblity to define an order for
> filesets or are there any other
> ways to achieve this with standard ANT tasks/types ?
> 
> Or do I have to write a new/extended fileset by my
> own ?
> 
> Currently the ANT target looks something like
> 
> 	<for param="arc_name">
> 		<path> <fileset dir="${dir.import}"
> casesensitive="false"
> includes="${arc_pattern}" /> </path>
> 	<sequential>
> 		<import archive="@{arcname}" />
> 	</sequential>
> 	</for>
> 
> Thanks for you help :-)
> 
> Klaus
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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