You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jicheng Hao <jh...@tgen.org> on 2003/05/08 20:39:02 UTC

where to put resource file

Currently, I have resource files with other java source.  When I make a
simple text change, I have to run ant to recompile everything using ant
to update resource files under classes directory (or move over from src
to classes) directory.

What do I need to do to avoid this ?

Thanks.

Jicheng

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


Re: where to put resource file

Posted by Max Cooper <ma...@maxcooper.com>.
Improve your build system.

Something is not as good as it could be if it is always recompiling
everything. The Ant <copy> and <javac> tasks will only copy/compile if the
target files are out of date. If you don't change any source files, for
instance, it should not be recompiling anything.

However, <javac> can miss some dependencies (it just does .java to .class
file comparisons with no knowledge of the deeper dependencies), so perhaps
your build is setup to recompile everything, every time. Check out the
<depend> optional task for a nice way to make sure all classes are
recompiled when they need to be, without having to recompile all of them
every time:
http://ant.apache.org/manual/OptionalTasks/depend.html
Or just have javac recompile the files that changed (.java to .class) and
rely on yourself to do a clean build periodically to catch dependency
issues.

Alternately, separate out the target to copy the resource files so you can
run it directly:
  ant copy-resources
or something like that.

-Max

----- Original Message ----- 
From: "Jicheng Hao" <jh...@tgen.org>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>;
<ya...@rewardstream.com>
Sent: Thursday, May 08, 2003 11:39 AM
Subject: where to put resource file


Currently, I have resource files with other java source.  When I make a
simple text change, I have to run ant to recompile everything using ant
to update resource files under classes directory (or move over from src
to classes) directory.

What do I need to do to avoid this ?

Thanks.

Jicheng

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




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