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