// Path: srcdeps-core/src/main/java/org/srcdeps/core/BuildException.java
// public class BuildException extends Exception {
//     private static final long serialVersionUID = 1520625837859688798L;
// 
//     public BuildException(String message) {
//         super(message);
//     }
// 
//     public BuildException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public BuildException(Throwable cause) {
//         super(cause);
//     }
// 
// }


import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.srcdeps.core.BuildException;
        }

        public void cancel() {
            this.cancelled = true;
        }

        @Override
        public void run() {
            try (BufferedReader r = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8))) {
                String line;
                while (!cancelled && (line = r.readLine()) != null) {
                    out.accept(line);
                }
            } catch (IOException e) {
                exception = e;
            }
        }
    }

    static final Logger log = LoggerFactory.getLogger(Shell.class);

    /**
     * Executes the given {@link ShellCommand} synchronously.
     *
     * @param command the command to execute
     * @return the {@link CommandResult} that can be used to determine if the execution was successful
     * @throws BuildException on any build related problems
     * @throws CommandTimeoutException if the execution is not finished within the timeout defined in
     *         {@link ShellCommand#getTimeoutMs()}
     */
// Path: srcdeps-core/src/main/java/org/srcdeps/core/BuildException.java
// public class BuildException extends Exception {
//     private static final long serialVersionUID = 1520625837859688798L;
// 
//     public BuildException(String message) {
//         super(message);
//     }
// 
//     public BuildException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public BuildException(Throwable cause) {
//         super(cause);
//     }
// 
// }


// Path: srcdeps-core/src/main/java/org/srcdeps/core/shell/Shell.java
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.srcdeps.core.BuildException;

        }

        public void cancel() {
            this.cancelled = true;
        }

        @Override
        public void run() {
            try (BufferedReader r = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8))) {
                String line;
                while (!cancelled && (line = r.readLine()) != null) {
                    out.accept(line);
                }
            } catch (IOException e) {
                exception = e;
            }
        }
    }

    static final Logger log = LoggerFactory.getLogger(Shell.class);

    /**
     * Executes the given {@link ShellCommand} synchronously.
     *
     * @param command the command to execute
     * @return the {@link CommandResult} that can be used to determine if the execution was successful
     * @throws BuildException on any build related problems
     * @throws CommandTimeoutException if the execution is not finished within the timeout defined in
     *         {@link ShellCommand#getTimeoutMs()}
     */
    public static CommandResult execute(ShellCommand command) throws BuildException, CommandTimeoutException {