Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sisu-users] Maven Cli -> Plexus -> Sisu Woes

Hello,

I am attempting to run maven via maven cli and am running into a problem that I believe may be related to plexus/sisu.  I am running maven cli via an akka actor, reinstantiating maven cli each time a message is received and processed.  What I have found is that this works 80% of the time.  The other 20%, MavenCli will fail with 

org.apache.maven.cli.MavenCli - Error executing Maven.
org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException
      role: org.apache.maven.eventspy.internal.EventSpyDispatcher
  roleHint:
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:264)
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:252)
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:246)
        at org.apache.maven.cli.MavenCli.container(MavenCli.java:420)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:208)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188)

I have been going through this code and eventually found a means to turn on sisu debugging.  What I noticed was that the run with maven cli that succeeds will have ~213 implicit & explicit bindings.  The run that fails will have only ~18 explicit bindings.  Sure enough the larger list has EventSpyDispatcher while the smaller list does not.    

My questions are:

1) what triggers plexus/sisu to scan for these bindings and can I manually kick this off to ensure that I am not losing the bindings (I noticed some caching in the sisu code and am wondering if I am doing something that is invalidating the cache but not triggering this binding scan)

2) what might be causing this akka actor to discover different bindings on one run vs. another when the classpath has not changed

Thank you so much for any help you may be able to provide as this issue has been quite the challenge to debug.

Kindest Regards,
jm

Back to the top