use of org.apache.maven.monitor.event.DefaultEventMonitor in project intellij-community by JetBrains.
the class MavenEmbedder method createRequest.
private MavenExecutionRequest createRequest(File file, List<String> activeProfiles, List<String> inactiveProfiles, List<String> goals) {
Properties executionProperties = myEmbedderSettings.getProperties();
if (executionProperties == null)
executionProperties = new Properties();
DefaultEventDispatcher dispatcher = new DefaultEventDispatcher();
dispatcher.addEventMonitor(new DefaultEventMonitor(myLogger));
// subclassing because in DefaultMavenExecutionRequest field isRecursive is always false
MavenExecutionRequest result = new DefaultMavenExecutionRequest(myLocalRepository, mySettings, dispatcher, goals, file.getParent(), createProfileManager(activeProfiles, inactiveProfiles, executionProperties), executionProperties, new Properties(), true) {
private boolean myIsRecursive;
@Override
public boolean isRecursive() {
return myIsRecursive;
}
@Override
public void setRecursive(final boolean recursive) {
myIsRecursive = recursive;
}
};
result.setPomFile(file.getPath());
result.setRecursive(myEmbedderSettings.isRecursive());
return result;
}
Aggregations