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 37272] New: - Unable to get class annotations when using custom task.
Date Thu, 27 Oct 2005 15:34:52 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=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: simeon.greene@gmail.com


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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message