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
31
32
33 public class CliRequest
34 {
35 String[] args;
36
37 CommandLine commandLine;
38
39 ClassWorld classWorld;
40
41 String workingDirectory;
42
43 File multiModuleProjectDirectory;
44
45 boolean debug;
46
47 boolean quiet;
48
49 boolean showErrors = true;
50
51 Properties userProperties = new Properties();
52
53 Properties systemProperties = new Properties();
54
55 MavenExecutionRequest request;
56
57 CliRequest( String[] args, ClassWorld classWorld )
58 {
59 this.args = args;
60 this.classWorld = classWorld;
61 this.request = new DefaultMavenExecutionRequest();
62 }
63
64 public String[] getArgs()
65 {
66 return args;
67 }
68
69 public CommandLine getCommandLine()
70 {
71 return commandLine;
72 }
73
74 public ClassWorld getClassWorld()
75 {
76 return classWorld;
77 }
78
79 public String getWorkingDirectory()
80 {
81 return workingDirectory;
82 }
83
84 public File getMultiModuleProjectDirectory()
85 {
86 return multiModuleProjectDirectory;
87 }
88
89 public boolean isDebug()
90 {
91 return debug;
92 }
93
94 public boolean isQuiet()
95 {
96 return quiet;
97 }
98
99 public boolean isShowErrors()
100 {
101 return showErrors;
102 }
103
104 public Properties getUserProperties()
105 {
106 return userProperties;
107 }
108
109 public Properties getSystemProperties()
110 {
111 return systemProperties;
112 }
113
114 public MavenExecutionRequest getRequest()
115 {
116 return request;
117 }
118
119 public void setUserProperties( Properties properties )
120 {
121 this.userProperties.putAll( properties );
122 }
123 }