/**
 * Copyright 2011-2017 Asakusa Framework Team.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.asakusafw.workflow.cli.common;

import com.asakusafw.workflow.executor.ExecutionContext;
import com.asakusafw.workflow.executor.basic.BasicExecutionContext;

/**
 * Handles parameters about execution context.
 * @since 0.10.0
 */
public class ExecutionContextParameter {

    // NOTE: require Hadoop Configuration?

    private final ExecutionContext context = new BasicExecutionContext()
            .withEnvironmentVariables(m -> m.putAll(System.getenv()));

    /**
     * Returns the execution context.
     * @return the execution context
     */
    public ExecutionContext getExecutionContext() {
        return context;
    }
}

@@ -750,194 +750,522 @@
 tor.
-basic.BasicExecutionContext;%0A%0A/**%0A * Handles parameters about execution context.%0A * @since 0.10.0%0A */%0Apublic class ExecutionContextParameter %7B%0A%0A    // NOTE: require Hadoop Configuration?
+TaskExecutors;%0Aimport com.asakusafw.workflow.executor.basic.BasicExecutionContext;%0Aimport com.beust.jcommander.Parameter;%0A%0A/**%0A * Handles parameters about execution context.%0A * @since 0.10.0%0A */%0Apublic class ExecutionContextParameter %7B%0A%0A    /**%0A     * The batch application base directory.%0A     */%0A    @Parameter(%0A            names = %7B %22-B%22, %22--batchapps%22 %7D,%0A            description = %22Batch application base directory (ASAKUSA_BATCHAPPS_HOME).%22,%0A            required = false%0A    )%0A    public String batchappsPath;
 %0A%0A  
@@ -1280,16 +1280,21 @@
 e final 
+Basic
 Executio
@@ -1555,16 +1555,170 @@
 ext() %7B%0A
+        if (batchappsPath != null) %7B%0A            context.withEnvironmentVariables(m -%3E m.put(TaskExecutors.ENV_BATCHAPPS_PATH, batchappsPath));%0A        %7D%0A
         

Introduce `-B` option into `asakusafw.sh run`.