ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: copy directory problem help please
Date Tue, 21 Nov 2006 14:26:17 GMT
><copy todir="classes" verbose="true" includeEmptyDirs="true" overwrite="true">
>    <fileset dir="${dir.src}/com/adp/hr/resources/" /> 
></copy> 

<copy> copies all resources which it gets from the nested <fileset>.
<fileset> gives a list of files with paths
 !!! relative to its 'dir' attribute !!!

If you want to keep the com/adp/hr/resources/ path information use

<copy todir="classes" verbose="true" includeEmptyDirs="true" overwrite="true">
    <fileset dir="${dir.src}" includes="com/adp/hr/resources/" /> 
</copy> 


Jan

>-----Urspr√ľngliche Nachricht-----
>Von: Narahari 'n' Savitha [mailto:savithari@gmail.com] 
>Gesendet: Montag, 20. November 2006 17:29
>An: user@ant.apache.org
>Betreff: copy directory problem help please
>
>Friends,
>
>I have this situation
>src
>   |_com\test\narahari|
>                      |___Dao
>                             |____A.java
>                             |____B.java
>                             |____C.java
>
>                      |___resources
>                              |__x.properties
>                              |__y.properties
>
>
>
>When I compile the code, under the classes folder the java 
>files get compiled and get placed in the right folder.
>
>classes
>   |_com\test\narahari|
>                      |___Dao
>                             |____A.java
>                             |____B.java
>                             |____C.java
>
>
>I need to copy the resources folder from the src to the 
>classes folder so I can jar it.  But the following does not work.
>
>
><copy todir="classes" verbose="true" includeEmptyDirs="true"
>overwrite="true">
>                <fileset 
>dir="${dir.src}/com/adp/hr/resources/" /> </copy>
>
>I am not able to get the directory resources get copied over.  
>But the x.properies and y.properties gets copied over to the 
>classes and not the resources folder.
>
>Please inform how to copy directories.
>
>-Narahari
>

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


Mime
View raw message