ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vitaly Stulsky" <vitaly_stul...@yahoo.com>
Subject Patch: JAVAC dependency tracking and multiple src paths handling
Date Wed, 10 May 2000 14:29:51 GMT
At glance.
==========
1) Here is enclosed patch for the JavaC dependency tracking.
2) Also this patch allows using multiple source location in the JAVAC srcdir
option.
3) Implemented new JAVAC option SOURCEPATH.

Full description
================
1) Dependency tracking.
   To switch on this feature you have to use dependence="on" JAVAC option.

   Algorithm performs class files analyzing and backward dependency tracking.
   Example:
     a) A.java depends on B.java. With applied patch if we change B.java, ANT
automatically
     recompiles A.java. In current realization compile list contains only
B.java.
     b) If we will change Task.java in the ant sources, current ant realization
     recompiles only one file. In new realization compile list contains >= 33
files
     (the number of files depends on your own Task extensions).

   For this functionality you have to modify manifest.mf. It is necessary to
include
   lib.jar to the Class-path.

   In next few weeks I'll comment lib.jar source, make proper indentation and
   send sources to the community. Also it is possible to include lib.jar code
   to the ant.jar. If anybody wants to view the sources immediately I'll send
   them on first demand directly to he or she.

2) With applied patch it is possible to use such src dirs:
		<property   name="src.dir"
					value= "com/company/progr/mainprogr;
							com/company/utils/protocol;
							com/company/utils/db;
							com/company/utils/diag;
							com/company/utils/html;
							com/company/utils/sort;
							com/company/utils/string;
							com/company/utils/thread;
							com/company/utils/test;
							com/company/utils/timer
		/>
   All paths must be separated by semicolon ( I estimate Unix users indignation,
but now current
   approach easily extended to usage semicolon on NT platform and colon on
Unix).

3) For every project it is necessary to specify sourcepath option. This option
will be passed
directly to javac. This functionality is follows from multiple src paths. Now
you can
specify not root of all packages in the srcdir option. Root dir has to be
specified in
sourcepath option.
For our project this functionality is very useful, cause we have many reusable
utilities and
want to distribute parts of them with different projects. All utilities classes
are stored
in one upper-level package com.company.utils. For every project we have to
select from 3 to 10
lower-level packages and include them to the distribution. Approach with
multiple srcdirs makes
build file easiest and better understandable.

We'llbe glad to answer all of your questions.

Regards,
Vitaly Stulsky
mailto:Vitaly_Stulsky@yahoo.com

Mime
View raw message