1 package org.apache.maven.execution; 2 3 18 19 import org.apache.maven.artifact.repository.ArtifactRepository; 20 import org.apache.maven.monitor.event.EventDispatcher; 21 import org.apache.maven.monitor.event.EventMonitor; 22 import org.apache.maven.profiles.ProfileManager; 23 import org.apache.maven.settings.Settings; 24 25 import java.util.Date ; 26 import java.util.List ; 27 import java.util.Properties ; 28 29 33 public class DefaultMavenExecutionRequest 34 implements MavenExecutionRequest 35 { 36 39 private final ArtifactRepository localRepository; 40 41 private final List goals; 42 43 protected MavenSession session; 44 45 private final EventDispatcher eventDispatcher; 46 47 private final Settings settings; 48 49 private final String baseDirectory; 50 51 private boolean recursive = true; 52 53 private boolean reactorActive; 54 55 private String pomFilename; 56 57 private String failureBehavior; 58 59 private final ProfileManager globalProfileManager; 60 61 private final Properties executionProperties; 62 63 private final Date startTime; 64 65 private final boolean showErrors; 66 67 public DefaultMavenExecutionRequest( ArtifactRepository localRepository, Settings settings, 68 EventDispatcher eventDispatcher, List goals, String baseDirectory, 69 ProfileManager globalProfileManager, Properties executionProperties, 70 boolean showErrors ) 71 { 72 this.localRepository = localRepository; 73 74 this.settings = settings; 75 76 this.goals = goals; 77 78 this.eventDispatcher = eventDispatcher; 79 80 this.baseDirectory = baseDirectory; 81 82 this.globalProfileManager = globalProfileManager; 83 84 this.executionProperties = executionProperties; 85 86 this.startTime = new Date (); 87 88 this.showErrors = showErrors; 89 } 90 91 public Settings getSettings() 92 { 93 return settings; 94 } 95 96 public String getBaseDirectory() 97 { 98 return baseDirectory; 99 } 100 101 public boolean isRecursive() 102 { 103 return recursive; 104 } 105 106 public void setRecursive( boolean recursive ) 107 { 108 this.recursive = false; 109 } 110 111 public ArtifactRepository getLocalRepository() 112 { 113 return localRepository; 114 } 115 116 public List getGoals() 117 { 118 return goals; 119 } 120 121 public Properties getExecutionProperties() 122 { 123 return executionProperties; 124 } 125 126 130 public MavenSession getSession() 131 { 132 return session; 133 } 134 135 public void setSession( MavenSession session ) 136 { 137 this.session = session; 138 } 139 140 public void addEventMonitor( EventMonitor monitor ) 141 { 142 eventDispatcher.addEventMonitor( monitor ); 143 } 144 145 public EventDispatcher getEventDispatcher() 146 { 147 return eventDispatcher; 148 } 149 150 public void setReactorActive( boolean reactorActive ) 151 { 152 this.reactorActive = reactorActive; 153 } 154 155 public boolean isReactorActive() 156 { 157 return reactorActive; 158 } 159 160 public void setPomFile( String pomFilename ) 161 { 162 this.pomFilename = pomFilename; 163 } 164 165 public String getPomFile() 166 { 167 return pomFilename; 168 } 169 170 public void setFailureBehavior( String failureBehavior ) 171 { 172 this.failureBehavior = failureBehavior; 173 } 174 175 public String getFailureBehavior() 176 { 177 return failureBehavior; 178 } 179 180 public ProfileManager getGlobalProfileManager() 181 { 182 return globalProfileManager; 183 } 184 185 public Date getStartTime() 186 { 187 return startTime; 188 } 189 190 public boolean isShowErrors() 191 { 192 return showErrors; 193 } 194 } 195 | Popular Tags |