1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  package org.apache.maven.lifecycle.internal;
20  
21  import org.apache.maven.execution.ExecutionEvent;
22  import org.apache.maven.execution.MavenSession;
23  import org.apache.maven.plugin.MojoExecution;
24  import org.apache.maven.project.MavenProject;
25  
26  
27  
28  
29  
30  
31  class DefaultExecutionEvent implements ExecutionEvent {
32  
33      private final Type type;
34  
35      private final MavenSession session;
36  
37      private final MojoExecution mojoExecution;
38  
39      private final Exception exception;
40  
41      DefaultExecutionEvent(Type type, MavenSession session, MojoExecution mojoExecution, Exception exception) {
42          this.type = type;
43          this.session = session;
44          this.mojoExecution = mojoExecution;
45          this.exception = exception;
46      }
47  
48      public Type getType() {
49          return type;
50      }
51  
52      public MavenSession getSession() {
53          return session;
54      }
55  
56      public MavenProject getProject() {
57          return session.getCurrentProject();
58      }
59  
60      public MojoExecution getMojoExecution() {
61          return mojoExecution;
62      }
63  
64      public Exception getException() {
65          return exception;
66      }
67  }