You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Dietrich Schulten <di...@sic-software.com> on 2006/11/29 18:18:20 UTC

Accessing compiler-plugin configuration from another plugin

Hi,

I am cooperating with Frank Seidinger on the J2ME plugin, and we need to
set the bootclasspath of the compiler plugin. This can be done in the
POM like this:

<configuration>
<compilerArguments>
<verbose />                       
<bootclasspath>...</bootclasspath>
</compilerArguments>
</configuration>

However, I want to use the Unified Emulator Interface to determine the
bootclasspath automatically and configure the compiler accordingly. I am
able to access the UEI from my Mojo, but I do not know how to access the
compiler plugin configuration programmatically. I think I need the
current container and an evaluator to do this, at least that is how the
test harness configures plugins:

ComponentConfigurator configurator = (ComponentConfigurator)
getContainer().lookup( ComponentConfigurator.ROLE );
           
XmlPlexusConfiguration plexusConfiguration = new
XmlPlexusConfiguration("configuration")
// add configuration items

configurator.configureComponent( mojo, plexusConfiguration, evaluator,
getContainer().getContainerRealm() );

The test harness creates its own container, and it uses a stub as
evaluator. How do I get the container of a running maven instance and
which evaluator do I have to pass to configureComponent()?

An alternative:
Frank proposes to introduce the Wireless toolkits on the plexus compiler
level. Where can we find more information about this and what would be
more appropriate from your point of view?

Regards,
Dietrich

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org