[ https://issues.apache.org/jira/browse/MNG-7479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17537334#comment-17537334 ]
ASF GitHub Bot commented on MNG-7479: ------------------------------------- laeubi commented on PR #740: URL: https://github.com/apache/maven/pull/740#issuecomment-1127217458 > it would bypass the whole events organisation instead Just looking at the code, the organization is rather loose coupled, passing arbitrary objects and implementations have to check for what they get so it seems rather unlikely that this would harm anything here, and I think one don't gain very much (as I said I can lookup the component anyways and use reflection). And it seems a bit strange that one has references to even internal `EventDispatcher` in a 'public' interface if the class it self can't be loaded. > in your context, is it from a plugin classloader or core classloader (extension or plugin marked as extension)? plugin marked as extension > AFAIK, events are only dispatched from core: if we need to dispatch from another context, we'll have to check how it impacts the dispatch workflow I think as soon as one injects own events he/she is responsible to not disturb the handling anyways and it does not make much of a difference if you are a plugin, plugin-extension or core-extension ... > Export the package org.apache.maven.eventspy > -------------------------------------------- > > Key: MNG-7479 > URL: https://issues.apache.org/jira/browse/MNG-7479 > Project: Maven > Issue Type: Improvement > Components: Core > Affects Versions: 3.8.5 > Reporter: Christoph Läubrich > Priority: Major > > I'm currently try to fetch a specific EventSpy to inject an event there > (maven-profiler). > Sadly in my maven plugin when I try to get it injected: > @Requirement(role = EventSpy.class, hint = "profiler", optional = true) > EventSpy eventSpy; > This results in ClassNotFoundException: org.apache.maven.eventspy.EventSpy > I noticed that the maven-core do not export the 'org.apache.maven.eventspy' > package and that is the cause of this, I'd like to suggest to export the > package as there seem no other standard way to interact/access event spys > otherwise. -- This message was sent by Atlassian Jira (v8.20.7#820007)