class MavenGoal extends TransformationUtility<MavenGoal> {

    @Override
    protected TUExecutionResult execution(File transformedAppFolder, TransformationContext transformationContext) {

        // This can be a pom.xml file or a the "base directory", the folder where Maven is supposed to run
        File file = getAbsoluteFile(transformedAppFolder, transformationContext);

        TUExecutionResult result = null;
        InvocationResult invocationResult = null;

        try {
            for (MavenInvocationOutputHandler outputHandler : outputHandlers) {
                multipleOutputHandler.register(outputHandler);
            }

            if (file.exists() && file.isFile() && file.getName().equals("pom.xml")) {
                request.setPomFile(file);
            } else {
                request.setBaseDirectory(file);
            }

            request.setGoals(Arrays.asList(goals));
            request.setOutputHandler(multipleOutputHandler);
            request.setBatchMode(true);

            if (properties != null && !properties.isEmpty()) {
                request.setProperties(properties);
            }

            invocationResult = invoker.execute(request);

            int exitCode = invocationResult.getExitCode();
            Map<Class<? extends MavenInvocationOutputHandler>, Object> outputHandlersResult = multipleOutputHandler.getResult();

            if (exitCode == 0) {
                result = TUExecutionResult.value(this, outputHandlersResult);
            } else {
                Exception e = invocationResult.getExecutionException();
                if (e == null) {
                    e = new TransformationUtilityException(String.format("Maven goals %s execution failed with exit code %d", Arrays.toString(goals), exitCode));
                }
                if (warnOnError) {
                    result = TUExecutionResult.warning(this, e, outputHandlersResult);
                } else {
                    result = TUExecutionResult.error(this, e, outputHandlersResult);
                }
            }
        } catch (Exception e) {
            if (invocationResult != null) {
                Exception invocationException = invocationResult.getExecutionException();
                if (invocationException != null) {
                    result = TUExecutionResult.error(this, invocationException);
                }
            }

            if (result == null) {
                result = TUExecutionResult.error(this, e);
            }
        }

        return result;
    }

    public  MavenGoal();
    public  MavenGoal(String... goals);
    public  MavenGoal(String[] goals, MavenInvocationOutputHandler[] outputHandlers);

}