I was looking at writing a Maven plugin around gUnit tonight, and I ran into two issues that I was hoping could be addressed.
My approach was to use the JUnitCodeGen class to generate JUnit classes during maven's generate-test-sources phase. The first issue that I ran into was that I was unable to specify the output directory. I was able to get around this by extending JUnitCodeGen and overriding "writeTestFile", but this seems a bit hackish, as I had to throw away the "dir" parameter to this method (which is hard coded as "."). Something like a "setOutputDirectory" that was then used in the call to writeTestFile would be much more elegant here. The second issue was in the constructor, where it invokes "Class.forName(...)". When I'm invoking this from maven, my generated parser classes likely aren't in the system ClassLoader. However, I am able to load them all into a child ClassLoader, so it would be great if there were a way to provide a ClassLoader to JUnitCodeGen so that it can load the parser class from there instead. Unfortunately, I wasn't able to work around this one without modifying JUnitCodeGen. Is this the preferred way to access GUnit programmatically? I'm open for suggestions. Thanks, Jared List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
