ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a1slowhand <ron_d...@yahoo.com>
Subject Re: Newbie question concerning ant javac
Date Fri, 29 May 2009 16:33:35 GMT

Thanks Chuck for the direction.  Fileset was one area that I have looked at,
it seemed like a logicial starting point.   I didnt have much luck with it,
but I will revisit the manual and try some more tests.

Thaks again.
Ron



Chuck Burgess-2 wrote:
> 
> On Fri, May 29, 2009 at 10:35 AM, a1slowhand <ron_dump@yahoo.com> wrote:
> 
>>
>> My company is just now moving to Ant and I have been given the task of
>> moving
>> it.  I have been able to compile our main source directory, so I know I
>> have
>> Ant installed and working propertly. We have our based code, and then
>> custom
>> code underneath that narrows the based code. My problem is how to select
>> "certain" source files for the compile.
>>
>> |TopSrc source dir  <-- based code
>> |    main.java
>> |    a.java
>> |    b.java
>> |--|CustomerXX <-- narrowed code
>> |--    b.java
>> |--|CustomerYY <-- another customer code narrowed
>> |--    a.java
>> |--    b.java
>>
>> What I would like to do is after making the changes to CustomerXX\b.java
>> compile grabbing TopSrc\main.java  & TopSrc\a.java &
>> TopSrc\CustomerXX\b.java, and ensuring that TopSrc\b.java is NOT selected
>> to
>> advoid a duplicate class error from the compile.  Similar process would
>> happen when changing CustomerYY's code.  I only need to compile the
>> Customer
>> that changed.  The closest that I have come is to compile source
>> directory
>> and all sub-directories.  Which Javac complains of duplicate classes when
>> it
>> compiles one of the sub-directories java apps with the same name as one
>> in
>> the root source directory.
>>
> 
> 
> My first thought here might be to try using a *fileset* to recognize all
> the
> files in the chosen customer directory as the first step.  Once I have
> those
> filenames in hand, I can then use another *fileset* to pick up files in
> the
> top-level dir and exclude filenames that are already found in the customer
> dir fileset.  I don't know if this is a valid interpretation of
> *fileset*usage, but this is the approach that comes to mind to
> research first.
> 
> If using the filesets to attempt compiling directly from the source
> directories doesn't prove feasible, perhaps an intermediate step of
> copying
> only the source files you want (identified by the filesets) to an
> intermediate source directory, and do your compilation against that file
> location.   This approach might mean all the intermediate files look like
> "changed" files due to being copied, but there are ways to tell the COPY
> task to only copy over files that have changed.
> 
> Again, this is all me thinking out loud, and not something I've had to
> attempt myself.
> -- 
> CRB
> 
> 

-- 
View this message in context: http://www.nabble.com/Newbie-question-concerning-ant-javac-tp23782206p23783130.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Mime
View raw message