Package org.apache.maven.api
Interface Event
- All Known Implementing Classes:
DefaultEvent
Event sent by maven during various phases of the build process.
Such events can be listened to using
Listener
s objects
registered in the Session
.- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionGets the exception that caused the event (if any).Gets the current mojo execution (if any).Gets the current project (if any).Gets the session from which this event originates.getType()
Gets the type of the event.
-
Method Details
-
getType
Gets the type of the event.- Returns:
- the type of the event, never
null
-
getSession
Gets the session from which this event originates.- Returns:
- the current session, never
null
-
getProject
Gets the current project (if any).- Returns:
- the current project or
empty()
if not applicable
-
getMojoExecution
Gets the current mojo execution (if any).- Returns:
- the current mojo execution or
empty()
if not applicable
-
getException
Gets the exception that caused the event (if any).- Returns:
- the exception or
empty()
if none
-