Just to close this thread, I managed to configure the compiler plugin
from within my initialize-phase Mojo like so:
Xpp3Dom dom = null;
List plugins = project.getBuildPlugins();
Plugin plugin = null;
if ( plugins != null) {
for ( Iterator iterator = plugins.iterator(); iterator.hasNext(); ) {
plugin = (Plugin) iterator.next();
if ( "org.apache.maven.plugins".equals( plugin.getGroupId() ) &&
"maven-compiler-plugin".equals( plugin.getArtifactId() ) ) {
dom = (Xpp3Dom) plugin.getConfiguration();
break;
}
}
// alter the configuration dom
}
Changes to dom directly apply to the target plugin, I ask the Mobile
Java Unified Emulator Interface for the bootclasspath of an emulated
device and pass it to the compiler plugin. That way the J2ME plugin can
easily be configured for various emulators.
This configuration method must be used with care, you can cause all
kinds of surprises because you do things which are not obvious in the pom.
The J2ME bootclasspath is a special case, it is neither a special
compiler which would need its own compiler id, nor is it a normal
runtime dependency. It is a separate SDK with its own language semantics
and own base libraries which uses a normal JDK for cross-compilation.
If you have a better idea to integrate J2ME emulators, let me know.
Regards
Dietrich
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]