Hi James, The approach I've taken with the assembly plugin and a couple of other plugin-like libraries is two-level:
1. unit tests, where I'm testing at the method level where I can and using EasyMock where I have to. 2. integration tests, for which I'm using the maven-invoker-plugin, the maven-plugin-management-plugin, and a series of maven projects under src/it. This allows me to express a set of use cases as real Maven projects, then verify the result of the build using a Beanshell script. I've found that the combination of these strategies works well. BTW, the maven-plugin-management-plugin is still in the maven sandbox...not quite ready for release (lacks documentation and a few tests still). The maven-invoker-plugin may also be in the sandbox, but if so, it is ready to release, just needs to be done. You can checkout my testing approach here: http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-assembly-plugin HTH, -john On 10/30/06, James Walker <[EMAIL PROTECTED]> wrote:
Hi. I've a library that I built under Maven 1. It provides an ant task which does a bunch of code generation. Under maven 1 I was able to test the ant task during the test goal by running the task in a pre-goal and ensuring the output was dumped somewhere that it was able to be found and used during the rest of the testing. In fact as far as I can tell under Maven 2 I can not just run the ant task and have it generate to something like target/src/java, and have the compilation steps find that new source path. This is ok because I figured I might as well add a Maven 2 plugin which provides the code generation functionality. This led me to testing the new plugin and the question of "how?". I want to be able to compile the plugin, use it to generate some source, then compile the source and run it through some tests. Is this at all possible? I get the impression it might not be - at this time it seems I have to have the plugin installed/available as maven starts up - otherwise it'll have a fit. It almost seems I need another module which provides the plugin and to have compiled+installed that module first? Any hints? How are other people testing their plugins? Thanks for any help, James. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
