1 package org.apache.maven.cli;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.File;
23 import java.util.Properties;
24
25 import org.apache.commons.cli.CommandLine;
26 import org.apache.maven.execution.DefaultMavenExecutionRequest;
27 import org.apache.maven.execution.MavenExecutionRequest;
28 import org.codehaus.plexus.classworlds.ClassWorld;
29
30 public class CliRequest
31 {
32 String[] args;
33
34 CommandLine commandLine;
35
36 ClassWorld classWorld;
37
38 String workingDirectory;
39
40 File multiModuleProjectDirectory;
41
42 boolean debug;
43
44 boolean quiet;
45
46 boolean showErrors = true;
47
48 Properties userProperties = new Properties();
49
50 Properties systemProperties = new Properties();
51
52 MavenExecutionRequest request;
53
54 CliRequest( String[] args, ClassWorld classWorld )
55 {
56 this.args = args;
57 this.classWorld = classWorld;
58 this.request = new DefaultMavenExecutionRequest();
59 }
60
61 public String[] getArgs()
62 {
63 return args;
64 }
65
66 public CommandLine getCommandLine()
67 {
68 return commandLine;
69 }
70
71 public ClassWorld getClassWorld()
72 {
73 return classWorld;
74 }
75
76 public String getWorkingDirectory()
77 {
78 return workingDirectory;
79 }
80
81 public File getMultiModuleProjectDirectory()
82 {
83 return multiModuleProjectDirectory;
84 }
85
86 public boolean isDebug()
87 {
88 return debug;
89 }
90
91 public boolean isQuiet()
92 {
93 return quiet;
94 }
95
96 public boolean isShowErrors()
97 {
98 return showErrors;
99 }
100
101 public Properties getUserProperties()
102 {
103 return userProperties;
104 }
105
106 public Properties getSystemProperties()
107 {
108 return systemProperties;
109 }
110
111 public MavenExecutionRequest getRequest()
112 {
113 return request;
114 }
115
116 public void setUserProperties( Properties properties )
117 {
118 this.userProperties.putAll( properties );
119 }
120 }