Hi,

I am currently trying to fix a problem with the newly open-sourced Flex plugin 
for IntelliJ.


In this plugin usually a goal of a maven plugin (Flexmojos) is executed 
programmatically in order to generate a config file, which IntelliJ then uses 
to configure itself. For this they manually construct a PlexusContainer and use 
that to do all sorts of magic.


The problem is that when updating Flexmojos 7.1.0-SNAPSHOT I had to make it 
depend on at least Maven 3.1.1 as some of the resource resolution stuff had 
changed there. Unfortunately If I use anything above 3.1.0 the IntelliJ plugin 
doesn't work and it gives me this Error:


[main] WARN Sisu - Error injecting: 
org.apache.maven.plugin.DefaultBuildPluginManager
com.google.inject.ProvisionException: Guice provision errors:

1) No implementation for 
org.apache.maven.execution.scope.internal.MojoExecutionScope was bound.
  while locating org.apache.maven.plugin.DefaultBuildPluginManager

I get this when looking up "Maven":

org.apache.maven.Maven maven = 
plexusContainer.lookup(org.apache.maven.Maven.class);

The method doing this actually wants to create a RepositorySystemSession ... so 
eventually there is a different way, than to get the maven instance and then 
call newRepositorySession on that.


I know that inside maven there actually is no longer a real classic plexus 
container running ... so eventually it would be better to use Guice instead. 
Any pointers towards how to programmatically get a RepositorySystemSession 
would be great ;-)


Chris

Reply via email to