Package org.apache.maven.eventspy
Interface EventSpy
-
- All Known Implementing Classes:
AbstractEventSpy
,DefaultPluginValidationManager
public interface EventSpy
A core extension to monitor Maven's execution. Typically, such an extension gets loaded into Maven by specifying the propertymaven.ext.class.path
on the command line. As soon as dependency injection is set up, Maven looks up all implementers of this interface and calls theirinit(Context)
method. Note: Implementors are strongly advised to inherit fromAbstractEventSpy
instead of directly implementing this interface.- Since:
- 3.0.2
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
EventSpy.Context
Context
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Notifies the spy of Maven's termination, allowing it to free any resources allocated by it.void
init(EventSpy.Context context)
Initializes the spy.void
onEvent(Object event)
Notifies the spy of some build event/operation.
-
-
-
Method Detail
-
init
void init(EventSpy.Context context) throws Exception
Initializes the spy.- Parameters:
context
- The event spy context, nevernull
.- Throws:
Exception
-
onEvent
void onEvent(Object event) throws Exception
Notifies the spy of some build event/operation.- Parameters:
event
- The event, nevernull
.- Throws:
Exception
- See Also:
SettingsBuildingRequest
,SettingsBuildingResult
,MavenExecutionRequest
,MavenExecutionResult
,DependencyResolutionRequest
,DependencyResolutionResult
,ExecutionEvent
,RepositoryEvent
-
-