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.util.Properties;
23  import org.apache.commons.cli.CommandLine;
24  import org.apache.maven.execution.DefaultMavenExecutionRequest;
25  import org.apache.maven.execution.MavenExecutionRequest;
26  import org.codehaus.plexus.classworlds.ClassWorld;
27  
28  
29  
30  
31  public class CliRequest {
32      String[] args;
33  
34      CommandLine commandLine;
35  
36      ClassWorld classWorld;
37  
38      String workingDirectory;
39  
40      File multiModuleProjectDirectory;
41  
42      boolean verbose;
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          this.args = args;
56          this.classWorld = classWorld;
57          this.request = new DefaultMavenExecutionRequest();
58      }
59  
60      public String[] getArgs() {
61          return args;
62      }
63  
64      public CommandLine getCommandLine() {
65          return commandLine;
66      }
67  
68      public ClassWorld getClassWorld() {
69          return classWorld;
70      }
71  
72      public String getWorkingDirectory() {
73          return workingDirectory;
74      }
75  
76      public File getMultiModuleProjectDirectory() {
77          return multiModuleProjectDirectory;
78      }
79  
80      public boolean isVerbose() {
81          return verbose;
82      }
83  
84      public boolean isQuiet() {
85          return quiet;
86      }
87  
88      public boolean isShowErrors() {
89          return showErrors;
90      }
91  
92      public Properties getUserProperties() {
93          return userProperties;
94      }
95  
96      public Properties getSystemProperties() {
97          return systemProperties;
98      }
99  
100     public MavenExecutionRequest getRequest() {
101         return request;
102     }
103 
104     public void setUserProperties(Properties properties) {
105         this.userProperties.putAll(properties);
106     }
107 }