ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33882] - Apt task with fork="false" and factory tag
Date Mon, 28 Mar 2005 03:22:49 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33882>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33882





------- Additional Comments From gattojavanet@uol.com.br  2005-03-28 05:22 -------
Created an attachment (id=14576)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=14576&action=view)
Test case for failure

Hi folks,

Apparently apt only works in non-forked mode if tools.jar is in the system
classpath.  I had to edit bin/ant in order to manually put it in the -classpath
VM option.

When I ran it without tools.jar in the system classpath, I got this:

java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory

If I added tools.jar to the classpath passed to the apt task from within the
build file, I got this:

java.lang.ClassCastException: apt.extractintf.ExtractInterfaceProcessorFactory

(Which is about my test processor factory.)

Things work when running in forked mode, but large filesets (1000 classes)
cause Runtime.exec to fail.  So, if you decide to always fork, I guess you'll
have to generate a temp file with the sources to be processed and pass it
through "@files" to apt.

I'm attaching my test case to help in diagnostics.  I'm only sending 4 classes,
if you want the other 996 (which I doubt) tell me :-)

On a side note, I ran this with ant 1.6 and the apt-related classes compiled
from CVS HEAD.	The ant-apt.jar is in the attachment.  I tried 1.7alpha from
20050324, but it didn't work due to a wrong method name ("compile" instead of
"process").

Since this bug (#33853) has been fixed since 2005-03-07, and the buildlog.txt
from the nightlies area says that the build failed, I presume that what's being
served as 20050324 is in fact a very older build :-(

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message