1 package org.apache.maven.execution;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.maven.artifact.repository.ArtifactRepository;
23 import org.apache.maven.monitor.event.EventDispatcher;
24 import org.apache.maven.monitor.event.EventMonitor;
25 import org.apache.maven.profiles.ProfileManager;
26 import org.apache.maven.settings.Settings;
27
28 import java.util.Date;
29 import java.util.List;
30 import java.util.Properties;
31
32
33
34
35
36 public class DefaultMavenExecutionRequest
37 implements MavenExecutionRequest
38 {
39
40
41
42 private final ArtifactRepository localRepository;
43
44 private final List goals;
45
46 protected MavenSession session;
47
48 private final EventDispatcher eventDispatcher;
49
50 private final Settings settings;
51
52 private final String baseDirectory;
53
54 private boolean recursive = true;
55
56 private boolean reactorActive;
57
58 private String pomFilename;
59
60 private String failureBehavior;
61
62 private final ProfileManager globalProfileManager;
63
64 private final Properties executionProperties;
65
66 private final Properties userProperties;
67
68 private final Date startTime;
69
70 private final boolean showErrors;
71
72 public DefaultMavenExecutionRequest( ArtifactRepository localRepository, Settings settings,
73 EventDispatcher eventDispatcher, List goals, String baseDirectory,
74 ProfileManager globalProfileManager, Properties executionProperties,
75 Properties userProperties,
76 boolean showErrors )
77 {
78 this.localRepository = localRepository;
79
80 this.settings = settings;
81
82 this.goals = goals;
83
84 this.eventDispatcher = eventDispatcher;
85
86 this.baseDirectory = baseDirectory;
87
88 this.globalProfileManager = globalProfileManager;
89
90 this.executionProperties = executionProperties;
91
92 this.userProperties = userProperties;
93
94 startTime = new Date();
95
96 this.showErrors = showErrors;
97 }
98
99 public Settings getSettings()
100 {
101 return settings;
102 }
103
104 public String getBaseDirectory()
105 {
106 return baseDirectory;
107 }
108
109 public boolean isRecursive()
110 {
111 return recursive;
112 }
113
114 public void setRecursive( boolean recursive )
115 {
116 this.recursive = false;
117 }
118
119 public ArtifactRepository getLocalRepository()
120 {
121 return localRepository;
122 }
123
124 public List getGoals()
125 {
126 return goals;
127 }
128
129 public Properties getExecutionProperties()
130 {
131 return executionProperties;
132 }
133
134
135
136
137
138 public MavenSession getSession()
139 {
140 return session;
141 }
142
143 public void setSession( MavenSession session )
144 {
145 this.session = session;
146 }
147
148 public void addEventMonitor( EventMonitor monitor )
149 {
150 eventDispatcher.addEventMonitor( monitor );
151 }
152
153 public EventDispatcher getEventDispatcher()
154 {
155 return eventDispatcher;
156 }
157
158 public void setReactorActive( boolean reactorActive )
159 {
160 this.reactorActive = reactorActive;
161 }
162
163 public boolean isReactorActive()
164 {
165 return reactorActive;
166 }
167
168 public void setPomFile( String pomFilename )
169 {
170 this.pomFilename = pomFilename;
171 }
172
173 public String getPomFile()
174 {
175 return pomFilename;
176 }
177
178 public void setFailureBehavior( String failureBehavior )
179 {
180 this.failureBehavior = failureBehavior;
181 }
182
183 public String getFailureBehavior()
184 {
185 return failureBehavior;
186 }
187
188 public ProfileManager getGlobalProfileManager()
189 {
190 return globalProfileManager;
191 }
192
193 public Date getStartTime()
194 {
195 return startTime;
196 }
197
198 public boolean isShowErrors()
199 {
200 return showErrors;
201 }
202
203 public Properties getUserProperties()
204 {
205 return userProperties;
206 }
207 }