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=37272>. 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=37272 Summary: Unable to get class annotations when using custom task. Product: Ant Version: 1.6.2 Platform: Other OS/Version: Windows XP Status: NEW Severity: major Priority: P2 Component: Other AssignedTo: dev@ant.apache.org ReportedBy: [EMAIL PROTECTED] I wrote a custom ant task that collects the JSR-181 annotations in a specified class and performs some proprietary functions. (I know that there is an apt task that does something similar but we are not using that in our product). There appears to be some class loading issues when I try to do annotation processing from my task. For example if the following class was provided to the task: @WebService(name="myService) public class MyWebService{ public String doSomething(){return "something";} } When this class is loaded using: endpointClass = class.forName(MyWebService,classLoaderFromUserClasspath) I cannot get the @WebService annotation which is clearly in the class. For example when I call endpointClass.getAnnotation(WebService.class) it returns null. Oddly enough, if my task uses Java to invoke a separate process that does the annotation processing the same code works. -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]