throw new IllegalArgumentException("handler must not be null"); //$NON-NLS-1$ if (isResolved()) { return this; for (String token : getCommandLineTokens()) { resolvedCommands.add(resolver.resolve(token)); for (Map.Entry<String, String> entry : getEnvironmentVariables().entrySet()) { resolvedEnvironments.put(entry.getKey(), resolver.resolve(entry.getValue())); return new CommandScript( getId(), getBlockerIds(), getProfileName(), getModuleName(), resolvedCommands, resolvedEnvironments,
@Override public String toString() { return MessageFormat.format( "Command'{'id={0}, blockers={1}, profile={2}, module={3}, command={4}, environment={5}'}'", getId(), getBlockerIds(), getProfileName(), getModuleName(), getCommandLineTokens(), getEnvironmentVariables()); }
case COMMAND: { CommandScript exec = (CommandScript) execution; String profileName = exec.getProfileName(); CommandScriptHandler handler = profileName == null ? null : commandHandlers.get(profileName); if (handler == null) { LOG.debug("Profile {} is not defined in comand script handlers, try wildcard: {}", profileName, exec.getId()); handler = commandHandlers.get(CommandScriptHandler.PROFILE_WILDCARD); context.getFlowId(), context.getPhase().getSymbol(), exec.getModuleName(), exec.getId(), profileName)); results.add(new ScriptJob<>(exec.resolve(context, handler), handler)); break;
case COMMAND: { CommandScript s = (CommandScript) script; properties.setProperty(scriptPrefix + KEY_PROFILE, s.getProfileName()); properties.setProperty(scriptPrefix + KEY_MODULE, s.getModuleName()); List<String> command = s.getCommandLineTokens(); assert command.size() <= 9999; String commandPrefix = scriptPrefix + KEY_COMMAND_PREFIX;
LOG.debug("env: {}", env); List<String> original = script.getCommandLineTokens(); List<String> command; try { context.getPhase(), context.getExecutionId(), script.getId(), currentProfile.getPrefix(), original), e); context.getPhase(), context.getExecutionId(), script.getId(), String.valueOf(exit)), exit);
script = new CommandScript( scriptId, blockers, profileName, moduleName,