List<String> (MavenServerSettings serverSettings) { List<String> commandLineOptions = new ArrayList<String>(serverSettings.getUserProperties().size()); for (Map.Entry<Object, Object> each : serverSettings.getUserProperties().entrySet()) { commandLineOptions.add("-D" + each.getKey() + "=" + each.getValue()); } if (serverSettings.getLocalRepositoryPath() != null) { commandLineOptions.add("-Dmaven.repo.local=" + serverSettings.getLocalRepositoryPath()); } if (serverSettings.isUpdateSnapshots()) { commandLineOptions.add("-U"); } if (serverSettings.getLoggingLevel() == MavenServerConsoleIndicator.LEVEL_DEBUG) { commandLineOptions.add("-X"); commandLineOptions.add("-e"); } else if (serverSettings.getLoggingLevel() == MavenServerConsoleIndicator.LEVEL_DISABLED) { commandLineOptions.add("-q"); } String mavenEmbedderCliOptions = System.getProperty(MavenServerEmbedder.MAVEN_EMBEDDER_CLI_ADDITIONAL_ARGS); if (mavenEmbedderCliOptions != null) { commandLineOptions.addAll(StringUtilRt.splitHonorQuotes(mavenEmbedderCliOptions, ' ')); } String globalSettingsPath = serverSettings.getGlobalSettingsPath(); if (globalSettingsPath != null && new File(globalSettingsPath).isFile()) { commandLineOptions.add("-gs"); commandLineOptions.add(globalSettingsPath); } String userSettingsPath = serverSettings.getUserSettingsPath(); if (userSettingsPath != null && new File(userSettingsPath).isFile()) { commandLineOptions.add("-s"); commandLineOptions.add(userSettingsPath); } if (serverSettings.isOffline()) { commandLineOptions.add("-o"); } return commandLineOptions; }