executionCommandLine.add( gradleExecutableFile.getAbsolutePath() );
//add the port number we're listenening on
executionCommandLine.add( "-D" + ProtocolConstants.PORT_NUMBER_SYSTEM_PROPERTY + "=" + Integer.toString( serverPort ) );
CommandLineAssistant commandLineAssistant = new CommandLineAssistant();
//add whatever the user ran
String[] individualCommandLineArguments = commandLineAssistant.breakUpCommandLine( commandLine );
executionCommandLine.addAll( Arrays.asList( individualCommandLineArguments ) );
File initStriptPath = getInitScriptFile();
if( initStriptPath != null )
{
executionCommandLine.add( "-" + DefaultCommandLineConverter.INIT_SCRIPT );
executionCommandLine.add( initStriptPath.getAbsolutePath() );
executionInfo.initStriptPath = initStriptPath;
}
//add the log level if its not present
if (!commandLineAssistant.hasLogLevelDefined(individualCommandLineArguments)) {
String logLevelText = commandLineAssistant.getLoggingCommandLineConverter().getLogLevelCommandLine(logLevel);
if (logLevelText != null && !"".equals(logLevelText)) {
executionCommandLine.add( '-' + logLevelText );
}
}
//add the stack trace level if its not present
if (!commandLineAssistant.hasShowStacktraceDefined(individualCommandLineArguments)) {
String stackTraceLevelText = commandLineAssistant.getCommandLineConverter().getShowStacktraceCommandLine(stackTraceLevel);
if (stackTraceLevelText != null) {
executionCommandLine.add( '-' + stackTraceLevelText );
}
}