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