You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Raheel <so...@gawab.com> on 2004/05/14 13:26:38 UTC

deploying static resources along with class files

Hi All,

I want to have deployed my static sources along with my class files. For instance, I have some properties and image files in my source (src) folder. I want to have them copied in my deployment folder (build), through my <javac> task. This is a normal behaviour if you are using some smart IDE, like jbuilder, eclipse etc. Is there any way to do this automatically ?

thanks. 

RE: deploying static resources along with class files

Posted by "Oleg S. Estekhin" <ol...@yandex.ru>.
Hi

<javac> task will only compile your java files

You should use <copy> task to copy all other relevant files to the target
directory. For example:

<patternset id="pattern.otherSources">
	<include name="**/*.properties"/>
	<include name="**/*.gif"/>
	<!-- add include task for all non-java files that you need -->
</patternset>

<javac srcdir="source" destdir="destination">
</javac>

<copy todir="destination">
	<fileset dir="source">
            	<patternset refid="pattern.otherSources"/>
	</fileset>
</copy>

> -----Original Message-----
> From: Raheel [mailto:softwarengineeer@gawab.com]
> Sent: Friday, May 14, 2004 3:27 PM
> To: user@ant.apache.org
> Subject: deploying static resources along with class files
>
>
> Hi All,
>
> I want to have deployed my static sources along with my class
> files. For instance, I have some properties and image files in my
> source (src) folder. I want to have them copied in my deployment
> folder (build), through my <javac> task. This is a normal
> behaviour if you are using some smart IDE, like jbuilder, eclipse
> etc. Is there any way to do this automatically ?
>
> thanks.


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