ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Virkus <rob...@enough.de>
Subject Duplicate Class Error when Re-using Javac Task
Date Fri, 25 Feb 2005 16:13:59 GMT
Hi everyone,

I'd like to re-use a Javac-task from within my own task but I always get 
"duplicate class: ClassName"-errors when I compile the second set of source 
code files.

The background of this is that I have a preprocessor that creates different 
source code versions of the same project, which are then compiled by the 
org.apache.tools.ant.taskdefs.Javac task. I use and set different directories 
for the source code and for the compiled classes in each run. The first round 
is compiled without any problems, but the following round fails with the 
"duplicate class" error.

When I create a new instance of the Javac task, it works without problems. 

I want to reuse the Javac task since I want to allow a nested 
<javac>-definition in my task (in the build.xml). (The project is J2ME Polish 
by the way, www.j2mepolish.org).

Is anyone aware what could be done in this case? I have seen that the Javac 
task resets its internal file list for each execute() call, but this doesn't 
seem to help. I could send a demonstrator project along with the source code 
to anyone interested.

Thanks in advance,
    Robert
-- 
Robert Virkus
Enough Software
Vor dem Steintor 218
28203 Bremen
Germany

www.enough.de
+49-(0)421-9889131
+49-(0)160-7788203
robert@enough.de

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


Mime
View raw message