I've written a Maven plugin. When it runs, I want it to process both main classes and test classes. I originally thought that setting my mojo's defaultPhase to PROCESS_CLASSES would handle this, but I've come to find out that PROCESS_CLASSES is only for main classes. There seems to be separate phase for test classes: PROCESS_TEST_CLASSES. So, when I do mvn clean install, my test classes don't get instrumented but my main classes do.

What is the proper way to have a single goal process both test classes and main classes? Is there a way to have two default phases? or should I have separate goals, one for main classes and one for test classes? or should I tell the user to explicitly specify two execution blocks in their pom (one for bound to process-classes and the other to process-test-classes -- but then how would I find out which phase I'm in so that I can target the appropriate directory)?



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to