Hi there, I'm developing a suite of J2ME related plugins for maven2.
I'm writing mojos that do the following:
Preprocess
Compile
Preverify
Obfuscate
Package
Run/Debug a MIDlet in an emulator
I've implemented a PreProcessorMojo using FreeMarker, and unfortunately
i wasn't able to extend the existing maven-compiler-plugin and had to
wrote my own compiler (I'd like to change this if i find out a good way
to extend it the way i need it extended. I may even just ditch the
custom compiler and have users configure the existing compiler-plugin
for the correct -target and other j2me specific settings. Anyway.., off
topic....
The real question is how I can properly implement the preprocessor mojo.
I see the addCompileSourceRoots api call on the MavenProject object, but
i don't see one for removing a source root. I need to preprocess the
java sources to a directory under target (ie:
target/preprocessed/{main,test}) and then compile from there rather than
from the original source roots. Or maybe my thinking is completely
wrong? Can anyone help guide me in the right direction?