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